Fix(android): restart issue react76 (#4302)
* fix: upgrade to expo 54 * fix: more bufferConfig inside source - restart issue on react 0.76 - fix constness - deprecate bufferConfig in root props - update documentation
This commit is contained in:
@@ -108,6 +108,7 @@ const Video = forwardRef<VideoRef, ReactVideoProps>(
|
||||
onAspectRatio,
|
||||
localSourceEncryptionKeyScheme,
|
||||
minLoadRetryCount,
|
||||
bufferConfig,
|
||||
...rest
|
||||
},
|
||||
ref,
|
||||
@@ -219,6 +220,8 @@ const Video = forwardRef<VideoRef, ReactVideoProps>(
|
||||
|
||||
const _minLoadRetryCount =
|
||||
_source.minLoadRetryCount || minLoadRetryCount;
|
||||
|
||||
const _bufferConfig = _source.bufferConfig || bufferConfig;
|
||||
return {
|
||||
uri,
|
||||
isNetwork,
|
||||
@@ -240,6 +243,7 @@ const Video = forwardRef<VideoRef, ReactVideoProps>(
|
||||
textTracksAllowChunklessPreparation:
|
||||
resolvedSource.textTracksAllowChunklessPreparation,
|
||||
minLoadRetryCount: _minLoadRetryCount,
|
||||
bufferConfig: _bufferConfig,
|
||||
};
|
||||
},
|
||||
[
|
||||
@@ -251,6 +255,7 @@ const Video = forwardRef<VideoRef, ReactVideoProps>(
|
||||
minLoadRetryCount,
|
||||
source?.cmcd,
|
||||
textTracks,
|
||||
bufferConfig,
|
||||
],
|
||||
);
|
||||
|
||||
|
@@ -51,6 +51,7 @@ export type VideoSrc = Readonly<{
|
||||
textTracks?: TextTracks;
|
||||
ad?: AdsConfig;
|
||||
minLoadRetryCount?: Int32; // Android
|
||||
bufferConfig?: BufferConfig; // Android
|
||||
}>;
|
||||
|
||||
type DRMType = WithDefault<string, 'widevine'>;
|
||||
@@ -358,7 +359,6 @@ export interface VideoNativeProps extends ViewProps {
|
||||
restoreUserInterfaceForPIPStopCompletionHandler?: boolean;
|
||||
debug?: DebugConfig;
|
||||
showNotificationControls?: WithDefault<boolean, false>; // Android, iOS
|
||||
bufferConfig?: BufferConfig; // Android
|
||||
currentPlaybackTime?: Double; // Android
|
||||
disableDisconnectError?: boolean; // Android
|
||||
focusable?: boolean; // Android
|
||||
|
@@ -40,6 +40,7 @@ export type ReactVideoSourceProperties = {
|
||||
textTracks?: TextTracks;
|
||||
ad?: AdConfig;
|
||||
minLoadRetryCount?: number; // Android
|
||||
bufferConfig?: BufferConfig;
|
||||
};
|
||||
|
||||
export type ReactVideoSource = Readonly<
|
||||
@@ -289,6 +290,7 @@ export interface ReactVideoProps extends ReactVideoEvents, ViewProps {
|
||||
adLanguage?: ISO639_1;
|
||||
audioOutput?: AudioOutput; // Mobile
|
||||
automaticallyWaitsToMinimizeStalling?: boolean; // iOS
|
||||
/** @deprecated Use source.bufferConfig */
|
||||
bufferConfig?: BufferConfig; // Android
|
||||
bufferingStrategy?: BufferingStrategyType;
|
||||
chapters?: Chapters[]; // iOS
|
||||
|
Reference in New Issue
Block a user