1
我有一個視頻標籤,在Safari,Chrome中運行良好,但在iPad/iPhone上運行不正常。我做錯了什麼。html5視頻不能在iPad上播放
<a onclick="showVideoPlayer('http://www.mywebsite.com/videos/a video file.m4v')" id="video1" href="#">Play video</a>
js代碼
function showVideoPlayer(videoSrc, showDownloadLink){
alert(videoSrc);
if(!videoSrc)
return;
$('div#overlay').show();
var $videoPlaceHolder = $('div#video-placeholder');
$videoPlaceHolder.show();
var $video = $videoPlaceHolder.find('video');
var winWidth = $(window).width() - 80;
var winHeight = $(window).height() - 120;
$video.attr('src', videoSrc);
$video.attr('width', winWidth + 'px');
$video.attr('height', winHeight + 'px');
$videoPlaceHolder.append($video);
if(showDownloadLink){
$('#video-placeholder .down').show();
}
}
請您給予#video-placeholder的標記嗎? – betamax