listener - How to add an eventListener to get event data from JWPlayer -


I do not understand what code is required to output any interaction with Flash JW Player They have a code demo (resulting in addControllerListener being undefined). Some more details in

  function mute tracker (obj) {warning ('new mute state:' + obj.state); }; Player.addControllerListener ("mute", "muteTracker");  

I want to include it to track all other interactions like drama, search, fullscreen etc.

You were on the right track! If you check out, you will see that there are three ways to add listeners:

  • player.addControllerListener (EVENT, myFunction);
  • player.addModelListener (Event, Myfunction);
  • player.addViewListener (event, myFunction);

With the pair event list () and you are doing well to go, thus, if you want to listen for looking for events, something looks like this:

  player.addViewListener (ViewEvent.Play, myFunction);  

Or want,

  player.addViewListener (ViewEvent.SEEK, myFunction); 


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -