问题
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