React Native Video selectedVideoTrack 道具在 android 手机中不起作用

React Native Video selectedVideoTrack prop not working in android phones

selectedVideoTrack 道具在 android phone 中不起作用。这是视频组件

        <Video
            source={{uri: uri}}
            ref={videoPlayer}
            poster={thumbnail}
            style={orientation === 'PORTRAIT' ? styles.video : styles.landscapeVideo}

            onLoadStart={onLoadStart}
            onLoad={onLoad}
            onProgress={onProgress}
            paused={paused}
            rate={playSpeed}

            selectedVideoTrack={{
                type: "resolution",
                value: 144
            }}

            repeat={true}
            controls={false}
            playInBackground={true}
            resizeMode={'stretch'}
            fullscreen={true}
            pictureInPicture={true}
            muted={false}
        />

m3u8 文件

#EXTM3U
#EXT-X-STREAM-INF:BANDWIDTH=239800,RESOLUTION=256x144,CODECS="avc1.64000c,mp4a.40.2",FRAME-RATE=30.000
video_0_90.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=580800,RESOLUTION=854x480,CODECS="avc1.64001f,mp4a.40.2",FRAME-RATE=30.000
video_1_400.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=910800,RESOLUTION=1280x720,CODECS="avc1.64001f,mp4a.40.2",FRAME-RATE=30.000
video_2_700.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=1240800,RESOLUTION=1920x1080,CODECS="avc1.640028,mp4a.40.2",FRAME-RATE=30.000
video_3_1000.m3u8
#EXT-X-ENDLIST

我正在使用“react-native-video”:“^5.2.0”

react-native.config.js 中添加了这些行帮助我在 android

中实现它
module.exports = {
    dependencies: {
        'react-native-video': {
            platforms: {
                android: {
                    sourceDir: '../node_modules/react-native-video/android-exoplayer',
                },
            },
        },
    },
    assets:['./src/assets/fonts/'],
};

如果您没有字体目录,请删除 assets:['./src/assets/fonts/'],