Always use on media unsuported on error on android since errors code are unreliables

This commit is contained in:
Zoe Roux 2024-02-18 01:16:57 +01:00
parent 7adbb5d299
commit 20bf6851c0

View File

@ -103,11 +103,7 @@ const Video = forwardRef<VideoRef, VideoProps>(function Video(
onLoad?.(info);
}}
onBuffer={onBuffer}
onError={(e) => {
// 24001 is codec error
if (e.error.errorCode === "24001") onMediaUnsupported?.();
else onError?.(e);
}}
onError={onMediaUnsupported}
selectedVideoTrack={
video === -1
? { type: SelectedVideoTrackType.AUDO }