差别
这里会显示出您选择的修订版和当前版本之间的差别。
两侧同时换到之前的修订记录 前一修订版 后一修订版 | 前一修订版 后一修订版 两侧同时换到之后的修订记录 | ||
rtc:conference:web [2020/06/29 07:03] zhangdong [用户A进入会议] |
rtc:conference:web [2020/07/16 07:16] suqx |
||
---|---|---|---|
行 403: | 行 403: | ||
/** | /** | ||
* videoConstaints {screenOptions: ['screen', 'window', 'tab']} or true | * videoConstaints {screenOptions: ['screen', 'window', 'tab']} or true | ||
- | * withAudio: true 携带语音,false不携带 | + | * withAudio: true 携带语音,false不携带 如携带语音,需自己调用关闭流,不会执行 stopSharedCallback 回调 |
* ext 用户自定义扩展,其他成员可以看到这个字段 | * ext 用户自定义扩展,其他成员可以看到这个字段 | ||
* stopSharedCallback 共享插件 点击【停止共享】的回调函数,做相应的处理(比如删除流...) | * stopSharedCallback 共享插件 点击【停止共享】的回调函数,做相应的处理(比如删除流...) | ||
行 595: | 行 595: | ||
</code> | </code> | ||
+ | ==== 指定设备打开音视频 ==== | ||
+ | <code javascript> | ||
+ | const devices = await emedia.mgr.mediaDevices(); //获取设备列表 | ||
+ | |||
+ | // 设备信息 | ||
+ | device: Object { | ||
+ | deviceId: "529a6fe76467d****9498ab22f5f362cd" // 设备ID | ||
+ | groupId: "2b74c9b9ab99*****d513fbabc1e86b3c5d99f7f8a0c16" | ||
+ | kind: "audioinput" | audiooutput | videoinput | videooutput // 设备类型 | ||
+ | label: "Internal Microphone (Built-in)" | ||
+ | } | ||
+ | constraints: { // 选择设备, 然后指定设备 | ||
+ | audio: {deviceId: deviceId ? {exact: deviceId} : undefined}, | ||
+ | video: {deviceId: deviceId ? {exact: deviceId} : undefined} | ||
+ | }, | ||
+ | | ||
+ | const stream = await emedia.mgr.publish(constraints) // 推流 | ||
+ | </code> | ||
==== 暂停/恢复自己的视频 ==== | ==== 暂停/恢复自己的视频 ==== | ||
<code javascript> | <code javascript> | ||
行 603: | 行 621: | ||
}) | }) | ||
等价于 | 等价于 | ||
- | emedia.mgr.triggerResumeVideo(localVideoTag).then(function(){ | + | emedia.mgr.triggerPauseVideo(localVideoTag).then(function(){ |
}).catch(function(){ | }).catch(function(){ | ||
行 610: | 行 628: | ||
</code> | </code> | ||
<code javascript> | <code javascript> | ||
- | emedia.mgr.pauseVideo(pubS).then(function(){ | + | emedia.mgr.resumeVideo(pubS).then(function(){ |
}).catch(function(){ | }).catch(function(){ | ||
行 616: | 行 634: | ||
}) | }) | ||
等价于 | 等价于 | ||
- | emedia.mgr.triggerPauseVideo(localVideoTag).then(function(){ | + | emedia.mgr.triggerResumeVideo(localVideoTag).then(function(){ |
}).catch(function(){ | }).catch(function(){ |