如何在XHTML Transitional中禁用电影的自动播放 [英] How to disable autoplay of the movie in XHTML transitional

查看:94
本文介绍了如何在XHTML Transitional中禁用电影的自动播放的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的代码

<object type="application/x-shockwave-flash" style="width:425px; height:349px;" data="multimedia/1.mp4">
<param name="movie" value="multimedia/1.mp4" />
<param name="autoplay" value="false" />
<param name="allowFullScreen" value="true" />
</object>

打开网站时,电影会自动播放.

When i open my website, the movies are automatically playing.

有什么解决方案,以便我可以在使用XHTML过渡功能的网站上禁用自动播放电影的功能?

What is the solution so i can disable the autoplay of my movies in my website that use XHTML transitional?

推荐答案

我将删除autoplay属性,因为如果浏览器找到了自动播放字符串,它将自动播放!

I'd remove the autoplay attribute, since if the browser finds the autoplay string, it autoplays!

自动播放不是布尔类型.

The autoplay is not a boolean type.

此外,类型也位于源代码内部,如下所示:

Also, the type goes inside the source, like this:

<video width="640" height="480" controls preload="none">
   <source src="http://example.com/mytestfile.mp4" type="video/mp4">
   Your browser does not support the video tag.
</video>

尝试将autostart ="false"添加到您的源代码中.

Try adding autostart="false" to your source tag.

<video width="640" height="480" controls="controls" type="video/mp4" preload="none">
<source src="http://example.com/mytestfile.mp4" autostart="false">
Your browser does not support the video tag.
</video>

JSFiddle示例

这篇关于如何在XHTML Transitional中禁用电影的自动播放的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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