From bb3c6d765c5b1ef7582488cf8e236a37a172fa5b Mon Sep 17 00:00:00 2001 From: Felix Zapata Date: Wed, 5 Dec 2018 11:35:27 +0100 Subject: [PATCH] fix(google-youtube.html): add attached function to check player object --- google-youtube.html | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/google-youtube.html b/google-youtube.html index e584999..c5cb9bc 100755 --- a/google-youtube.html +++ b/google-youtube.html @@ -510,6 +510,17 @@ } }, + /** + * When the component is attached, we check if we had the player object. + * If we have it, it means that previously it has been "destroyed" due to the detached function. + * So, we call manually the _apiLoad function + */ + attached: function() { + if(this._player) { + this._apiLoad(); + } + }, + /** * Clean up the underlying Player `