FlowplayerSupportFragment

class FlowplayerSupportFragment : Fragment, PlayerFragment

A simple way of adding Wowza Flowplayer to an Android application. This fragment is a wrapper around FlowplayerView and automatically handles lifecycle events and orientation changes. It extends the support library's Fragment. Therefore, it's assumed that the container activity inherits (directly or indirectly) from AppCompatActivity.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open override fun getPlayer(): Flowplayer

Returns the instance of Flowplayer that is used in this fragment.

Link copied to clipboard
open override fun getPlayerView(): FlowplayerView

Returns the FlowplayerView hosted in this Fragment. Useful if you need a direct reference to the actual view containing the player, for example when setting up a Picture-in-Picture activity through trackPipAnimationHintView

Link copied to clipboard
open override fun onPictureInPictureModeChanged(isInPictureInPictureMode: Boolean)

Default implementation that notifies the player about PiP changes. If you need to detect PiP changes, you should override this method, but ensure to always call the super() implementation in your overridden method.

Link copied to clipboard
open override fun setForceFullscreenOnLandscape(forceFullscreenOnLandscape: Boolean)

If set to true, the player will automatically enter fullscreen whenever the device is rotated to landscape and it will exit from fullscreen when the device is rotated to portrait. This will also set FlowplayerView.setFullscreenControlOrientation to true.