From 3240301f27a86b7a68b942caea7b6471884fa426 Mon Sep 17 00:00:00 2001 From: Alexey Khit Date: Fri, 3 Feb 2023 11:41:17 +0300 Subject: [PATCH] Fix autofullscreen with MP4 for iPhones --- www/video-rtc.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/www/video-rtc.js b/www/video-rtc.js index e7534b30..1becffdf 100644 --- a/www/video-rtc.js +++ b/www/video-rtc.js @@ -11,6 +11,7 @@ * - MediaSource for Safari iOS all * - Customized built-in elements (extends HTMLVideoElement) because all Safari * - Public class fields because old Safari (before 14.0) + * - Autoplay for Safari */ export class VideoRTC extends HTMLElement { constructor() { @@ -558,6 +559,7 @@ export class VideoRTC extends HTMLElement { /** @type {HTMLVideoElement} */ const video2 = document.createElement("video"); video2.autoplay = true; + video2.playsInline = true; video2.muted = true; video2.addEventListener("loadeddata", ev => {