Disable auto fullscreen of YouTube embeds on iPhone
Add playsinline=1
paramerer to the embed url. Add ?
or &
before as appropriate; ?
if the only paramerter, &
to concatenate with other params.
Example:
<iframe
src="https://www.youtube.com/v/VIDEO_ID?playsinline=1">
</iframe>
From YouTube iFrame Player API:
This parameter controls whether videos play inline or fullscreen in an HTML5 player on iOS. Valid values are: 0: This value causes fullscreen playback. This is currently the default value, though the default is subject to change. 1: This value causes inline playback for UIWebViews created with the allowsInlineMediaPlayback property set to TRUE.