Flowplayer

interface Flowplayer

Interface that serves as the foundation for the Wowza Flowplayer. It provides access to all playback states, state listeners, and public functions for the player.

Types

Link copied to clipboard

Enumeration containing all possible values for Flowplayer's playback states.

Link copied to clipboard
interface StateListener

Event listener for changes in the playback state.

Functions

Link copied to clipboard
abstract fun addEventListener(listener: EventListener)

Adds an event listener.

Link copied to clipboard
abstract fun getCurrentPosition(): Long

Returns the player's current position (in seconds).

Link copied to clipboard
abstract fun getDuration(): Long

Returns the current media's duration (in seconds).

Link copied to clipboard

Returns the player's current playback state.

Link copied to clipboard
abstract fun getUseControls(): Boolean

Returns true if the player is set to use the built-in controls. Otherwise, returns false. The default value is true.

Link copied to clipboard
abstract fun hideControls(shouldHide: Boolean)

Tells the player whether or not it should hide the built-in controls.

Link copied to clipboard
abstract fun isFullscreen(): Boolean

Returns true if the player is currently in full-screen mode. Otherwise, returns false.

Link copied to clipboard
abstract fun mute(state: Boolean)

Tells the player to mute or unmute.

Link copied to clipboard
abstract fun onPictureInPictureModeChanged(isInPictureInPictureMode: Boolean)

Handles changes in the host activity's (or fragment's) Picture-in-Picture (PiP) mode.

Link copied to clipboard
abstract fun pause()

Tells the player to pause the playback. If the player is not ready, then the playback remains paused after the player is prepared.

Link copied to clipboard
abstract fun play()

Tells the player to start the playback. If the player is not ready, then the playback starts as soon the player is prepared.

Link copied to clipboard
abstract fun prepare(media: ExternalMedia, autoStart: Boolean = true)

Prepares the player with an ExternalMedia.

abstract fun prepare(media: FlowplayerMedia, autoStart: Boolean = true)

Prepares the player with a FlowplayerMedia.

Link copied to clipboard
abstract fun reload()

If the player was previously prepared but the playback has stopped unexpectedly, calling this method prepares the player again with the previously specified video.

Link copied to clipboard
abstract fun removeEventListener(listener: EventListener)

Removes a previously added event listener.

Link copied to clipboard
abstract fun seek(position: Long)

Tells the player to seek to a new position.

Link copied to clipboard
abstract fun setAudioTrack(id: Int)

Sets a new audio track.

Link copied to clipboard

Sets optional control configurations. Build the config using PlayerControlConfig.Builder.

Link copied to clipboard
abstract fun setFullscreen(fullscreen: Boolean)

Toggles the player's full-screen state. The result is also affected by whether setFullscreenControlOrientation is set to true (default). If setFullscreenControlOrientation is set to true and setFullscreen is called, then the device's orientation automatically changes to landscape in full-screen mode and to portrait for non-fullscreen.

abstract fun setFullscreen(fullscreen: Boolean, requestedOrientation: Int?)

Toggles the player's full-screen state.

Link copied to clipboard
abstract fun setFullscreenControlOrientation(controlOrientation: Boolean)

Tells the player if toggling the full-screen state should also change the device's orientation.

Link copied to clipboard

Sets a custom FullscreenManager to dictate how full-screen mode should be handled.

Link copied to clipboard
abstract fun setMediaNotificationTapIntent(pendingIntent: PendingIntent)

Sets the android.app.PendingIntent to be triggered when a user taps on a media notification associated with the player.

Link copied to clipboard
Link copied to clipboard
abstract fun setShouldPauseOnBackground(shouldPauseOnBackground: Boolean)

Sets the behavior of the video player when the host activity is paused.

Link copied to clipboard
abstract fun setSpeed(speed: Float)

Sets a new playback speed.

Link copied to clipboard
abstract fun setSubtitleTrack(id: String)

Sets a new subtitle track.

Link copied to clipboard
abstract fun setUseControls(useControls: Boolean)

Tells the player whether or not it should use the built-in controls.

Link copied to clipboard
abstract fun setVideoTrack(level: Int)

Sets a new video track.

Link copied to clipboard
abstract fun setVolume(volume: Float)

Adjusts the volume of the player.

Link copied to clipboard
abstract fun stop()

Tells the player to stop the playback and resets the player. To start playback again, the player needs to be prepared again.