Skip to content
小山 edited this page Sep 28, 2020 · 3 revisions

推流

推流即把本地采集的视频流数据上传到服务器,再由服务器分发给直播观看端。推流功能由LivePusher负责。

创建推流控制器

推流控制器需要和CloudVideo一一绑定,创建方法为静态方法

final pusher = await LivePusher.create()

一般在CloudVideoonCloudVideoCreated回调中创建。

设置预览渲染容器

推流控制器需要一个渲染容器来显示内容,调用方法为

final pusher = await LivePusher.create();
await pusher.startPreview(controller); // controller类型为CloudVideoController

开始推流

向一个url地址上传内容,调用方法为

final pusher = await LivePusher.create();
await pusher.startPush(pushUrl);

相关内容:

播放
拉流

腾讯直播

接口使用

常见问题

关于Fluttify

Clone this wiki locally