2024-03-07 03:35:17 -07:00
|
|
|
import type {
|
|
|
|
OnAudioFocusChangedData,
|
|
|
|
OnAudioTracksData,
|
|
|
|
OnBandwidthUpdateData,
|
|
|
|
OnBufferData,
|
|
|
|
OnExternalPlaybackChangeData,
|
|
|
|
OnLoadData,
|
|
|
|
OnLoadStartData,
|
|
|
|
OnPictureInPictureStatusChangedData,
|
|
|
|
OnPlaybackData,
|
|
|
|
OnPlaybackStateChangedData,
|
|
|
|
OnProgressData,
|
|
|
|
OnReceiveAdEventData,
|
|
|
|
OnSeekData,
|
|
|
|
OnTextTrackDataChangedData,
|
|
|
|
OnTextTracksData,
|
|
|
|
OnTimedMetadataData,
|
|
|
|
OnVideoAspectRatioData,
|
|
|
|
OnVideoErrorData,
|
|
|
|
OnVideoTracksData,
|
|
|
|
OnVolumeChangeData,
|
|
|
|
} from '../specs/VideoNativeComponent';
|
|
|
|
|
|
|
|
export type AudioTrack = OnAudioTracksData['audioTracks'][number];
|
|
|
|
export type TextTrack = OnTextTracksData['textTracks'][number];
|
2023-10-06 10:39:14 -06:00
|
|
|
|
|
|
|
export interface ReactVideoEvents {
|
2023-10-07 04:56:35 -06:00
|
|
|
onAudioBecomingNoisy?: () => void; //Android, iOS
|
|
|
|
onAudioFocusChanged?: (e: OnAudioFocusChangedData) => void; // Android
|
|
|
|
onIdle?: () => void; // Android
|
|
|
|
onBandwidthUpdate?: (e: OnBandwidthUpdateData) => void; //Android
|
|
|
|
onBuffer?: (e: OnBufferData) => void; //Android, iOS
|
|
|
|
onEnd?: () => void; //All
|
|
|
|
onError?: (e: OnVideoErrorData) => void; //Android, iOS
|
|
|
|
onExternalPlaybackChange?: (e: OnExternalPlaybackChangeData) => void; //iOS
|
|
|
|
onFullscreenPlayerWillPresent?: () => void; //Android, iOS
|
|
|
|
onFullscreenPlayerDidPresent?: () => void; //Android, iOS
|
|
|
|
onFullscreenPlayerWillDismiss?: () => void; //Android, iOS
|
|
|
|
onFullscreenPlayerDidDismiss?: () => void; //Android, iOS
|
|
|
|
onLoad?: (e: OnLoadData) => void; //All
|
|
|
|
onLoadStart?: (e: OnLoadStartData) => void; //All
|
|
|
|
onPictureInPictureStatusChanged?: (
|
|
|
|
e: OnPictureInPictureStatusChangedData,
|
|
|
|
) => void; //iOS
|
|
|
|
onPlaybackRateChange?: (e: OnPlaybackData) => void; //All
|
2023-11-04 11:11:54 -06:00
|
|
|
onVolumeChange?: (e: OnVolumeChangeData) => void; //Android, iOS
|
2023-10-07 04:56:35 -06:00
|
|
|
onProgress?: (e: OnProgressData) => void; //All
|
2023-10-23 10:23:57 -06:00
|
|
|
onReadyForDisplay?: () => void; //Android, iOS
|
2023-10-07 04:56:35 -06:00
|
|
|
onReceiveAdEvent?: (e: OnReceiveAdEventData) => void; //Android, iOS
|
|
|
|
onRestoreUserInterfaceForPictureInPictureStop?: () => void; //iOS
|
|
|
|
onSeek?: (e: OnSeekData) => void; //Android, iOS, Windows UWP
|
2023-10-23 10:23:57 -06:00
|
|
|
onPlaybackStateChanged?: (e: OnPlaybackStateChangedData) => void; // Android, iOS
|
2023-10-07 04:56:35 -06:00
|
|
|
onTimedMetadata?: (e: OnTimedMetadataData) => void; //Android, iOS
|
|
|
|
onAudioTracks?: (e: OnAudioTracksData) => void; // Android
|
|
|
|
onTextTracks?: (e: OnTextTracksData) => void; //Android
|
2024-02-29 06:41:04 -07:00
|
|
|
onTextTrackDataChanged?: (e: OnTextTrackDataChangedData) => void; // iOS
|
2023-10-07 04:56:35 -06:00
|
|
|
onVideoTracks?: (e: OnVideoTracksData) => void; //Android
|
2023-10-26 00:46:04 -06:00
|
|
|
onAspectRatio?: (e: OnVideoAspectRatioData) => void;
|
2023-10-07 04:56:35 -06:00
|
|
|
}
|