Skip to main content

Player Events Reference

Exposed events from LuraPlayer component are explained in this section.

import { useRef } from 'react';
import LuraPlayer from 'lura-react-native-core';


export default function MySampleComponent(){
const playerRef = useRef<LuraPlayer>(null);
const config = {
token: "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ2aWQiOiI0MzY2NjIzIiwiaXNzIjoiM1FMWjdaV0JsRko1Vk16Y2pyczJPbTd3VTdEanIzNFkifQ.CruM1W3gIEyQTBTqfaY5gTdf7b_2SSNg4gj6JGOj4Mg"
};
...
function onPlayingStartHandler(){
...
}
...

return (
<View>
<LuraPlayer
ref={playerRef}
config={config}
onPlayingStart={onPlayingStartHandler}
/>
</View>
);
}
EventSourceDescription
onStreamInitializedCustomEvent fired when the video stream is initialized
onManifestLoadedCustomEvent fired when the video manifest has been loaded
onNativeTimeUpdateCustomEvent fired when the time of the video has been updated
onPreviewMatrixLoadedCustomEvent fired when the preview matrix of the video is loaded
onCaptionSelectedCustomEvent fired when a caption is selected in the video player
onCaptionAttachedCustomEvent fired when a caption is attached to the video player
onCaptionCueChangedCustomEvent fired when a caption cue is changed in the video player
onCaptionLoadFailedCustomEvent fired when a caption load fails in the video player
onAudioTracksUpdatedCustomEvent fired when the audio tracks of the video have been updated
onAudioTrackLoadedCustomEvent fired when an audio track of the video has been loaded
onAudioTrackSwitchedCustomEvent fired when an audio track of the video is switched
onAudioTrackSwitchingCustomEvent fired when an audio track of the video is switching
onAudioTrackSelectedCustomEvent fired when an audio track of the video is selected
onMutedAutoplayForcedCustomEvent fired when the video player is forced to mute
onInterstitialFiredCustomEvent fired when an interstitial is fired in the video player
onVideoMetadataUpdatedCustomEvent fired when the video metadata is updated
onTimedMetadataCustomEvent fired when timed metadata is available in the video
onDashTimedMetadataCustomEvent fired when timed metadata is available in the video using DASH protocol
onCastingRequestedCustomEvent fired when casting is requested in the video player
onCastingStartedCustomEvent fired when casting is started in the video player
onCastingEndedCustomEvent fired when casting is ended in the video player
onLoadHTML5Event fired when the video content has been loaded
onAudioProcessHTML5Event fired when the video audio processing is done
onCanPlayHTML5Event fired when the video is able to be played
onCanPlayThroughHTML5Event fired when the video is able to be played without buffering
onCompleteHTML5Event fired when the video has completed playback
onDurationChangeHTML5Event fired when the video duration has changed
onEmptiedHTML5Event fired when the video source has been emptied
onEndedHTML5Event fired when the video playback has ended
onLoadedDataHTML5Event fired when the video data has been loaded
onLoadedMetadataHTML5Event fired when the video metadata is loaded
onPauseHTML5Event fired when the video is paused by the user or programmatically
onPlayHTML5Event fired when the video begins to play
onPlayingHTML5Event fired when the video is playing
onProgressHTML5Event fired as the video's download progresses
onRateChangeHTML5Event fired when the video's playback rate changes
onSeekingHTML5Event fired when seeking begins
onStalledHTML5Event fired when the browser is unable to fetch media data, but is still trying
onSuspendHTML5Event fired when loading of media data is suspended
onTimeUpdateHTML5Event fired when the current time of the video changes
onVolumeChangeHTML5Event fired when the volume of the video changes
onWaitingHTML5Event fired when the video stops because of a buffer underrun
onCueAddedCustomEvent fired when a new text track cue is added to the video
onCueEnterCustomEvent fired when the playhead enters a text track cue in the video
onCueExitCustomEvent fired when the playhead exits a text track cue in the video
onCueUpdatedCustomEvent fired when a text track cue is updated in the video
onPlayRequestedCustomEvent fired when the user requests the video to play
onPauseRequestedCustomEvent fired when the user requests the video to pause
onAdBreaksReadyCustomEvent fired when ad breaks have been loaded and are ready to play in the video
onAdImpressionCustomEvent fired when an ad begins to play in the video
onAdBreakStartedCustomEvent fired when an ad break begins to play in the video
onAdStartedCustomEvent fired when an individual ad begins to play in the video
onAdStoppedCustomEvent fired when an individual ad stops playing in the video
onAdSkipStateChangedCustomEvent fired when the skip state of an ad changes (e.g. skip button appears or disappears)
onAdClickedCustomEvent fired when the user clicks on an ad in the video
onAdCompletedCustomEvent fired when an individual ad has completed playing in the video
onAdFirstQuartileCustomEvent fired when an ad has reached the first quarter of its playtime
onAdMidpointCustomEvent fired when an ad has reached its midpoint
onAdMetadataCustomEvent fired when ad metadata is loaded and available for use
onAdMutedCustomEvent fired when an ad is muted by the user or programmatically
onAdUnmuteCustomEvent fired when an ad is unmuted by the user or programmatically
onAdPausedCustomEvent fired when an ad is paused by the user or programmatically
onAdProgressCustomEvent fired when the progress of an ad changes
onAdResumedCustomEvent fired when an ad is resumed by the user or programmatically
onAdSkippedCustomEvent fired when an ad is skipped by the user
onAdThirdQuartileCustomEvent fired when an ad has reached the third quarter of its playtime
onAdVolumeChangedCustomEvent fired when the volume of an advertisement changes
onAdBreakCompletedCustomEvent fired when an advertisement break is completed
onAdTimeUpdateCustomEvent fired when the time updates in an advertisement
onAdBufferEndCustomEvent fired when an advertisement buffer has ended
onAdExternalStartCustomEvent fired when an external advertisement is started
onAdExternalEndCustomEvent fired when an external advertisement is ended