useEffect(() => {
try {
const voiceover = parseOrGet(item.scenes[selectedIndex].voiceover);
voiceover["title"]="test"
voiceover["artist"]="test"
voiceover["id"]="2"
voiceover["artwork"]="https://url_to_artwork.jpg"
delete voiceover.metadata
delete voiceover.name
delete voiceover.type
console.log(voiceover)
if (voiceover) {
TrackPlayer.add(voiceover);
TrackPlayer.play();
setSelectedTrack(voiceover);
}else{
TrackPlayer.destroy();
}
} catch (error) {
console.log('my initial error', error);
}
}, [selectedIndex]);
在这里,我正在添加 trackplayer 配音,但我无法收听配音音乐,它无法正常工作
这是我的配音对象
{"artist": "test", "artwork": "https://url_to_artwork.jpg", "id": 1, "title": "test", "url": "https://d3bm2z03a5d1kp.cloudfront.net/hindi-narration/1.mp3"}
让 mw 知道我在哪里做错了