The player class will need to be able to do the following:
[x] Create a new player instance by Element. new Player(document.getElementById("movie_player"))
[x] Make the YouTube Player methods easily callable from the player instance.
[x] Player configuration are sent to the main before initializing the player.
[x] Propagate all events from the YouTube player to the player instance including working e.preventDefault() and e.stopPropagation(). The special YouTube Player addEventListener needs to be proxied including overwriting the methods in window (window.ytPlayeronStateChangeplayer_uid_207650594_477) for the preventDefault() to work.
[ ] Implement SIZE_CHANGE event and other missing events.
The event onStateChange will be split into multiple events:
The player class will need to be able to do the following:
new Player(document.getElementById("movie_player"))
e.preventDefault()
ande.stopPropagation()
. The special YouTube Player addEventListener needs to be proxied including overwriting the methods in window (window.ytPlayeronStateChangeplayer_uid_207650594_477
) for thepreventDefault()
to work.SIZE_CHANGE event andother missing events.The event
onStateChange
will be split into multiple events: