如何在我的网站上循环播放 youtube 视频?
How do I loop a youtube video at my website?
我正在尝试使用 Youtube 视频作为网站背景。我已尝试将 "loop" 参数设置为 1,正如我在此处阅读的那样 (https://developers.google.com/youtube/player_parameters#loop),但它不起作用。这是我正在尝试的代码。一切都按预期工作,但循环参数除外。
<iframe frameborder="0" width="100%" height="100%" src="https://www.youtube.com/embed/fcbm8SvlRYk?autoplay=1&controls=0&showinfo=0&autohide=1&loop=1"></iframe>
我是不是做错了什么?
提前致谢! :D
从您提供的 link 复制粘贴:
Note: This parameter has limited support in the AS3 player and in
IFrame embeds, which could load either the AS3 or HTML5 player.
Currently, the loop parameter only works in the AS3 player when used
in conjunction with the playlist parameter. To loop a single video,
set the loop parameter value to 1 and set the playlist parameter value
to the same video ID already specified in the Player API URL
http://www.youtube.com/v/VIDEO_ID?version=3&loop=1&playlist=VIDEO_ID
试试这个
对我来说它非常有效
id="id1" src="src.abc.mp4" autoplay="true" loop="true" muted="true"
尝试使用此代码(添加播放列表参数):
<iframe frameborder="0" width="100%" height="100%" src="https://www.youtube.com/embed/fcbm8SvlRYk?autoplay=1&controls=0&playlist=fcbm8SvlRYk&showinfo=0&autohide=1&loop=1"></iframe>
您应该阅读您提供的 Google 开发人员 link 中循环参数说明中的注释:
https://developers.google.com/youtube/player_parameters#loop
注意: 此参数在 AS3 播放器和 IFrame 嵌入中的支持有限,可以加载 AS3 或 HTML5 播放器。目前,循环参数只有在与播放列表参数一起使用时才能在 AS3 播放器中使用。要循环播放单个视频,请将循环参数值设置为 1,并将播放列表参数值设置为已在播放器中指定的相同视频 ID API URL:
我正在尝试使用 Youtube 视频作为网站背景。我已尝试将 "loop" 参数设置为 1,正如我在此处阅读的那样 (https://developers.google.com/youtube/player_parameters#loop),但它不起作用。这是我正在尝试的代码。一切都按预期工作,但循环参数除外。
<iframe frameborder="0" width="100%" height="100%" src="https://www.youtube.com/embed/fcbm8SvlRYk?autoplay=1&controls=0&showinfo=0&autohide=1&loop=1"></iframe>
我是不是做错了什么? 提前致谢! :D
从您提供的 link 复制粘贴:
Note: This parameter has limited support in the AS3 player and in IFrame embeds, which could load either the AS3 or HTML5 player. Currently, the loop parameter only works in the AS3 player when used in conjunction with the playlist parameter. To loop a single video, set the loop parameter value to 1 and set the playlist parameter value to the same video ID already specified in the Player API URL
http://www.youtube.com/v/VIDEO_ID?version=3&loop=1&playlist=VIDEO_ID
试试这个 对我来说它非常有效
id="id1" src="src.abc.mp4" autoplay="true" loop="true" muted="true"
尝试使用此代码(添加播放列表参数):
<iframe frameborder="0" width="100%" height="100%" src="https://www.youtube.com/embed/fcbm8SvlRYk?autoplay=1&controls=0&playlist=fcbm8SvlRYk&showinfo=0&autohide=1&loop=1"></iframe>
您应该阅读您提供的 Google 开发人员 link 中循环参数说明中的注释:
https://developers.google.com/youtube/player_parameters#loop
注意: 此参数在 AS3 播放器和 IFrame 嵌入中的支持有限,可以加载 AS3 或 HTML5 播放器。目前,循环参数只有在与播放列表参数一起使用时才能在 AS3 播放器中使用。要循环播放单个视频,请将循环参数值设置为 1,并将播放列表参数值设置为已在播放器中指定的相同视频 ID API URL: