react-native-video同时播放单独的视频和音频轨道?

我有很多来自API的tacks,它给我的uri的视频和音频分开。我可以以某种方式同时播放2个视频和音频轨道,并支持所有的暂停播放寻求等?

轨道数据的JSON(简化)。

{
 "itag":243,
"url":"https://r3---sn-qvoc5nnxaxjugvopj-qo3e.googlevideo.com/videoplayback?expire=1586766406\u0026ei=5s2TXsCyII-x7QSOiJH4DQ\u0026ip=109.254.29.7\u0026id=o-AOLcChVj-UlAZI2jwEAGI91RICPXewSim1R7QME77QU8\u0026itag=243\u0026aitags=133%2C134%2C135%2C136%2C137%2C160%2C242%2C243%2C244%2C247%2C248%2C271%2C278%2C313\u0026source=youtube\u0026requiressl=yes\u0026mh=Qc\u0026mm=31%2C29\u0026mn=sn-qvoc5nnxaxjugvopj-qo3e%2Csn-n8v7kn7s\u0026ms=au%2Crdu\u0026mv=m\u0026mvi=2\u0026pcm2cms=yes\u0026pl=20\u0026initcwndbps=1306250\u0026vprv=1\u0026mime=video%2Fwebm\u0026gir=yes\u0026clen=6925152\u0026dur=206.082\u0026lmt=1586712912919153\u0026mt=1586744683\u0026fvip=11\u0026keepalive=yes\u0026c=WEB\u0026txp=5531432\u0026sparams=expire%2Cei%2Cip%2Cid%2Caitags%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt\u0026sig=AJpPlLswRQIgDdRVs0zHsYYHzZ0wnnfgHKuH6fCSkiEJZ5KIHTe9VB0CIQDadvrh8UEQQ_DceojptEXZRJk9k7ROvmqonIKz7YIh_A%3D%3D\u0026lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpcm2cms%2Cpl%2Cinitcwndbps\u0026lsig=ALrAebAwRAIgFtLclvFXAYZ95mqj9GT2siK0jyWT4I1nzJz7KhSvlIkCIBU2T67wiPEaB2KzIQ-RF8Lh-7IiV22xRrRqYN-ji0fu"
"mimeType":"video/webm;+codecs=\"vp9\""

"itag":251,
"url":"https://r3---sn-qvoc5nnxaxjugvopj-qo3e.googlevideo.com/videoplayback?expire=1586766406\u0026ei=5s2TXsCyII-x7QSOiJH4DQ\u0026ip=109.254.29.7\u0026id=o-AOLcChVj-UlAZI2jwEAGI91RICPXewSim1R7QME77QU8\u0026itag=251\u0026source=youtube\u0026requiressl=yes\u0026mh=Qc\u0026mm=31%2C29\u0026mn=sn-qvoc5nnxaxjugvopj-qo3e%2Csn-n8v7kn7s\u0026ms=au%2Crdu\u0026mv=m\u0026mvi=2\u0026pcm2cms=yes\u0026pl=20\u0026initcwndbps=1306250\u0026vprv=1\u0026mime=audio%2Fwebm\u0026gir=yes\u0026clen=3192185\u0026dur=206.101\u0026lmt=1586712383489185\u0026mt=1586744683\u0026fvip=11\u0026keepalive=yes\u0026c=WEB\u0026txp=5531432\u0026sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt\u0026sig=AJpPlLswRQIhAKCF9GRv40ium4N-nMAcgHw6uVx4gdWsPGf-pSzv0mFsAiAW79mCjaeI-4MuOxIwrWP4ICd0Yc_SIBloHtCb_oAvOQ%3D%3D\u0026lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpcm2cms%2Cpl%2Cinitcwndbps\u0026lsig=ALrAebAwRAIgFtLclvFXAYZ95mqj9GT2siK0jyWT4I1nzJz7KhSvlIkCIBU2T67wiPEaB2KzIQ-RF8Lh-7IiV22xRrRqYN-ji0fu",
"mimeType":"audio/webm;+codecs=\"opus\""
}

解决方案:

尽管理论上是可能的(毕竟这些都是可播放的流),但通过像RN Video这样的高级组件来做到这一点是非常不可能的。这些音轨加在一起并不能构成有效的流媒体内容,所以底层播放器必须准备好播放多源资产,这又是一个相当不寻常的用例。

给TA打赏
共{{data.count}}人
人已打赏
未分类

在uml中覆盖方法

2022-9-8 16:52:37

未分类

更新时的情况(一行与多行连接)--执行计划问题

2022-9-8 16:52:39

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索