robnyman.github.com icon indicating copy to clipboard operation
robnyman.github.com copied to clipboard

full screen auto landscape mode

Open colax opened this issue 8 years ago • 5 comments

Hi,

first thanks for the code.

How did you make video Full Screen automatically on landscape mode? It seems isnt allowed by the browser unless you trigger a click/keydown events.

colax avatar Feb 01 '18 11:02 colax

Hi,

You can't. For security reasons, it has to be triggered by a user action.

robnyman avatar Feb 01 '18 11:02 robnyman

So how does it work in your project? Because it is full screen on landscape with no button triggered.

And how are they doing for example in Youtube website?

colax avatar Feb 02 '18 10:02 colax

Depending on mobile OS, videos in landscape - once they have started playing - will be in fullscreen mode. But that still takes the user trigger of starting the video/pressing fullscreen or similar.

robnyman avatar Feb 02 '18 13:02 robnyman

Yes, first the video needs to be played.

But anyway, I'm using android 7 in my site and yours, and yours when I switch to landscape, it starts full screen. That's why I don't get it.

Could it be the player? I'm using a custom HTML5 player from Unreal Media Server developers. In the end, it is HTML5. i thought about simulate a click or keydown but it doesnt work neither.

That's why I'm quite interested in your solution :)

colax avatar Feb 02 '18 20:02 colax

I think it's rather the default operating system, and since my code just use the basic APIs to do it. It could rather be that, as a side effect, some of the more complex players' implementation then block that native behavior.

robnyman avatar Feb 05 '18 10:02 robnyman