Skip to content
Last updated

Configuring the player

The Wowza Flowplayer API

FPFlowplayer tvOS SDK exposes the same functionality and behaves as its counterpart on iOS SDK FPFlowplayerViewController. The only difference is that FPFlowplayer is not a UIViewController and does not handle any UI.

Available properties

All available properties of FPFlowplayer are included in the following table.

PropertyTypeDescription
autoStartBoolFlag that indicates if media playback should auto start when the player is ready to play.
playbackStartedBoolFlag that indicates if media playback has started.
isShowingAdsBoolFlag that indicates if the player is displaying Ads at the current moment.
currentSubtitleTrackFPSubtitleTrack?Currently selected subtitle track for the media playback.
subtitleTracks[FPSubtitleTrack]All available FPSubtitleTracks of the current FPMedia.
currentAudioTrackFPAudioTrack?Currently selected audio track for the media playback.
audioTracks[FPAudioTrack]All available FPAudioTracks of the current FPMedia.
controllerUIViewControllerUIViewController where the instance AVPlayer is attached.
playerAVPlayerCurrent AVPlayer instance that is handled by FPFlowplayer.
delegateFPFlowplayerDelegate?The object that acts as the delegate of the FPFlowplayer object.
mediaFPMedia?Current media item loaded into the player.
durationInt64Total duration of the current media item.
currentPositionInt64Current position of media playback.
currentSpeedFloatCurrent playback speed of media playback.

Available methods

All available methods of FPFlowplayer are listed in this section.

Method and description

@discardableResult
func reload() -> Bool

Reload the current media playback. This action will destroy the current session and refetch and load every asset again.

Returns

Boolean indicating if media was reloaded.



Method and description

func pause()

Pause the current media playback.



Method and description

func play()

Start or resume the current media playback. If the playback has completed, then seek back to the beginning and start again.



Method and description

func stop()

Stop the current media playback. The current media session will be terminated and cleared.



Method and description

func mute(_ state: Bool)

Mute the current media playback.

Parameters

  • state: If true, will mute the current sound of the media playback.


Method and description

func setVolume(_ volume: Float)

Set the volume of the current media playback.

Parameters

  • volume: Sound volume represented from 0.0 to 1.0.


Method and description

func seek(_ position: Int64)

Seek to the desired position of the current media playback.

Parameters

  • position: Position of media playback.


Method and description

func setSpeed(_ speed: Float)

Set the playback rate/speed ot the current media playback.

Parameters

  • speed: Speed of media playback.


Method and description

func setAudioTrack(_ id: Int)

Sets a new audio track for the media.

Parameters

  • id: The id of the track to select.


Method and description

func setSubtitleTrack(_ id: Int)

Sets a new subtitle track for the media.

Parameters

  • id: The id of the track to select.