youtube_player_flutter icon indicating copy to clipboard operation
youtube_player_flutter copied to clipboard

[iFrame package] how to enter fullscreen

Open jimmyff opened this issue 4 years ago • 5 comments

Thank you for the iframe, seems great so far.

However I cannot find how to switch to fullscreen mode programatically. I see in the example you have omitted the fullscreen button also. Is this not possible?

I know that you can set the param to show the button on the player, but to be able to trigger this from outside the player.

jimmyff avatar Aug 26 '20 11:08 jimmyff

Any solution to this? I have the same problem. I can't even press on the button as it is under the YT video name.

Please let me know if you have a workaround or tips.

bottle-rocket-11 avatar Feb 11 '21 19:02 bottle-rocket-11

I'm having the same problem. Anyone?

lucassampaio-pixelwolf avatar Sep 28 '21 00:09 lucassampaio-pixelwolf

Would be a nice feature to programatically enter fullscreen, when user switches to landscape mode.

pawangjain avatar Nov 30 '21 05:11 pawangjain

any update on this I cannot find how to switch to fullscreen mode programatically i am trying invoke javascript function but it is not working

jaskiratAtNexG avatar Jun 01 '22 06:06 jaskiratAtNexG

@jimmyff @hugopretorius914 @pawangjain @lucassampaio-pixelwolf yall can use this I just figured it out _controller.invokeJavascript('document.body.requestFullscreen()'); and close this issue as soon as possible

jaskiratAtNexG avatar Jun 01 '22 07:06 jaskiratAtNexG

_controller.invokeJavascript('document.body.requestFullscreen()');

Hello @jaskiratAtNexG

Below is the error log when i run your code on button press.

[log] Failed to execute 'requestFullscreen' on 'Element': API can only be initiated by a user gesture. [log] Uncaught (in promise) TypeError: fullscreen error

Is there anything i am doing wrong or missing?

pawangjain avatar Nov 21 '22 13:11 pawangjain