Programmatic fullscreen control (Android)

Trigger fullscreen mode programmatically, without user interaction.


By default, fullscreen behaviour is triggered when an user taps on the fullscreen button from the Player controls.

However, fullscreen behaviour can also be triggered programatically using playerView#setFullscreen(...) method.

playerView.setFullscreen(fullscreen = true) // Enter fullscreen

playerView.setFullscreen(fullscreen = false) // Exit fullscreen

playerView.setFullscreen(fullscreen = true, orientation = Orientation.Portrait) // Enter fullscreen in portrait

By default, fullscreen orientation is landscape, but it can be changed while creating PlayerView by setting the runtime parameter  defaultFullscreenOrientation to another available value within the PlayerParameters object.

Possible values are: Landscape, ReverseLandscape, Portrait or ReversePortrait.

Check the dedicated guide to see how to use runtime parameters on the Android SDK .