我目前正在创建这个只有 200x200 视频播放器空间的网站,所以我需要减少“视频控制面板”上的杂乱程度。
这是播放器现在的样子,我需要删除 |<
& >|
纽扣
谢谢!
片段:
<iframe id="ytplayer" type="text/html" width="200" height="200" src="https://www.youtube.com/embed/?listType=playlist&list={PLAYLISTIDHERE}" >
最佳答案
这可能取决于您的代码,但您可以尝试“controls=0”,如下所示:
http://www.youtube.com/embed/ $VIDEOID?controls=0
您将 $VIDEOID 替换为有效的视频 ID。
请注意,这也将删除在播放期间在视频中前进和后退的 slider 。
最后要删除相关视频,播放后添加参数“rel=0”,如下:
http://www.youtube.com/embed/ $VIDEOID?controls=0&rel=0
有关可用参数的列表,请参阅:
https://developers.google.com/youtube/player_parameters
尝试:
<iframe id="ytplayer" type="text/html" width="200" height="200" src="https://www.youtube.com/embed/?controls=0&listType=playlist&list={PLAYLISTIDHERE}" />
似乎播放列表选择确实显示在左上角,但不再使用控件 = 0。
一个选项可能是使用 autohide=1。我还按照建议添加了moderatebranding=1。
<iframe id="ytplayer" width="200" height="200" src="https://www.youtube.com/embed/?modestbranding=1&autohide=1&listType=playlist&list={PLAYLISTIDHERE}" />
关于php - Youtube Data API v3 - 禁用播放列表控件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18801223/