Closed diomidov closed 3 years ago
Fun fact: Discord has a similar bug / lack of a feature. When you post a message with a YouTube link, Discord attaches an iframed preview. It handles unitless timestamps, but not units or playlists. If you post https://www.youtube.com/watch?v=...&list=...&t=1m10s
, the iframe has source https://www.youtube.com/embed/...?start=1m10s
and the video starts at 0:00 because 1m10s
is not a valid number. The playlist is simply ignored.
I also tested Slack, Facebook Messenger, and GitHub, but they don't have video previews like that.
The YouTube URL mangler (#26) removes playlist info (
?list=
) and timestamp (?t=
or?start=
).A URL like
https://www.youtube.com/watch?v=...&list=...&t=...
should be converted tohttps://www.youtube.com/embed/...?list=...&start=...
.embed
URLs supportstart
but nott
. The value has to be a number in seconds.watch
URLs support bothstart
andt
. The value is usually a number in seconds, but it can also have explicit units like70s
or1m10s
.