-
Notifications
You must be signed in to change notification settings - Fork 2
小山 edited this page Sep 28, 2020
·
3 revisions
推流即把本地采集的视频流数据上传到服务器,再由服务器分发给直播观看端。推流功能由LivePusher
负责。
推流控制器需要和CloudVideo
一一绑定,创建方法为静态方法
final pusher = await LivePusher.create()
一般在CloudVideo
的onCloudVideoCreated
回调中创建。
推流控制器需要一个渲染容器来显示内容,调用方法为
final pusher = await LivePusher.create();
await pusher.startPreview(controller); // controller类型为CloudVideoController
向一个url地址上传内容,调用方法为
final pusher = await LivePusher.create();
await pusher.startPush(pushUrl);