import DrmConfiguration from './DrmConfiguration'; import RemoteThumbnailTrack from './RemoteThumbnailTrack'; import RemoteTextTrack from './RemoteTextTrack'; import Source from './Source'; import AndroidPlayerConfiguration from './AndroidPlayerConfiguration'; import ApplePlayerConfiguration from './ApplePlayerConfiguration'; import LiveConfiguration from './LiveConfiguration'; import SecondaryDisplayBehaviour from './SecondaryDisplayBehaviour'; import NowPlayingConfiguration from './NowPlayingConfiguration'; import ContentMetaData from './ContentMetaData'; import WebPlayerConfiguration from './WebPlayerConfiguration'; /** * The player configuration. * * @see {@link Player.open} * @group Interfaces */ export default interface PlayerConfiguration { /** * The content metadata. */ metaData?: ContentMetaData; /** * The unique identifier for the current user. */ userId?: string; /** * The start time of the stream in milliseconds. */ startTimeMs?: number; /** * Set to `true` for playing the stream as soon as it is loaded. */ autoPlay: boolean; /** * 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. */ source: Source | Source[]; /** * The DRM configuration. */ drm?: DrmConfiguration; /** * The side-loaded text tracks. * Use {@link Player.getTrackManager} to select a text track. */ remoteTextTracks?: [RemoteTextTrack]; /** * The side-loaded thumbnail tracks. * Use the `react-native-prestoplay-thumbnails` plugin to display thumbnails. */ remoteThumbnailTracks?: [RemoteThumbnailTrack]; /** * The language code for the preferred text language. * If this is specified, subtitles will be enabled at startup. */ preferredTextLanguage?: string; /** * The language code for the preferred audio language. */ preferredAudioLanguage?: string; /** * The live configuration to tweak live latency and others. */ liveConfiguration?: LiveConfiguration; /** * ⚠️ Only on iOS. For Android check: {@link AndroidPlayerConfiguration}.secondaryDisplayBehaviour * The behavior of the player when a secondary display is connected. * Defaults to {@link SecondaryDisplayBehaviour.Never}. */ secondaryDisplayBehaviour?: SecondaryDisplayBehaviour; /** * 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. */ nowPlaying?: NowPlayingConfiguration; /** * Player options specific to the Android platform. */ android?: AndroidPlayerConfiguration; /** * Player options specific to iOS and tvOS platforms. */ apple?: ApplePlayerConfiguration; /** * Player options specific to Web platform. */ web?: WebPlayerConfiguration; /** * When Youburoplugin is enabled * @type YouboraMetadata */ youbora?: unknown; }