0 评论

0 收藏

分享

直播-腾讯云推流-sdk 播放地址不正确的解决方案---蜻蜓系统-uniapp-flutter通用

直播-腾讯云推流-sdk 播放地址不正确的解决方案---蜻蜓系统-uniapp-flutter通用

方法文件:

/app/Services/LiveService.php

这个问题耽误了时间,有必要记录




腾讯云后台


































简单说播放地址其实是固定的,之前方法有错,推流地址是需要加appname的,







































目前蜻蜓系统这个方法是这样写的播放地址




原来的

* 生成播放地址     */    public function getLiveUrl($streamName)    {        return [            'rtmp_url'  => 'rtmp://' . $this->domain . '/' . $this->AppName . '/' . $streamName,            'flv_url'   => 'http://' . $this->domain . '/' . $this->AppName . '/' . $streamName . '.flv',            'hls_url'   => 'http://' . $this->domain . '/' . $this->AppName . '/' . $streamName . '.m3u8',            'udp_url'   => 'webrtc://' . $this->domain . '/' . $this->AppName . '/' . $streamName        ];    }






简单改成固定的就行:




       /**     *新修改的 生成播放地址     */       public function getLiveUrl($streamName)    {        return [            'rtmp_url'  => 'rtmp://' . $this->domain . '/' . 'live' . '/' . $streamName,            'flv_url'   => 'http://' . $this->domain . '/' . 'live' . '/' . $streamName . '.flv',            'hls_url'   => 'http://' . $this->domain . '/' . 'live' . '/' . $streamName . '.m3u8',            'udp_url'   => 'webrtc://' . $this->domain . '/' . 'live' . '/' . $streamName        ];    }













之前都是可以的,不知道什么时候就不可以了,现在又可以了。




感觉播放器也是个问题,主要自身也是,做在uni方面是要麻烦一些



优雅草论坛2022年8月11日大改,优雅草论坛变回只服务于客户的提问交流论坛,详情查看优雅草8月11日大改,原因详情查优雅草外卖乐关闭

回复

举报 使用道具

相关帖子
全部回复
暂无回帖,快来参与回复吧
尘不染 实名认证 机构蓝V认证
超级版主
主题 173
回复 328
粉丝 3
快速回复 返回顶部 返回列表