How to enter fullscreen on iOS mobile Safari HTML

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Senad

I am unable to enter fullscreen in my build on mobile iOS Safari. It works fine on Android and Desktop browser.

I followed the best practices I was aware of. To toggle fullscreen immediately after the mouse down event.

I tried it on the button mouse down signal in the editor. Also directly in the _gui_input method on the Button.

Currently I just do this on every mouse down for testing:

func _input(event):
	if event is InputEventMouseButton and event.button_index == BUTTON_LEFT and event.pressed == true:
		if OS.window_fullscreen:
			texture_normal = enter_texture
			OS.window_fullscreen = false
			texture_normal = leave_texture
			OS.window_fullscreen = true

i am not sure if assigning the variable works. what did work for me was calling the method


dbu | 2021-11-17 14:37