HTML5 Video autoplay works not properly (sound only) in Chrome

一曲冷凌霜 提交于 2019-12-11 02:46:14

问题


I have a HTML5-Video on my page with a webm and a mp4 sourcefile. The video player works in Firefox and Chrome when using the controls and clicking the play button. When I add the autoplay="autoplay" attribute to the video autoplay is working in firefox but Chrome is just showing the poster and plays the sound. When clicking the play button in Chrome the video plays but then the sound is playing two times.

I also tried to remove the autoplay attribute and force the autoplay via jQuery with this:

$(document).ready(function () {
   $('.movie')[0].play();
});

but that didn't help.

Anyone had the same problem and knows a working solution?

来源:https://stackoverflow.com/questions/24627348/html5-video-autoplay-works-not-properly-sound-only-in-chrome

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