How to enable autoplay .h264 video in html

主宰稳场 提交于 2019-12-13 03:50:56

问题


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>

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?


回答1:


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>


来源:https://stackoverflow.com/questions/46959212/how-to-enable-autoplay-h264-video-in-html

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!