Youtube smartlinks should work for all youtube url formats
Marak opened this issue · 9 comments
Right now we only support one YT link style like:
https://www.youtube.com/watch?v=v1K4EAXe2oo
We also need to support links like this:
https://youtu.be/v1K4EAXe2oo?t=26
( Notice it's a shortened URL and also it has time embed _
see:
https://github.com/Marak/buddypond/blob/master/desktop.js#L528
Looking for other part of code that would need to change.
Test:
https://youtu.be/3jH2QkP-Bvg?t=26
https://youtu.be/3jH2QkP-Bvg?t=123
https://youtu.be/3jH2QkP-Bvg?t=4440
hey! https://youtu.be/3jH2QkP-Bvg?t=26 you will like it.
https://www.youtube.com/watch?v=2FEtiA18lZU
this is some text https://www.youtube.com/watch?v=2FEtiA18lZU lalala
https://www.youtube.com/watch?v=3jH2QkP-Bvg&t=33s
https://www.youtube.com/watch?v=3jH2QkP-Bvg
some text before https://www.youtube.com/watch?v=3jH2QkP-Bvg&t=33s after
before text https://www.youtube.com/watch?v=3jH2QkP-Bvg after
https://www.youtube.com/watch?v=3jH2QkP-Bvg&t=1234s
I am working on it. Hopefully will have smtg this week.
Ok I need help:
This line:
Line 540 in 64ca2b5
This is what triggers the Interdimensional Cable window to open right? When I send just an ID to it, for instance "v1K4EAXe2oo" it works. But if I send an ID with its time, for instance "v1K4EAXe2oo?t=26" then the video cannot be found.
I feel like something somewhere else in some other part of the code needs to be changed . But I don't know where to look for. Any input on that?
This looks like it may be known CORS issue with youtube and some youtube videos don't work on localhost.
Try a few other videos or try using domain entry in local /etc/hosts
file.
Just made the PR
Thanks @mardub1635 !!!
Merged.
We still don't seem to support this format thou: https://www.youtube.com/watch?v=8JgxMVMBESY&t=33s
I did not know this format existed. Thanks.
One question though, in which context do you get such link? The only time I get started links on youtube is because I click on the "shared" button and it always give me the short youtu.be version.
Not sure of the context.
The format is valid and should be supported.
Will keep this issue open for now. Thanks again for your contributions.
No need to, I did the PR it is solved.