Can't add event listener to embed.getPlayer()

After poking around with the example code in the docs and your code above in JS Bin, I can confirm this behavior as existing and being confusing.

It appears there’s a clear contradiction between what the docs claim you should be able to do with embed.getPlayer() and what’s possible in the browser:

console.log(player.addEventListener);
// undefined

Fwiw, the docs here don’t show an example for calling addEventListener on a player instance, but I think your usage is a reasonable expectation.

I could certainly be missing something, but this seems like a bug or is otherwise unintended behavior.

1 Like