When attempting to instantiate inside an iframe or popup window, the element can't be read, and the else block with throw new TypeError('Unexpected state.'); would be triggered.
It seems to me that it'd be a better to always attempt to play even if we can't tell if a player can be added to an element or not.
When attempting to instantiate inside an iframe or popup window, the element can't be read, and the else block with
throw new TypeError('Unexpected state.');
would be triggered.It seems to me that it'd be a better to always attempt to play even if we can't tell if a player can be added to an element or not.