Reputation: 107
I'm trying to figure out how to have the playlist automatically be expanded on page load as seen in this screen shot - http://glui.me/?i=zg8yl7mc2ukewck/2015-01-14_at_2.57_PM.png/
Right now when you load the page it displays closed as shown here http://glui.me/?i=md1ar6v3jfhb54b/2015-01-14_at_2.58_PM.png/
I am not using the API currently. I just have a playlist I generated on YouTube and copied the iframe embed code and popped it on the page. Is there anything I can add to the URL to achive this? Such as how you can turn off the recommended videos at the end with &rel=0
Upvotes: 2
Views: 1490
Reputation: 41
Me too.
Unable not find any solution. The 'enablejsapi' parameter looked promising.
I did find this enhancement request.
Vote it up!
Upvotes: 2
Reputation: 53
You and me both. My research is leading me to believe that this is impossible with the iFrame embed. I'm currently working with an ad-hoc playlist (https://developers.google.com/youtube/player_parameters#playlist), and it seems that there's no way to force the native playlist to open automatically.
I've seen a few solutions around that add in a separate playlist element to the page (http://www.woosterwebdesign.com/responsive-youtube-player-with-playlist/ , http://jsfiddle.net/NmvA9/7432/), but that's not the integrated solution we're looking for either.
The jsfiddle uses this code to create the carousel:
function createCarousel(jqe, videos, options) {
var car = $('div.carousel', jqe);
if (car.length === 0) {
car = $('<div>');
car.addClass('carousel');
jqe.append(car);
}
$.each(videos, function(i,video) {
options.thumbnail(car, video, options);
});
Upvotes: 1