如果我这样做
<div id="player"> </div> <--DIV will replaced by Youtube iframe-->
<video id="movie" src="http://www.w3schools.com/tags/movie.mp4"/>
<script> player = new YT.Player('player',
.......youtube Iframe APi code </script>
function play() {
player.playVideo();
}
function play2() {
var movie= document.getElementById("movie");
movie.play();
}
<script>
document.addEventListener('touchstart', play, false);
document.addEventListener('click', play, false);
document.addEventListener('touchstart', play2, false);
document.addEventListener('click', play2, false);
</script>
两个视频在PC浏览器中运行良好,但只能在iPad上播放视频标签。我该如何解决这个问题?