Fixed official yt embed player destruction
This commit is contained in:
parent
473b54356e
commit
e4bebce431
|
|
@ -376,10 +376,13 @@ class youtubeEmbedHandler extends mediaHandler{
|
|||
this.video.destroy();
|
||||
}
|
||||
|
||||
//Check the f̶r̶i̶d̶g̶e video container for leftovers
|
||||
const leftovers = this.player.videoContainer.querySelector("#youtube-embed-player");
|
||||
|
||||
//If we have any leftovers
|
||||
if(this.iframe != null){
|
||||
if(leftovers != null){
|
||||
//Nukem like last nights chicken
|
||||
iframe.remove();
|
||||
leftovers.remove();
|
||||
}
|
||||
|
||||
//Call derived destroy function
|
||||
|
|
|
|||
Loading…
Reference in a new issue