Jplayer error for iphone

I am using the latest version of http://jplayer.org/ on my website and have problems downloading it to iphone from the stream.

The page is very 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 with delay </button><br><br>
</body>
</html>

As you can see, there are two buttons. Both of them perform the same simple thing - load media and play them, but the 2nd function uses the dalay function. It works everywhere, but not on iphone.

I tried this page http://m.musiclib.org/test/examples/blue.monday/iphone.html on multiple devices

  • Iphone with ios 7.1.2 - doesn't work!
  • nokia lumia 720 - works!
  • Lenovo Vibe Shot with Andrioid 5.1 - Doesn't Work!
  • pc chrome / firefox / IE - works!

, : ? , iphone, . , , , ajax.

? ?

+4
1

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

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

Source: https://habr.com/ru/post/1612792/


All Articles