javascript - jplayer bug for iphone -


i using last version of http://jplayer.org/ on site , have problems loading on iphone thread.

page super simple.

<html> <head> <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.4.js" ></script> <script type="text/javascript" src="script/jquery.jplayer.js" ></script> <title>test iphone</title> </head> <body> test <script>     $(document).ready(function () {         $("#jquery_jplayer_1").jplayer();     });      function supersimple() {         $("#jquery_jplayer_1").jplayer("clearmedia");         $("#jquery_jplayer_1").jplayer("setmedia", { artist: "queen", mp3: "/test/examples/blue.monday/music/innuendo.mp3", title: "innuendo" });         $("#jquery_jplayer_1").jplayer("play");     }     function supersimplewithdelay() {         settimeout(function () {             $("#jquery_jplayer_1").jplayer("clearmedia");             $("#jquery_jplayer_1").jplayer("setmedia", { artist: "queen", mp3: "/test/examples/blue.monday/music/innuendo.mp3", title: "innuendo" });             $("#jquery_jplayer_1").jplayer("play");         }, 5000);     }  </script>  <div id="jquery_jplayer_1"></div> <br>     <button onclick="supersimple()"> supersimple </button><br><br>     <button onclick="supersimplewithdelay()"> supersimple delay </button><br><br> </body> </html> 

like can see there 2 buttons. both of them same simple thing - load media , play it, 2nd function use dalay function. works everywhere no on iphone.

i have have tried page http://m.musiclib.org/test/examples/blue.monday/iphone.html on few devices

  1. iphone ios 7.1.2 - doesnt work!
  2. nokia lumia 720 - works!
  3. lenovo vibe shot andrioid 5.1 - doesnt work!
  4. pc chrome / firefox / ie - works!

so question why that? me looks stop working iphone if try run player not main thread.because stop working everytime when try run player after delay, example after ajax request.

any here? can fix somehow?

duke

try

$(window).load(function(){})   

instead of document

$(document).ready(function(){}) 

Comments

Popular posts from this blog

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -