Player & Add event listeners #6

Closed
kvervo opened this Issue Dec 10, 2013 · 1 comment

Projects

None yet

2 participants

@kvervo

Hi!

I am following the documentation (http://osmfhls.kutu.ru/docs/grind/) and trying work with add event listeners.

On my local version AddEventListeners are not working.

I am trying the following code from the js console in Chrome after loading the player:
var p = document.getElementById("player");
p.addEventListener("loadStateChange", function(){ alert("LoadState") });

Tried to add event listeners for: loadStateChange, playStateChange , volumeChange, mutedChange, mediaError. None of this events seem to fire.

@kutu
Owner

addEventListener(eventName:String, callbackFunctionName:String)

p.addEventListener("loadStateChange", "myFunction");
function myFunction(){ alert("LoadState") }
@kutu kutu closed this Dec 11, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment