diff --git a/ios/Video/RCTVideoManager.m b/ios/Video/RCTVideoManager.m index 2d7cd36392..a0c89c6f2a 100644 --- a/ios/Video/RCTVideoManager.m +++ b/ios/Video/RCTVideoManager.m @@ -67,6 +67,7 @@ @interface RCT_EXTERN_MODULE (RCTVideoManager, RCTViewManager) RCT_EXPORT_VIEW_PROPERTY(onTextTracks, RCTDirectEventBlock); RCT_EXPORT_VIEW_PROPERTY(onAudioTracks, RCTDirectEventBlock); RCT_EXPORT_VIEW_PROPERTY(onTextTrackDataChanged, RCTDirectEventBlock); +RCT_EXPORT_VIEW_PROPERTY(onTimeUpdate, RCTDirectEventBlock); // Pass time update events RCT_EXTERN_METHOD(seekCmd : (nonnull NSNumber*)reactTag time : (nonnull NSNumber*)time tolerance : (nonnull NSNumber*)tolerance) RCT_EXTERN_METHOD(setLicenseResultCmd : (nonnull NSNumber*)reactTag license : (NSString*)license licenseUrl : (NSString*)licenseUrl) diff --git a/src/Video.web.tsx b/src/Video.web.tsx index cfd58639f0..39881355c0 100644 --- a/src/Video.web.tsx +++ b/src/Video.web.tsx @@ -379,6 +379,7 @@ const Video = forwardRef( ) : 0, seekableDuration: 0, + currentPlaybackTime: 0, // Update this with the correct playback time }); }} onLoadedData={() => onReadyForDisplay?.()} diff --git a/src/specs/VideoNativeComponent.ts b/src/specs/VideoNativeComponent.ts index 493736d990..f8a0dcfdff 100644 --- a/src/specs/VideoNativeComponent.ts +++ b/src/specs/VideoNativeComponent.ts @@ -191,6 +191,7 @@ export type OnProgressData = Readonly<{ currentTime: Float; playableDuration: Float; seekableDuration: Float; + currentPlaybackTime: number; // To get EXT-X-PLAYBACK-TIME }>; export type OnBandwidthUpdateData = Readonly<{