fix: quality switch not updating video playback

- Use qn-specific MPD filename (bili_dash_{qn}.mpd) so each quality
  produces a distinct URI that triggers react-native-video to reload
- Add key={resolvedUrl} on <Video> to force remount on source change
This commit is contained in:
Developer
2026-03-10 20:18:47 +08:00
parent 35371cebff
commit 03d7d3c5c3
2 changed files with 2 additions and 1 deletions

View File

@@ -57,6 +57,7 @@ export function NativeVideoPlayer({
<View style={[styles.container, style]}>
{resolvedUrl ? (
<Video
key={resolvedUrl}
ref={videoRef}
source={isDash
? { uri: resolvedUrl, type: 'mpd', headers: BILIBILI_HEADERS }