I'm using projekktor for streaming my videos on browsers. I have many listeners attached on the event state
.
video.addListener('state', listener1);
video.addListener('state', listener2);
video.addListener('state', listener3);
Inside the function listener3 and when state === 'COMPLETED'
I need to remove the listener listener3
. The thing is that to remove a listener you need the variable video.
Given that listener3 is a callback, How do I pass the variable video to the function listener3?