bugfix
This commit is contained in:
parent
e7f63b40c3
commit
a490821cdd
@ -20,6 +20,10 @@ bricks.RTCClient = class extends bricks.VBox {
|
||||
{
|
||||
"signaling_url":
|
||||
"ice_url":
|
||||
"mediaOptions":{
|
||||
"audio":true,
|
||||
"video":true
|
||||
}
|
||||
"auto_call_accept":false
|
||||
"info":{
|
||||
"id":
|
||||
@ -147,7 +151,11 @@ bricks.RTCClient = class extends bricks.VBox {
|
||||
// 获取本地媒体流
|
||||
async getLocalStream() {
|
||||
try {
|
||||
const stream = await navigator.mediaDevices.getUserMedia({ video: true, audio: true });
|
||||
var videoOptions = this.mediaOptions || {
|
||||
video: true,
|
||||
audio: true
|
||||
};
|
||||
const stream = await navigator.mediaDevices.getUserMedia(mediaOptions);
|
||||
this.localVideo.set_stream(stream);
|
||||
return stream;
|
||||
} catch (error) {
|
||||
|
Loading…
Reference in New Issue
Block a user