插件方式使用下,Mix API 类,其方法将被扩展到 @urtc/sdk-web 的 Client 对象上
开启录制。
client .$mixer .startRecord({ storage: { bucket: 'test-record', region: 'cn-bj', }, output: { layout: { type: 'main', }, } }) .then((res) => { console.log('开启录制成功,录制文件名:', res.FileName); }) .catch((err) => { console.log('开启录制失败 ', err); });
参见 StartRecordOptions
开启转推。
client .$mixer .startRelay({ relay: { pushURL: [`rtmp://push.xxxxx.com/xxx/${this.roomId}`] }, output: { layout: { type: 'main', }, } }) .then(() => { console.log('开启转推成功'); }) .catch((err) => { console.log('开启转推失败 ', err); });
参见 StartRelayOptions
停止录制。
client .$mixer .stopRecord() .then(() => { console.log('停止录制成功'); }) .catch((err) => { console.log('停止录制失败 ', err); });
停止转推。
client .$mixer .stopRelay() .then(() => { console.log('停止转推成功'); }) .catch((err) => { console.log('停止转推失败 ', err); });
更新录制的部分设置。
client .$mixer .updateRecord({ output: { layout: { type: 'main', mainViewUId: 'user_yyy', mainViewType: 'screen', }, } }).then(() => { console.log('更新成功'); }).catch((err) => { console.log('更新失败 ', err); });
详见 UpdateRecordOptions
更新转推的部分设置。
client .$mixer .updateRelay({ output: { layout: { type: 'main', mainViewUId: 'user_yyy', mainViewType: 'screen', }, } }) .then(() => { console.log('更新成功'); }) .catch((err) => { console.log('更新失败 ', err); });
详见 UpdateRelayOptions
Generated using TypeDoc
插件方式使用下,Mix API 类,其方法将被扩展到 @urtc/sdk-web 的 Client 对象上