Hello,

I would like to trigger custom code upon events and don't know how to hook into them.
For instance I would like to do certain things every time a movie starts playing or gets resumed from pause state.

Any hint?

Thank you

Comments

l0calh0rst’s picture

I guess I figured it out myself:

 minplayer.get('media', function(media) {
    media.bind('playing', function() {
      // do useful stuff here
    });
  });

I tried that with a "alert('test')" to see if it fires. It did. Four times in a row actually. Anything to worry about?