Learn how to handle configuration changes and player retention for fullscreen playback in the FastPix Android Player.
By default, PlayerView retains the player instance across configuration changes (such as device rotation). This is controlled by the retainPlayerOnConfigChange property, which defaults to true.
For this to work correctly, assign an android:id to your PlayerView in the XML layout. Without an ID, the view can’t retain or recover the player instance across rotation:
Enable single-tap to toggle play/pause, which is useful for fullscreen player UIs:
This uses togglePlayPause() internally.
Call playerView.release() in onDestroy when the Activity is finishing to force a release even if retention is enabled: