如何打开youtube视频表单加载? [英] how to open youtube video form load?

查看:476
本文介绍了如何打开youtube视频表单加载?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果您调用此页面youtube video自动启动,我想这样做有一个default.aspx启动页面。



不想点击视频开始按钮。



我该怎么办?谢谢。

I want to do like that there is a default.aspx started page if you call this page youtube video start automatically.

dont want to click video start button.

how can I do?thanks.

推荐答案

在播放器的参数中设置 autoplay = 1



示例在codeplex [ ^ ]
Set autoplay=1 in the parameters to the player.

Example at codeplex[^]


这取决于玩家。你还没有真正提到过哪种方式。

但是使用HTML5视频,可以使用autoplay属性轻松完成。



http://msdn.microsoft.com/en-us/library/ie/hh924820(v = vs.85).aspx [ ^ ]
It depends on the player. Any ways you haven't really mentioned which one are you using.
But with HTML5 video it can be done easily with autoplay attribute.

http://msdn.microsoft.com/en-us/library/ie/hh924820(v=vs.85).aspx[^]


试试这个。 。:)



HTML

try this.. :)

HTML
<iframe width="560" height="315" src="//www.youtube.com/embed/u-j1nx_HY5o" frameborder="0" allowfullscreen></iframe>



把这个脚本放在你的default.aspx上并享受它,你必须把视频的src放在你想玩的东西上。

你可以动态设置iframe的src为好吧,


put this script on your default.aspx and enjoy it, you have to put src of video what you would to like to play.
You can set src of iframe dynamically as well ,


这篇关于如何打开youtube视频表单加载?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆