youtube_player_flutter
youtube_player_flutter copied to clipboard
Need a parameter to handle the disable/able full screen view
Please add functionality where a user can hide or show the button for a full-screen view.
Currently, it has a full-screen view button and what it does that it rotates the entire widget of the app rather that just the youtube video widget.
This can be done invoking javascript function of youtube player API...I can't find in the docs
_controller.invokeJavascript('mozCancelFullScreen()');
PS: the above code is not working
You can hide fullscreen button by settings in YoutubePlayerController params
showFullscreenButton: false
on the other hand you can use controller like below to close fullscreen:
_controller.invokeJavascript('document.exitFullscreen()');
@PcolBP can you please suggest how can we enter fullscreen in the same way?
You can not. Since some version of iframe player of youtube, youtube doesnt allow for opening full screen via script. You have to allow user to do it on his own by tapping on fullscreen button.