brandly / angular-youtube-embed

:tv: Embed a YouTube player with a simple directive
http://brandly.github.io/angular-youtube-embed/
MIT License
510 stars 147 forks source link

Fix(Memory Leak) #159

Open Millsky opened 7 years ago

Millsky commented 7 years ago

Used Youtube API's eventListener Bindings to reduce memory leak. Previously the entire scope of the angular application would not get garbage collected when events were bound during instantiation of the player object. Switching to the API .addEventListener fixed this issue.

https://developers.google.com/youtube/iframe_api_reference