Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fullscreen on Safari iOS #669

Open
thomaslochet opened this issue Nov 9, 2024 · 6 comments
Open

Fullscreen on Safari iOS #669

thomaslochet opened this issue Nov 9, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@thomaslochet
Copy link

Kyoo's version

v4.7.0

What happened?

The fullscreen button does not work on Safari iOS :(

@thomaslochet thomaslochet added the bug Something isn't working label Nov 9, 2024
@zoriya
Copy link
Owner

zoriya commented Nov 10, 2024

I unfortunately don't own an ios device to test this. Could you send the console logs/error of the browser?

@felipemarinho97
Copy link
Contributor

felipemarinho97 commented Nov 22, 2024

Thats what I got from Safari Mobile on iOS 17 Simulator via MacOS

[Error] TypeError: document.body.requestFullscreen is not a function. (In 'document.body.requestFullscreen({navigationUI:"hide"})', 'document.body.requestFullscreen' is undefined)
(anonymous function) — _app-a52ebceb2ec88a05.js:20:114379
(anonymous function) — _app-a52ebceb2ec88a05.js:20:114582
(anonymous function) — _app-a52ebceb2ec88a05.js:20:114583
f — _app-a52ebceb2ec88a05.js:24:35507
(anonymous function) — _app-a52ebceb2ec88a05.js:20:141547
uI — framework-2880adef1ccdc07d.js:9:84056
oU — framework-2880adef1ccdc07d.js:9:113103
oC — framework-2880adef1ccdc07d.js:9:95922
r8 — framework-2880adef1ccdc07d.js:9:44813
(anonymous function) — framework-2880adef1ccdc07d.js:9:111549
oI — framework-2880adef1ccdc07d.js:9:111553
oS — framework-2880adef1ccdc07d.js:9:94925
x — framework-2880adef1ccdc07d.js:17:1366
T — framework-2880adef1ccdc07d.js:17:1896

	(anonymous function) (_app-a52ebceb2ec88a05.js:20:114577)
	(anonymous function) (_app-a52ebceb2ec88a05.js:20:114582)
	(anonymous function) (_app-a52ebceb2ec88a05.js:20:114583)
	f (_app-a52ebceb2ec88a05.js:24:35507)
	(anonymous function) (_app-a52ebceb2ec88a05.js:20:141547)
	uI (framework-2880adef1ccdc07d.js:9:84056)
	oU (framework-2880adef1ccdc07d.js:9:113103)
	oC (framework-2880adef1ccdc07d.js:9:95922)
	r8 (framework-2880adef1ccdc07d.js:9:44813)
	(anonymous function) (framework-2880adef1ccdc07d.js:9:111549)
	oI (framework-2880adef1ccdc07d.js:9:111553)
	oS (framework-2880adef1ccdc07d.js:9:94925)
	x (framework-2880adef1ccdc07d.js:17:1366)
	T (framework-2880adef1ccdc07d.js:17:1896)

Those 2 methods are defined and working:

 document.querySelector('video').webkitEnterFullscreen()
 document.querySelector("video").webkitEnterFullScreen();

Sources from my research into this issue:

@zoriya
Copy link
Owner

zoriya commented Nov 22, 2024

oh yeah, i missed that:
image

from what i gathered, you can't put elements on fullscreen on ios? you can make videos fullscreen on ipad but no other containers & it doesn't work on mobile?

the only solution i can see would be to just disable the fullscreen button on ios.
for ipads, we could put the video element on fullscreen but it would prevent subtitles & controls from showing so idk if that makes sense to offer this

@felipemarinho97
Copy link
Contributor

felipemarinho97 commented Nov 22, 2024

If I call document.querySelector('video').webkitEnterFullscreen() from developer console I can enter fullscreen.
But it's using the default player from Safari. Subtitles and controls (play/pause, forward and back) are ok. And there is no quality controls.
I can exit fullscreen also from the default player.
Screenshot 2024-11-22 at 14 21 46

Edit: quality controls are not working because transcoding is not working:

{errors: ["no level with compatible codecs found in manifest"]}

I can only play Pristine mode.

@zoriya
Copy link
Owner

zoriya commented Nov 22, 2024

Okay let's use that then! Should be better than no fullscreen at all.

That means ios fullscreen can't change quality or display ass subtitles nor pgs w/ #335 (after the web player rework i'll do for TheWidlarzGroup/react-native-video#2719 we should be abble to display ass subtitles without styling tho).

@felipemarinho97 do you want to do the PR? I think the simplest fix would be something like

if (!document.body.requestFullscreen)
	document.body.requestFullscreen = webkitEnterFullscreen;

in a web only polyfill file

@zoriya
Copy link
Owner

zoriya commented Nov 22, 2024

the transcode error might be worth investigating also

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants