Piped
Piped copied to clipboard
Allow timecode to be used as timestamp in Share Modal
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 #1672. Therefore, this PR parses the timecode string manually instead of using something like
Intl.DateFormat. - Currently, in the
HH:MM:SSformat, the seconds/minutes/hours value can be more than expected, which is handled without errors. For example:10:61will return&t=661. This can be changed if intended, but imo it's quite convenient. - It would be required to update the
actions.time_codetranslations to reflect the new changes.
I fail to understand what's wrong with the current mechanism, is the number overflowing? (I highly doubt that's the case)
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.