responsive-youtube-player-with-playlist
responsive-youtube-player-with-playlist copied to clipboard
Show image when autoplay is false
When autoplay: false
, is there a way to show the preview image of the initial video rather than having a blank screen with the play button?
Actually, now that I'm looking at it more closely, when autoplay is set to false, a video is not even loaded into the iframe . So if you click play without clicking from the list, you get an error because the iframe doesn't know which video to play.
Ping @carloscabo. Any development on this? 😃 Noticing the same issue, which you can actually see in your demo page as well (last example at the bottom of the page). Thanks!
Well, it seems that just commenting out this if case should fix the issue:
// Select first if none
if (D.$items.find('li.selected').length === 0) {
// if (this.options.autoplay) {
D.$items.find('li').first().click();
// }
}
😄