Embed a YouTube playlist so playlist options are a

2019-05-10 10:50发布

问题:

Is there a way to utilize the YouTube embedded player with a playlist and have the playlist always visible? Alternately, is there a way to have the playlist button on by default? My research so far indicates that the showinfo=1 option is used to make the playlist always visible but that does not seem to work anymore.

回答1:

The showinfo only works in the flash player. It does not affect the html5 player. In the html5 youtube player with embeded Plalist, you have to manually click the tiny tiny playlist icon at bottom right, which only appears after starting/playing the video.

So atm i post a text information below the html5player, which tells the user to click on this icon, after starting a video, to see the playlist control & icons. this is absolutely not user friendly.

PLEASE google, include & activate the playlist control & playlist thumbnails in the HTML5Player by default.

btw: the official info at https://developers.google.com/youtube/player_parameters#showinfo is outdated, cause "Note that this functionality is only supported for the AS3 player since that is the only player that can load a playlist."



回答2:

This is a nice JS plugin that works with the YouTube API v.3 https://github.com/Giorgio003/Youtube-TV

It imitates the look and functionality of the native YouTube Playlist. You must get an API key from your YouTube Channel and set it in ytv.js.

var apiKey = 'YOUR_API_KEY_HERE';

Link the CSS and JS

<link href="src/ytv.css" type="text/css" rel="stylesheet" />
<script src="src/ytv.js" type="text/javascript"></script>

Create your playlist container. [NOTE: the container must have a height.]

<div id="YourPlayerID"></div>

Then call the JS

document.addEventListener("DOMContentLoaded", function(event) {
    var controller = new YTV('YourPlayerID', {
       user: 'YoutubeUsername'
    });
});


回答3:

showinfo=1 should result in the thumbnails for all the videos in the playlist being initially visible, as described at

http://apiblog.youtube.com/2012/03/new-player-options-for-lists-of-videos.html

If you're seeing different behavior, could you please point us to an example and let us know which browser you're seeing this with, and whether you're using Flash or HTML5 video?

There's no way to force that playlist thumbnail strip to always be present, as the user will always be able to dismiss it if they'd like.



回答4:

Andrej, is correct, showinfo=1 DOES NOT, under html5 player embeds, on Chrome or Firefox, result in the Playlist thumbnails initially appearing. The user is very likely, on encountering such an embedded playlist, to incorrectly assume that it is just a single video and completely miss that there is a choice of videos. The only way to get the playlist thumbs to appear is to click the Playlist icon in the top left corner of the screen. I know from UI testing on my website that people are completely not seeing that there is more than one video http://www.jenshansen.com/pages/lord-of-the-rings-rings