fix(android): disable caching on local asset files (#4304)
This commit is contained in:
@@ -151,6 +151,11 @@ const Video = forwardRef<VideoRef, ReactVideoProps>(
|
||||
if (!_source) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const isLocalAssetFile =
|
||||
typeof _source === 'number' ||
|
||||
('uri' in _source && typeof _source.uri === 'number');
|
||||
|
||||
const resolvedSource = resolveAssetSourceForVideo(_source);
|
||||
let uri = resolvedSource.uri || '';
|
||||
if (uri && uri.match(/^\//)) {
|
||||
@@ -226,6 +231,7 @@ const Video = forwardRef<VideoRef, ReactVideoProps>(
|
||||
uri,
|
||||
isNetwork,
|
||||
isAsset,
|
||||
isLocalAssetFile,
|
||||
shouldCache: resolvedSource.shouldCache || false,
|
||||
type: resolvedSource.type || '',
|
||||
mainVer: resolvedSource.mainVer || 0,
|
||||
|
@@ -35,6 +35,7 @@ export type VideoSrc = Readonly<{
|
||||
uri?: string;
|
||||
isNetwork?: boolean;
|
||||
isAsset?: boolean;
|
||||
isLocalAssetFile?: boolean;
|
||||
shouldCache?: boolean;
|
||||
type?: string;
|
||||
mainVer?: Int32;
|
||||
|
@@ -24,6 +24,7 @@ export type ReactVideoSourceProperties = {
|
||||
uri?: string;
|
||||
isNetwork?: boolean;
|
||||
isAsset?: boolean;
|
||||
isLocalAssetFile?: boolean;
|
||||
shouldCache?: boolean;
|
||||
type?: string;
|
||||
mainVer?: number;
|
||||
|
Reference in New Issue
Block a user