【问题标题】:jPlayer video not playing in iOs - iPad and iPhonejPlayer 视频无法在 iOs 中播放 - iPad 和 iPhone
【发布时间】:2016-05-29 00:04:17
【问题描述】:

我的视频在 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">&nbsp;</div>
        <div class="jp-duration" role="timer" aria-label="duration">&nbsp;</div>
        <div class="jp-details">
          <div class="jp-title" aria-label="title">&nbsp;</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>

【问题讨论】:

    标签: javascript ios jplayer


    【解决方案1】:

    声誉不足,无法发表评论。

    媒体是否真的加载了?还是它加载但不播放?如果是后者,那么这可能是您的问题。 JQuery jPlayer autoplay not working on ipad how to show controls

    其他帖子的回答:

    您将无法从 $(document).ready() 或 jPlayer 的 ready 事件中播放视频。 IOS专门阻止它

    因为我没有 Ipad,所以无法对此进行测试,但这可能是你的问题。

    【讨论】:

      猜你喜欢
      • 2012-06-07
      • 1970-01-01
      • 1970-01-01
      • 2013-01-03
      • 2014-12-14
      • 2012-01-30
      • 1970-01-01
      • 2022-01-06
      • 1970-01-01
      相关资源
      最近更新 更多