ElkArte Community

General => Chit Chat => Topic started by: radu81 on April 26, 2017, 06:04:06 am

Title: test playlist youtube
Post by: radu81 on April 26, 2017, 06:04:06 am
test

https://www.youtube.com/playlist?list=PL-72lYkqnSfXj7LaTlGfsLhYoNO2xjKkc

link to playlist

https://www.youtube.com/playlist?list=PL-72lYkqnSfXj7LaTlGfsLhYoNO2xjKkc
Title: Re: test playlist youtube
Post by: Frenzie on April 26, 2017, 06:44:18 am
I didn't even know that was possible. Here (https://github.com/elkarte/Elkarte/blob/5fe7f404bb3b4c5e9a570edc48207c6cde663429/themes/default/scripts/elk_jquery_embed.js#L148-L151) are my notes from when I improved YT-embedding.

The regex could be extended to support ?list=PL-72lYkqnSfXj7LaTlGfsLhYoNO2xjKkc, but looking at it right now I'm not entirely sure why we're not simply using search params (e.g., split on &) without worrying about specifics.
Title: Re: test playlist youtube
Post by: radu81 on April 26, 2017, 09:45:53 am
Initially was just a test, but I think now should be moved to bug reports ;)

I edited the first post of this topic adding the link to the playlist. If you copy and paste the link into browser the playlists shows correctly, but if you paste it into a post there is no way to see correctly the link.
Title: Re: test playlist youtube
Post by: Frenzie on April 26, 2017, 09:52:24 am
There's always a link on top. :)

There is also a protection against auto-embed built into the script.

Same line: https://www.youtube.com/playlist?list=PL-72lYkqnSfXj7LaTlGfsLhYoNO2xjKkc

Edit: anyway, I suppose if we change the last regex to something like this:
(?:\/)([\w-]{11})
Title: Re: test playlist youtube
Post by: radu81 on April 26, 2017, 09:58:09 am
Yep, I forgot about this little trick. Problem solved ;)
Title: Re: test playlist youtube
Post by: Frenzie on April 26, 2017, 10:11:37 am
PR submitted: https://github.com/elkarte/Elkarte/pull/2922