Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow timecode to be used as timestamp in Share Modal #1673

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

thecashewtrader
Copy link
Contributor

Currently, the share modal only allows timestamp to be in seconds. This PR allows the timestamp to be in seconds as well as in HH:MM:SS format.

Some points to note:

  • Currently, YouTube has a bit confusing of a policy about maximum video duration, as stated in Extremely long videos timeout/have an unhandled error #1672. Therefore, this PR parses the timecode string manually instead of using something like Intl.DateFormat.
  • Currently, in the HH:MM:SS format, the seconds/minutes/hours value can be more than expected, which is handled without errors. For example: 10:61 will return &t=661. This can be changed if intended, but imo it's quite convenient.
  • It would be required to update the actions.time_code translations to reflect the new changes.

@FireMasterK
Copy link
Member

I fail to understand what's wrong with the current mechanism, is the number overflowing? (I highly doubt that's the case)

@thecashewtrader
Copy link
Contributor Author

I fail to understand what's wrong with the current mechanism, is the number overflowing? (I highly doubt that's the case)

imo it's more convenient to put in a HH:MM:SS string than a raw number, as you don't have to do the calculation yourself, especially if it's a long video.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants