I'm trying to find a way to prevent an embedded YouTube iframe from automatically going to fullscreen on mobile devices? However, I would like to be able to provide the option to the user to make it fullscreen.
At the moment, when you press play, YouTube automatically sets the video to fullscreen. I have something like the following:
self.player = new YT.Player('player', {
height: '100%',
width: '100%',
events: {
'onReady': onPlayerReady,
'onStateChange': onPlayerStateChange,
'onError': onPlayerError
}
});
I've checked the docs, and I can't find anything apart from fully disabling fullscreen.