ampervue / ngJWPlayer

Angular directives to instanciate a jwPlayer
MIT License
12 stars 6 forks source link

Events #7

Closed chrwdev closed 8 years ago

chrwdev commented 8 years ago

Hi, this directive handles events? (Play, Pause, Complete)

Example (not working) jwplayer( 'play_video' ).on('pause', function() { console.log( 'pause' ); });

Thanks!

chrwdev commented 8 years ago

Solved!

$scope.$on('ng-jwplayer-ready', function(event, args) { var player = jwplayerService.myPlayer[args.playerId]; player.on('pause', function() { console.log( 'pause' ); }); });