Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
594 views
in Technique[技术] by (71.8m points)

video - 如何使用Youtube的新嵌入代码样式自动播放视频?(How can I autoplay a video using the new embed code style for Youtube?)

I can't work out how to autoplay a video using the new embed code style for Youtube .

(我无法弄清楚如何使用Youtube新嵌入代码样式自动播放视频。)

I tried adding &autoplay=1 to the url, which worked with the old style, but it didn't work.

(我尝试将&autoplay = 1添加到url,它使用旧样式,但它不起作用。)

For example, http://www.youtube.com/embed/JW5meKfy3fY is the embed link, but http://www.youtube.com/embed/JW5meKfy3fY&autoplay=1 doesn't work.

(例如, http://www.youtube.com/embed/JW5meKfy3fY是嵌入式链接,但http://www.youtube.com/embed/JW5meKfy3fY&autoplay=1不起作用。)

Can anyone tell me how to do it?

(谁能告诉我怎么做?)

Thanks

(谢谢)

  ask by ben translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Just put "?autoplay=1" in the url the video will autoload.

(只需在网址中输入“?autoplay = 1”,视频就会自动加载。)

So your url would be: http://www.youtube.com/embed/JW5meKfy3fY?autoplay=1

(所以你的网址是: http://www.youtube.com/embed/JW5meKfy3fY?autoplay=1http://www.youtube.com/embed/JW5meKfy3fY?autoplay=1 autoplay http://www.youtube.com/embed/JW5meKfy3fY?autoplay=1)

In case you wanna disable autoplay, just make 1 to 0 as ?autoplay=0

(如果你想要禁用自动播放,只需将10设为?autoplay=0)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...