Skip to content

Latest commit

 

History

History
67 lines (47 loc) · 2.37 KB

File metadata and controls

67 lines (47 loc) · 2.37 KB

Fullscreen Handling

A sample demonstrating how to manage fullscreen mode with OptiView Player (formerly THEOplayer), including orientation-coupled fullscreen and a custom fullscreen activity.

The app enters fullscreen when the device is rotated to landscape and supports a custom fullscreen activity with play/pause and exit controls. It uses Jetpack Compose with DefaultUI for the player UI.

PlayerActivity uses Compose with DefaultUI and enables orientation-coupled fullscreen via fullScreenManager. A CustomFullScreenActivity extends FullScreenActivity to provide custom play/pause and exit controls in fullscreen mode.

Quick Start

  1. Open this repository in Android Studio.
  2. Select the full-screen-handling run configuration.
  3. Build and run on a device or emulator.

THEOplayer dependency

This project uses THEOplayer from the official Maven repository.

The repository is declared in the project-level settings.gradle.kts:

dependencyResolutionManagement {
    repositories {
        maven { url = uri("https://maven.theoplayer.com/releases") }
    }
}

Dependencies are managed through a version catalog and declared in the module-level build.gradle.kts:

dependencies {
    implementation(libs.theoplayer)
    implementation(libs.theoplayer.ui)
}

License key

To play your own streams, add a THEOplayer license from the THEOportal in common/src/main/res/values/values.xml:

<string name="theoplayer_license">YOUR_LICENSE_HERE</string>

The license is picked up automatically via the <meta-data> tag in AndroidManifest.xml.

Streams

Video sources are defined in SourceManager.

License

This project is licensed under the BSD 3 Clause License - see the LICENSE file for details.