【问题标题】:JW player play/pause not working instead a setTimeout only in Safari on IpadJW 播放器播放/暂停不起作用,而是仅在 Ipad 上的 Safari 中使用 setTimeout
【发布时间】:2013-08-08 17:44:54
【问题描述】:

所以只有在 ipad 上的 safari 中,我才遇到播放/暂停没有在 setTimeout 内触发的问题。这适用于所有浏览器,甚至适用于 PC 和 Mac 上的 safari,但不适用于 ipad。如果我使用 setTimeout,它可以工作,但我需要 setTimeout。 这是 JWPlayer 5.9.2156

jwplayer("Container").setup({
   events: {
   onBeforePlay: function () {                
       jwplayer("Container").pause('true');
       if(tOut) {
          clearTimeout(tOut);
          tOut = null;
       }
       var tOut = setTimeout($.proxy(function () {
           jwplayer("Container").pause("false"); //this doesnt happen
           console.log("this happens");
       }.bind(this), this), 1000);
    },
    onPause: function (e) {
      //this isnt firing
      console.log("OnPause fired: "+e.oldstate);
    }
...

【问题讨论】:

  • 你能提供一个链接吗?
  • 这是给工作的,所以我无法根据工作政策将您链接到任何内容 - 很遗憾。
  • 啊,好的,我明白了。

标签: ipad safari settimeout jwplayer


【解决方案1】:

虽然乍一看这可能不在同一个主题上,但此处给出的公认答案也适用于这种情况。

HTML5 audio object doesn't play on iPad (when called from a setTimeout)

【讨论】:

  • 谢谢,很有帮助。
猜你喜欢
  • 2014-04-01
  • 1970-01-01
  • 2012-02-08
  • 2018-08-16
  • 2012-06-23
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多