PlayerView component props.

interface PlayerViewProps {
    config?: PlayerViewConfig;
    customMessageHandler?: CustomMessageHandler;
    fullscreenHandler?: FullscreenHandler;
    isFullscreenRequested?: Boolean;
    isPictureInPictureRequested?: Boolean;
    onAdBreakFinished?: ((event) => void);
    onAdBreakStarted?: ((event) => void);
    onAdClicked?: ((event) => void);
    onAdError?: ((event) => void);
    onAdFinished?: ((event) => void);
    onAdManifestLoad?: ((event) => void);
    onAdManifestLoaded?: ((event) => void);
    onAdQuartile?: ((event) => void);
    onAdScheduled?: ((event) => void);
    onAdSkipped?: ((event) => void);
    onAdStarted?: ((event) => void);
    onAudioAdded?: ((event) => void);
    onAudioChanged?: ((event) => void);
    onAudioRemoved?: ((event) => void);
    onCastAvailable?: ((event) => void);
    onCastPaused?: ((event) => void);
    onCastPlaybackFinished?: ((event) => void);
    onCastPlaying?: ((event) => void);
    onCastStart?: ((event) => void);
    onCastStarted?: ((event) => void);
    onCastStopped?: ((event) => void);
    onCastTimeUpdated?: ((event) => void);
    onCastWaitingForDevice?: ((event) => void);
    onCueEnter?: ((event) => void);
    onCueExit?: ((event) => void);
    onDestroy?: ((event) => void);
    onDownloadFinished?: ((event) => void);
    onEvent?: ((event) => void);
    onFullscreenDisabled?: ((event) => void);
    onFullscreenEnabled?: ((event) => void);
    onFullscreenEnter?: ((event) => void);
    onFullscreenExit?: ((event) => void);
    onMuted?: ((event) => void);
    onPaused?: ((event) => void);
    onPictureInPictureAvailabilityChanged?: ((event) => void);
    onPictureInPictureEnter?: ((event) => void);
    onPictureInPictureEntered?: ((event) => void);
    onPictureInPictureExit?: ((event) => void);
    onPictureInPictureExited?: ((event) => void);
    onPlay?: ((event) => void);
    onPlaybackFinished?: ((event) => void);
    onPlaybackSpeedChanged?: ((event) => void);
    onPlayerActive?: ((event) => void);
    onPlayerError?: ((event) => void);
    onPlayerWarning?: ((event) => void);
    onPlaying?: ((event) => void);
    onReady?: ((event) => void);
    onSeek?: ((event) => void);
    onSeeked?: ((event) => void);
    onSourceError?: ((event) => void);
    onSourceLoad?: ((event) => void);
    onSourceLoaded?: ((event) => void);
    onSourceUnloaded?: ((event) => void);
    onSourceWarning?: ((event) => void);
    onStallEnded?: ((event) => void);
    onStallStarted?: ((event) => void);
    onSubtitleAdded?: ((event) => void);
    onSubtitleChanged?: ((event) => void);
    onSubtitleRemoved?: ((event) => void);
    onTimeChanged?: ((event) => void);
    onTimeShift?: ((event) => void);
    onTimeShifted?: ((event) => void);
    onUnmuted?: ((event) => void);
    onVideoDownloadQualityChanged?: ((event) => void);
    onVideoPlaybackQualityChanged?: ((event) => void);
    player: Player;
    scalingMode?: ScalingMode;
    style?: ViewStyle;
    viewRef?: MutableRefObject<null>;
}

Hierarchy (view full)

Properties

Configures the visual presentation and behaviour of the PlayerView. The value must not be altered after setting it initially.

customMessageHandler?: CustomMessageHandler

The CustomMessageHandler that can be used to directly communicate with the embedded Bitmovin Web UI.

fullscreenHandler?: FullscreenHandler

The FullscreenHandler that is used by the PlayerView to control the fullscreen mode.

isFullscreenRequested?: Boolean

Can be set to true to request fullscreen mode, or false to request exit of fullscreen mode. Should not be used to get the current fullscreen state. Use PlayerViewEvents.onFullscreenEnter and PlayerViewEvents.onFullscreenExit or the FullscreenHandler.isFullscreenActive property to get the current state. Using this property to change the fullscreen state, it is ensured that the embedded Player UI is also aware of potential fullscreen state changes. To use this property, a FullscreenHandler must be set.

isPictureInPictureRequested?: Boolean

Can be set to true to request Picture in Picture mode, or false to request exit of Picture in Picture mode. Should not be used to get the current Picture in Picture state. Use PlayerViewEvents.onPictureInPictureEnter and PlayerViewEvents.onPictureInPictureExit.

onAdBreakFinished?: ((event) => void)

Event emitted when an ad break has finished.

Type declaration

onAdBreakStarted?: ((event) => void)

Event emitted when an ad break has started.

Type declaration

onAdClicked?: ((event) => void)

Event emitted when an ad has been clicked.

Type declaration

onAdError?: ((event) => void)

Event emitted when an ad error has occurred.

Type declaration

onAdFinished?: ((event) => void)

Event emitted when an ad has finished.

Type declaration

onAdManifestLoad?: ((event) => void)

Event emitted when an ad manifest starts loading.

Type declaration

onAdManifestLoaded?: ((event) => void)

Event emitted when an ad manifest has been loaded.

Type declaration

onAdQuartile?: ((event) => void)

Event emitted when an ad quartile has been reached.

Type declaration

onAdScheduled?: ((event) => void)

Event emitted when an ad has been scheduled.

Type declaration

onAdSkipped?: ((event) => void)

Event emitted when an ad has been skipped.

Type declaration

onAdStarted?: ((event) => void)

Event emitted when an ad has started.

Type declaration

onAudioAdded?: ((event) => void)

Event emitted when a new audio track is added to the player.

Type declaration

onAudioChanged?: ((event) => void)

Event emitted when the player's selected audio track has changed.

Type declaration

onAudioRemoved?: ((event) => void)

Event emitted when an audio track is removed from the player.

Type declaration

onCastAvailable?: ((event) => void)

Event emitted when casting to a cast-compatible device is available.

Type declaration

Platform

iOS, Android

onCastPaused?: ((event) => void)

Event emitted when the playback on a cast-compatible device was paused.

Type declaration

Platform

iOS, Android

onCastPlaybackFinished?: ((event) => void)

Event emitted when the playback on a cast-compatible device has finished.

Type declaration

Platform

iOS, Android

onCastPlaying?: ((event) => void)

Event emitted when playback on a cast-compatible device has started.

Type declaration

Platform

iOS, Android

onCastStart?: ((event) => void)

Event emitted when casting is initiated, but the user still needs to choose which device should be used.

Type declaration

Platform

iOS, Android

onCastStarted?: ((event) => void)

Event emitted when the cast app is launched successfully.

Type declaration

Platform

iOS, Android

onCastStopped?: ((event) => void)

Event emitted when casting to a cast-compatible device is stopped.

Type declaration

Platform

iOS, Android

onCastTimeUpdated?: ((event) => void)

Event emitted when the time update from the currently used cast-compatible device is received.

Type declaration

Platform

iOS, Android

onCastWaitingForDevice?: ((event) => void)

Event emitted when a cast-compatible device has been chosen and the player is waiting for the device to get ready for playback.

Type declaration

Platform

iOS, Android

onCueEnter?: ((event) => void)

Event emitted when a subtitle entry transitions into the active status.

Type declaration

onCueExit?: ((event) => void)

Event emitted when an active subtitle entry transitions into the inactive status.

Type declaration

onDestroy?: ((event) => void)

Event emitted when the player is destroyed.

Type declaration

onDownloadFinished?: ((event) => void)

Emitted when a download was finished.

Type declaration

onEvent?: ((event) => void)

All events emitted by the player.

Type declaration

    • (event): void
    • Parameters

      Returns void

onFullscreenDisabled?: ((event) => void)

Event emitted when fullscreen mode has been disabled.

Type declaration

Platform

iOS, Android

onFullscreenEnabled?: ((event) => void)

Event emitted when fullscreen mode has been enabled.

Type declaration

Platform

iOS, Android

onFullscreenEnter?: ((event) => void)

Event emitted when fullscreen mode has been entered.

Type declaration

Platform

iOS, Android

onFullscreenExit?: ((event) => void)

Event emitted when fullscreen mode has been exited.

Type declaration

Platform

iOS, Android

onMuted?: ((event) => void)

Event emitted when the player has been muted.

Type declaration

    • (event): void
    • Parameters

      Returns void

onPaused?: ((event) => void)

Event emitted when the player has been paused.

Type declaration

onPictureInPictureAvailabilityChanged?: ((event) => void)

Event mitted when the availability of the Picture in Picture mode changed.

Type declaration

onPictureInPictureEnter?: ((event) => void)

Event emitted when the player enters Picture in Picture mode.

Type declaration

onPictureInPictureEntered?: ((event) => void)

Event emitted when the player entered Picture in Picture mode.

Type declaration

Platform

iOS

onPictureInPictureExit?: ((event) => void)

Event emitted when the player exits Picture in Picture mode.

Type declaration

onPictureInPictureExited?: ((event) => void)

Event emitted when the player exited Picture in Picture mode.

Type declaration

Platform

iOS

onPlay?: ((event) => void)

Event emitted when the player received an intention to start/resume playback.

Type declaration

    • (event): void
    • Parameters

      Returns void

onPlaybackFinished?: ((event) => void)

Event emitted when the playback of the current media has finished.

Type declaration

onPlaybackSpeedChanged?: ((event) => void)

Emitted when the player transitions from one playback speed to another.

Type declaration

Platform

iOS, tvOS

onPlayerActive?: ((event) => void)

Event emitted when a source is loaded into the player. Seeking and time shifting are allowed as soon as this event is seen.

Type declaration

onPlayerError?: ((event) => void)

Event Emitted when a player error occurred.

Type declaration

onPlayerWarning?: ((event) => void)

Event emitted when a player warning occurred.

Type declaration

onPlaying?: ((event) => void)

Emitted when playback has started.

Type declaration

onReady?: ((event) => void)

Emitted when the player is ready for immediate playback, because initial audio/video has been downloaded.

Type declaration

    • (event): void
    • Parameters

      Returns void

onSeek?: ((event) => void)

Event emitted when the player is about to seek to a new position. Only applies to VoD streams.

Type declaration

    • (event): void
    • Parameters

      Returns void

onSeeked?: ((event) => void)

Event emitted when seeking has finished and data to continue playback is available. Only applies to VoD streams.

Type declaration

onSourceError?: ((event) => void)

Event emitted when a source error occurred.

Type declaration

onSourceLoad?: ((event) => void)

Event emitted when a new source loading has started.

Type declaration

onSourceLoaded?: ((event) => void)

Event emitted when a new source is loaded. This does not mean that the source is immediately ready for playback. ReadyEvent indicates the player is ready for immediate playback.

Type declaration

onSourceUnloaded?: ((event) => void)

Event emitted when the current source has been unloaded.

Type declaration

onSourceWarning?: ((event) => void)

Event emitted when a source warning occurred.

Type declaration

onStallEnded?: ((event) => void)

Event emitted when the player ends stalling, due to enough data in the buffer.

Type declaration

onStallStarted?: ((event) => void)

Event emitted when the player begins to stall and to buffer due to an empty buffer.

Type declaration

onSubtitleAdded?: ((event) => void)

Event emitted when a new subtitle track is added to the player.

Type declaration

onSubtitleChanged?: ((event) => void)

Event emitted when the player's selected subtitle track has changed.

Type declaration

onSubtitleRemoved?: ((event) => void)

Event emitted when a subtitle track is removed from the player.

Type declaration

onTimeChanged?: ((event) => void)

Event emitted when the current playback time has changed.

Type declaration

onTimeShift?: ((event) => void)

Event mitted when the player starts time shifting. Only applies to live streams.

Type declaration

onTimeShifted?: ((event) => void)

Event emitted when time shifting has finished and data is available to continue playback. Only applies to live streams.

Type declaration

onUnmuted?: ((event) => void)

Emitted when the player is unmuted.

Type declaration

onVideoDownloadQualityChanged?: ((event) => void)

Emitted when current video download quality has changed.

Type declaration

onVideoPlaybackQualityChanged?: ((event) => void)

Emitted when the current video playback quality has changed.

Type declaration

player: Player

Player instance (generally returned from usePlayer hook) that will control and render audio/video inside the PlayerView.

scalingMode?: ScalingMode

A value defining how the video is displayed within the parent container's bounds. Possible values are defined in ScalingMode.

style?: ViewStyle

Style of the PlayerView.

viewRef?: MutableRefObject<null>