如何使这个视频自动播放?

时间:2014-08-22 07:42:53

标签: html video flash autoplay

我有一些html代码用于包含视频的网页。我试图找出如何在加载页面后自动播放video。这是可能的,如果是这样的话?

以下是代码:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <style type="text/css">
        body{
            margin: 0;
            padding: 0;
        }
    </style>
</head>
<body>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="letplayer" width="640" height="360" codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
    <param name="movie" value="//moevideo.net/swf/letplayer.swf?_=20082014" />
    <param name="quality" value="high" />
    <param name="allowScriptAccess" value="always" />
    <param name="allowFullScreen" value="true" />
    <param value="file=23891.2187961fd18487cc66b952ed8992" name="flashvars">
    <param name="wmode" value="opaque" />
    <embed src="//moevideo.net/swf/letplayer.swf?_=20082014"
           quality="high"
           bgcolor="#000000"
           width="640" height="360" name="letplayer"
           align="middle"
           play="true"
           loop="false"
           quality="high"
           allowFullScreen="true"
           allowScriptAccess="always"
           type="application/x-shockwave-flash"
           flashvars="file=23891.2187961fd18487cc66b952ed8992"
           name="letplayer"
           wmode="opaque"
           pluginspage="http://www.adobe.com/go/getflashplayer">
    </embed>
</object>
</body>
</html>

2 个答案:

答案 0 :(得分:1)

如果只是用Google搜索并找到了这行代码:

<embed src="...." play="true" />

答案 1 :(得分:0)

在html&#39;视频&#39; tag具有属性&#39; controls&#39; ,我们可以将其设置为&#39;自动播放&#39;

<video width="320" height="240" controls autoplay>

请参阅链接http://edvista.com/claire/qt/embedtags/

<EMBED SRC="juliana.mov" WIDTH="160" HEIGHT= "136" AUTOPLAY="TRUE">