Added type check to interrupt writing the player if it's the same type. Added stopVideo and pauseVideo to the setPlayerType, which will hopefully fix the issue with the delay.