1

I was testing a solution of preventing users skipping forward on JWPlayer 6.10 (the solution can be found in this thread https://stackoverflow.com/a/11766073/616453).

The onSeek function got called on firefox/chrome on laptop and chrome on Android. But it didn't get called on ios 8.4 native player.

Would anyone help me on this? I thought JWPlayer 5 had some issue with ios and JWPlayer 6 doesn't have the issue? Is there any config option that doesn't work well with ios? Thanks.

Please find below html and javascript I used for the demo:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
<meta http-equiv="Content-Type" content="text/html">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script type="text/javascript" src="http://p.jwpcdn.com/6/10/jwplayer.js"></script>
<!--
<script type="text/javascript" src="./js/jwplayer.js"></script>
<script type="text/javascript" src="./js/jwplayer.html5.js"></script>
-->
<script type="text/javascript" src="./js/test.js"></script>
<title>Test JWPlayer</title>
<style>
h3 {
    color: #101010;
    font-family: Helvetica, Arial, sans-serif;
    margin: 20px;
    font-size: 20px;
}

.container {
    position: relative;
}

</style>
<script>
$(document).ready(function(){
    $(".test_button").click(func);
});
</script>
</head>
<body>
<h3>JWPlayer Test</h3>
<button type="button" class="test_button">Click to show video</button>
<div class="container">
    <div class="metaplayer">
        <div id='target'></div>
    </div>
    <div id='searchbar'></div>
    <div id='transcript'></div>
</div>
</body>
</html>

Following is javascript code

var func = function () {
     var jwp, video, player;
     jwp = jwplayer('target').setup({
         controls: true, // v6
         width: "600",
         height: "300",
         autostart: true,
         file: "http://nimbus.c9w.net/files/nfiles/hulu-brand/hulu-brand-summer-keepup_640x360_440kbps_0dB.mp4"

     });

    var maxPlayPosition = 0.0;
    var seeking = false;

    jwp.onTime(function(event) 
    {
        if (!seeking) 
        {
            maxPlayPosition = Math.max(event.position, maxPlayPosition); 
        }
    });
    jwp.onSeek(function (event) 
    {
        if (!seeking) 
        {
            if (event.offset > maxPlayPosition) 
            {
                seeking = true;
                setTimeout(function ()
                {  
                   jwp.seek(maxPlayPosition);
                }, 100);
            }
        } 
        else 
        {
            seeking = false;
        }   
     });
}
Community
  • 1
  • 1
yfeng
  • 61
  • 5
  • Do you have a link to where you are running this? Have you tried to use 6.12? – emaxsaun Aug 19 '15 at 14:21
  • Thank you @EthanJWPlayer, I just tried 6.12 and onSeek still not being fired. I'm testing this only on my local computer. The above html/javascript is all I use. You can put it on any nginx to see the issue. – yfeng Aug 19 '15 at 17:51
  • @EthanJWPlayer , the onTime get fired successfully – yfeng Aug 19 '15 at 18:49
  • Try to remove the following, it is for jw5 - icons: false, // disable a big play button on the middle of screen plugins: { viral: { onpause: false, oncomplete: false, allowmenu: false } }, // disable all viral features. – emaxsaun Aug 20 '15 at 20:13
  • @EthanJWPlayer, I removed the part you mentioned and onSeek was still not being fired – yfeng Aug 20 '15 at 22:49
  • Hm, can you put a test page up somewhere? It might work if you to deploy it. – emaxsaun Aug 21 '15 at 00:07

0 Answers0