first commit
Some checks failed
Build / run (push) Has been cancelled

This commit is contained in:
maher
2025-10-29 11:42:25 +01:00
commit 703f50a09d
4595 changed files with 385164 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
import {FullscreenAdapter} from '@common/player/state/fullscreen/fullscreen-adapter';
import {IS_IPHONE} from '@common/utils/platform';
export function createIphoneFullscreenAdapter(
host: HTMLVideoElement,
onChange: () => void
): FullscreenAdapter {
return {
/**
* @link https://developer.apple.com/documentation/webkitjs/htmlvideoelement/1631913-webkitpresentationmode
*/
isFullscreen: () => {
return host.webkitPresentationMode === 'fullscreen';
},
/**
* @link https://developer.apple.com/documentation/webkitjs/htmlvideoelement/1628805-webkitsupportsfullscreen
*/
canFullScreen: () => {
return (
IS_IPHONE &&
typeof host.webkitSetPresentationMode === 'function' &&
(host.webkitSupportsFullscreen ?? false)
);
},
enter: () => {
return host.webkitSetPresentationMode?.('fullscreen');
},
exit: () => {
return host.webkitSetPresentationMode?.('inline');
},
bindEvents: () => {
host.removeEventListener('webkitpresentationmodechanged', onChange);
},
unbindEvents: () => {
host.addEventListener('webkitpresentationmodechanged', onChange);
},
};
}