I have a certain scenario in my plugin which requires me to change location of youtube player.
I have noticed that when I change the parent which holds youtube player that the youtube api gets initialized again. Is this expected behavior and can this be prevent somehow so the player keeps original api while changing parent?
(this also happens if you set css diplay none on the player!)
I have made a simplified demo here, scroll down click on reparent once video starts playing. You can see in console that player api is created again.
I have an example here: https://jsfiddle.net/kx4cnjt0/6/
<div id="holder"></div>
<div id="holder2"></div>
<a id="rp" href="#">reparent</a>