chore(android): move contentStartTime into source prop (#4160)
This commit is contained in:
@@ -79,6 +79,7 @@ const Video = forwardRef<VideoRef, ReactVideoProps>(
|
||||
poster,
|
||||
posterResizeMode,
|
||||
renderLoader,
|
||||
contentStartTime,
|
||||
drm,
|
||||
textTracks,
|
||||
selectedVideoTrack,
|
||||
@@ -204,6 +205,9 @@ const Video = forwardRef<VideoRef, ReactVideoProps>(
|
||||
}
|
||||
}
|
||||
|
||||
const selectedContentStartTime =
|
||||
source.contentStartTime || contentStartTime;
|
||||
|
||||
return {
|
||||
uri,
|
||||
isNetwork,
|
||||
@@ -216,6 +220,7 @@ const Video = forwardRef<VideoRef, ReactVideoProps>(
|
||||
startPosition: resolvedSource.startPosition ?? -1,
|
||||
cropStart: resolvedSource.cropStart || 0,
|
||||
cropEnd: resolvedSource.cropEnd,
|
||||
contentStartTime: selectedContentStartTime,
|
||||
metadata: resolvedSource.metadata,
|
||||
drm: _drm,
|
||||
cmcd: _cmcd,
|
||||
@@ -223,7 +228,7 @@ const Video = forwardRef<VideoRef, ReactVideoProps>(
|
||||
textTracksAllowChunklessPreparation:
|
||||
resolvedSource.textTracksAllowChunklessPreparation,
|
||||
};
|
||||
}, [drm, source, textTracks]);
|
||||
}, [drm, source, textTracks, contentStartTime]);
|
||||
|
||||
const _selectedTextTrack = useMemo(() => {
|
||||
if (!selectedTextTrack) {
|
||||
|
@@ -38,6 +38,7 @@ export type VideoSrc = Readonly<{
|
||||
startPosition?: Float;
|
||||
cropStart?: Float;
|
||||
cropEnd?: Float;
|
||||
contentStartTime?: Int32; // Android
|
||||
metadata?: VideoMetadata;
|
||||
drm?: Drm;
|
||||
cmcd?: NativeCmcdConfiguration; // android
|
||||
@@ -344,7 +345,6 @@ export interface VideoNativeProps extends ViewProps {
|
||||
debug?: DebugConfig;
|
||||
showNotificationControls?: WithDefault<boolean, false>; // Android, iOS
|
||||
bufferConfig?: BufferConfig; // Android
|
||||
contentStartTime?: Int32; // Android
|
||||
currentPlaybackTime?: Double; // Android
|
||||
disableDisconnectError?: boolean; // Android
|
||||
focusable?: boolean; // Android
|
||||
|
@@ -31,6 +31,7 @@ export type ReactVideoSourceProperties = {
|
||||
startPosition?: number;
|
||||
cropStart?: number;
|
||||
cropEnd?: number;
|
||||
contentStartTime?: number; // Android
|
||||
metadata?: VideoMetadata;
|
||||
drm?: Drm;
|
||||
cmcd?: Cmcd; // android
|
||||
@@ -265,6 +266,7 @@ export interface ReactVideoProps extends ReactVideoEvents, ViewProps {
|
||||
bufferConfig?: BufferConfig; // Android
|
||||
bufferingStrategy?: BufferingStrategyType;
|
||||
chapters?: Chapters[]; // iOS
|
||||
/** @deprecated Use source.contentStartTime */
|
||||
contentStartTime?: number; // Android
|
||||
controls?: boolean;
|
||||
currentPlaybackTime?: number; // Android
|
||||
|
Reference in New Issue
Block a user