ampervue / ngJWPlayer

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

player.on("ready") #2

Closed brunosiqueira closed 8 years ago

brunosiqueira commented 8 years ago

I'm getting this error every now and then:

TypeError: player.on is not a function
at JWPlayer._renderJWPlayerElement (http://localhost:3001/bower_components/ng-jwplayer/jwplayer.js:77:20)
at JWPlayer.link (http://localhost:3001/bower_components/ng-jwplayer/jwplayer.js:112:21)
at http://localhost:3001/bower_components/angular/angular.js:9033:44
at invokeLinkFn (http://localhost:3001/bower_components/angular/angular.js:9039:9)
at nodeLinkFn (http://localhost:3001/bower_components/angular/angular.js:8533:11)
at compositeLinkFn (http://localhost:3001/bower_components/angular/angular.js:7929:13)
at compositeLinkFn (http://localhost:3001/bower_components/angular/angular.js:7932:13)
at compositeLinkFn (http://localhost:3001/bower_components/angular/angular.js:7932:13)
at publicLinkFn (http://localhost:3001/bower_components/angular/angular.js:7809:30)
at boundTranscludeFn (http://localhost:3001/bower_components/angular/angular.js:7947:16) <jwplayer ng-src="{{ streamPath }}" player-options="options" player-id="myplayer{{user.id}}" class="ng-isolate-scope">
dkarchmer commented 8 years ago

This is not enough information to debug the problem. Are you using JWPlayer Version 7? Are you properly instantiating the jwplayer?

brunosiqueira commented 8 years ago

I am using JWplayer 7. The one thing I am doing differently is that I am placing the player in a modal window. So I can open/close it many time.

Bruno Siqueira

2016-02-17 6:02 GMT+00:00 David Karchmer notifications@github.com:

This is not enough information to debug the problem. Are you using JWPlayer Version 7? Are you properly instantiating the jwplayer?

— Reply to this email directly or view it on GitHub https://github.com/ampervue/ngJWPlayer/issues/2#issuecomment-185041654.

dkarchmer commented 8 years ago

When do you get the error? At page load time? or when you open/close the modal?

dkarchmer commented 8 years ago

See if the issue2 branch fixes the problem: https://github.com/ampervue/ngJWPlayer/tree/issue2 fixes the problem. You can just download jwplayer.min.js and test it

dkarchmer commented 8 years ago

No more action on this issue. Closing

liffeyd commented 7 years ago

This is an issue. There is no function "on" on jwPlayer. Should it be player.onPlay (line 78) and player.onError (line 84) ?