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.

Property Type Description
autoStart Bool Flag that indicates if media playback should auto start when the player is ready to play.
playbackStarted Bool Flag that indicates if media playback has started.
isShowingAds Bool Flag that indicates if the player is displaying Ads at the current moment.
currentSubtitleTrack FPSubtitleTrack? Currently selected subtitle track for the media playback.
subtitleTracks [FPSubtitleTrack] All available FPSubtitleTracks of the current FPMedia.
currentAudioTrack FPAudioTrack? Currently selected audio track for the media playback.
audioTracks [FPAudioTrack] All available FPAudioTracks of the current FPMedia.
controller UIViewController UIViewController where the instance AVPlayer is attached.
player AVPlayer Current AVPlayer instance that is handled by FPFlowplayer.
delegate FPFlowplayerDelegate? The object that acts as the delegate of the FPFlowplayer object.
media FPMedia? Current media item loaded into the player.
duration Int64 Total duration of the current media item.
currentPosition Int64 Current position of media playback.
currentSpeed Float Current playback speed of media playback.

Available methods

All available methods of FPFlowplayer are listed in this section.

Method and description

Copy
Copied
@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

Copy
Copied
func pause()

Pause the current media playback.



Method and description

Copy
Copied
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

Copy
Copied
func stop()

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



Method and description

Copy
Copied
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

Copy
Copied
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

Copy
Copied
func seek(_ position: Int64)

Seek to the desired position of the current media playback.

Parameters

  • position : Position of media playback.


Method and description

Copy
Copied
func setSpeed(_ speed: Float)

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

Parameters

  • speed : Speed of media playback.


Method and description

Copy
Copied
func setAudioTrack(_ id: Int)

Sets a new audio track for the media.

Parameters

  • id : The id of the track to select.


Method and description

Copy
Copied
func setSubtitleTrack(_ id: Int)

Sets a new subtitle track for the media.

Parameters

  • id : The id of the track to select.