与Android HTML5视频播放犯规 [英] HTML5 video doesnt play with android
本文介绍了与Android HTML5视频播放犯规的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有以下的HTML code:
I have got the following html code:
<span id="video-teaser">
<span>Click here for a <strong>FREE</strong> hot video</span>
<video src="http://example.com/videos/nakednews.mp4" controls="" poster="http://example.com//img/iphone-video-btn.png" id="videoTeaser" height="1"></video>
</span>
我试着拿出两个解决方案..采用javascript addlistener..and触发视频的时候是pressed。
I tried to come up with two solutions.. use javascript addlistener..and trigger the video when it is pressed.
<script type="text/javascript">
var video = document.getElementById('videoTeaser');
var elementToTrigger=document.getElementById('video-teaser');
elementToTrigger.addEventListener('click',function(){
video.play();
},false);
</script>
这两个解决方案不工作..视频本身的工作原理,当我点击视频传情跨度,在该网站的PC版。
Both of the solutions dont work.. the video itself works when I click on the video-teaser span, on the pc version of the site..
有什么能解决这个..
What could be the solution to this..
推荐答案
尝试在SVN链接中给出的code处的 HTTP://$c$c.google.com/p/html5webview/source/checkout 的正常工作
try the code given at svn link at http://code.google.com/p/html5webview/source/checkout it works fine
这篇关于与Android HTML5视频播放犯规的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文