我的视频在PC和Mac的所有浏览器中播放 - Chrome,Firefox,IE和Safari以及Android平板电脑和手机。但是,它不能在iPad或iPhone上播放。我正在使用iOS 9.2测试iPad mini2。
但是当我将iPad与我的电脑同步并在iPad视频应用中播放视频时,它就会播放。所以这似乎是JPlayer的一个问题。
以下是我使用的代码:
<script type="text/javascript">
$(document).ready(function () {
$("#jquery_jplayer_1").jPlayer({
ready: function () {
$(this).jPlayer("setMedia", {
title: "POPPI-Introduction",
m4v: "/Video/POPPI-Introduction.m4v",
ogv: "/Video/POPPI-Introduction.ogv",
webmv: "/Video/POPPI-Introduction.webm"
});
},
cssSelectorAncestor: "#jp_container_1",
size: {
width: "640px",
height: "360px",
cssClass: "jp-video-360p"
},
swfPath: "/Content/scripts",
supplied: "m4v, ogv, webmv",
useStateClassSkin: true,
autoBlur: false,
smoothPlayBar: true,
keyEnabled: true,
remainingDuration: true,
toggleDuration: true
});
});
</script>
<div id="jp_container_1" class="jp-video " role="application" aria-label="media player">
<div class="jp-type-single">
<div id="jquery_jplayer_1" class="jp-jplayer"></div>
<div class="jp-gui">
<div class="jp-video-play">
<button class="jp-video-play-icon" role="button" tabindex="0">play</button>
</div>
<div class="jp-interface">
<div class="jp-progress">
<div class="jp-seek-bar">
<div class="jp-play-bar"></div>
</div>
</div>
<div class="jp-current-time" role="timer" aria-label="time"> </div>
<div class="jp-duration" role="timer" aria-label="duration"> </div>
<div class="jp-details">
<div class="jp-title" aria-label="title"> </div>
</div>
<div class="jp-controls-holder">
<div class="jp-volume-controls">
<button class="jp-mute" role="button" tabindex="0">mute</button>
<button class="jp-volume-max" role="button" tabindex="0">max volume</button>
<div class="jp-volume-bar">
<div class="jp-volume-bar-value"></div>
</div>
</div>
<div class="jp-controls">
<button class="jp-play" role="button" tabindex="0">play</button>
<button class="jp-stop" role="button" tabindex="0">stop</button>
</div>
<div class="jp-toggles">
<button class="jp-repeat" role="button" tabindex="0">repeat</button>
<button class="jp-full-screen" role="button" tabindex="0">full screen</button>
</div>
</div>
</div>
</div>
<div class="jp-no-solution">
<span>Update Required</span>
To play the media you will need to either update your browser to a recent version or update your <a href="http://get.adobe.com/flashplayer/" target="_blank">Flash plugin</a>.
</div>
</div>
</div>
答案 0 :(得分:0)
评论的声誉不足。
媒体是否实际加载了?或者它加载但只是不玩?如果是后者那么这可能是你的问题。 JQuery jPlayer autoplay not working on ipad how to show controls
来自其他主题的回答:
您无法从$(document).ready()或jPlayer的ready事件播放视频。 IOS专门阻止它
我无法测试这个,因为我没有Ipad,但这可能是你的问题。