Furqan Asghar
Furqan Asghar

Reputation: 3860

jwplayer events not working

i'm having trouble using jwplayer events to work. i have jwplayer 5.7.1896 (Licensed version) and i'm trying to use the onReady and onPlay events to send an ajax callback to my application.

Following is the code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>My InterviewLink</title>
    <script src='http://staging.myinterviewlink.com/javascripts/jwplayer/jwplayer.js'></script>
  </head>
<body>
 <div id='mediaspace'></div>
   <script type='text/javascript'>
        jwplayer('mediaspace').setup({
         autostart: false,
         allowscriptaccess: "always",
         file: 'http://c200581.r81.cf1.rackcdn.com/5a317e302f993e494ccea617c9796eeb_other_video_2.mp4',
         flashplayer: 'http://staging.myinterviewlink.com/javascripts/jwplayer/player.swf',
         'logo.file': 'http://staging.myinterviewlink.com/images/mil-bottom-logo-bottomspace.png',
         'logo.hide': false, 'logo.link': 'http://www.myinterviewlink.com/',
         image: 'http://c200581.r81.cf1.rackcdn.com/16a944899647b38dc7ab083c0299d601_other_video_2.jpg',
         skin: 'http://staging.myinterviewlink.com/javascripts/jwplayer/skins/glow.zip',
         frontcolor: 'ffffff',
         lightcolor: 'cc9900',
         screencolor: 'ffffff',
         stretching: 'exactfit',
         controlbar: 'over',
         width: '660',
         height: '380',
         events: {
        onReady: function(){alert('im ready')},
        onPlay: function(){alert('lets play')}
         }
    });
   </script>
</body>
</html>

let me know if there's something that i'm missing here?

Upvotes: 0

Views: 2794

Answers (2)

Furqan Asghar
Furqan Asghar

Reputation: 3860

i was trying to open the file in the browser from the directory as a local html file and that's what's causing the events to fail. I uploaded the page to my domain and tested it and the events worked fine.

Upvotes: 1

Dave Rottino
Dave Rottino

Reputation: 1047

Yeah, I've been having this issue too. The unlicensed player works with callbacks, but not the licensed. Gonna try contacting the creator and see what they say.

Upvotes: 0

Related Questions