Skip to main content

PlayerConfiguration

The player configuration.

See

Player.open

Properties

metaData?

optional metaData: ContentMetaData

The content metadata.


userId?

optional userId: string

The unique identifier for the current user.


startTimeMs?

optional startTimeMs: number

The start time of the stream in milliseconds.


autoPlay

autoPlay: boolean

Set to true for playing the stream as soon as it is loaded.


source

source: Source | Source[]

The playback source.

If more than one source is available for the same content, the player will select the source best suited to the current device.

To support Chromecast, provide multiple sources for the same content. Since Chromecast doesn't support protected HLS, you must also provide a DASH source for protected content on iOS devices.


drm?

optional drm: DrmConfiguration

The DRM configuration.


remoteTextTracks?

optional remoteTextTracks: [RemoteTextTrack]

The side-loaded text tracks. Use Player.getTrackManager to select a text track.


remoteThumbnailTracks?

optional remoteThumbnailTracks: [RemoteThumbnailTrack]

The side-loaded thumbnail tracks. Use the react-native-prestoplay-thumbnails plugin to display thumbnails.


preferredTextLanguage?

optional preferredTextLanguage: string

The language code for the preferred text language. If this is specified, subtitles will be enabled at startup.


preferredAudioLanguage?

optional preferredAudioLanguage: string

The language code for the preferred audio language.


liveConfiguration?

optional liveConfiguration: LiveConfiguration

The live configuration to tweak live latency and others.


secondaryDisplayBehaviour?

optional secondaryDisplayBehaviour: SecondaryDisplayBehaviour

⚠️ Only on iOS. For Android check: AndroidPlayerConfiguration.secondaryDisplayBehaviour The behavior of the player when a secondary display is connected. Defaults to SecondaryDisplayBehaviour.Never.


nowPlaying?

optional nowPlaying: NowPlayingConfiguration

The react-native-prestoplay-now-playing plugin configuration.

This plugin allows users to control stream playback via media controls in the notification center or on the lock screen for iOS and Android.


android?

optional android: AndroidPlayerConfiguration

Player options specific to the Android platform.


apple?

optional apple: ApplePlayerConfiguration

Player options specific to iOS and tvOS platforms.


web?

optional web: WebPlayerConfiguration

Player options specific to Web platform.