![](https://secure.gravatar.com/avatar/9a769c56d93d1d78a9342fed932e7a7c?rating=PG&size=50&default=https%3A%2F%2Fcdn.desk.com%2Fassets%2Funknown_user_50-8ad5644bbe6b1bd7454f2ea465f782bd.png)
Jwplayer iframe embed (event-listeners not working)
I'm embedding video using iframe. Is there a way to include player event listeners from js?
When I tried doing so, I'm getting the error jwplayer() is not a function, since the player is still not there in the dom.
For instance:
jwplayer().onPlay( function(event){
//code
});