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>
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>
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..
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…