如何在HTML中启用自动播放.h264视频 [英] How to enable autoplay .h264 video in html

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

问题描述

我正在尝试获取h.264视频以在Qualtrics中自动播放.这是视频的HTML代码(我已从代码中删除了源代码).

I am trying to get a h.264 video to autoplay in Qualtrics. Here is the HTML code for the video (I've removed the source from the code).

<video class="qmedia" controls="true" height="480" preload="auto" width="640"><source src="blah" type="video/mp4" /><embed align="middle" autoplay="true" bgcolor="white" class="qmedia" controller="true" height="480" pluginspage="http://www.apple.com/quicktime/download/" src="blah" type="video/quicktime" width="640" /></video>

我尝试过autoplay ="true"和autoplay ="autoplay"并添加<视频自动播放>到代码末尾.这些都没有导致视频自动播放.有谁知道如何在HTML中启用它?

I've tried autoplay ="true" and autoplay ="autoplay" and adding < video autoplay> to the end of the code. None of these have caused the video to autoplay. Does anyone know how to enable this in the HTML?

推荐答案

自动播放和控件(如果存在)都是正确的,无需将它们设置为相等.以下内容在我的测试中工作正常:

autoplay and controls are both just true if they exist, no need to set them equal to anything. The following worked fine in my test:

<video class="qmedia" controls autoplay height="480" preload="auto" width="640">
<source src="blah.mp4" type="video/mp4" />
<embed align="middle" autoplay="true" bgcolor="white" class="qmedia" controller="true" height="480" pluginspage="http://www.apple.com/quicktime/download/" src="blah.mov" type="video/quicktime" width="640" />
</video>

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

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