仅在SImpleWebRTC中启动音频呼叫 [英] Starting audio call only in SImpleWebRTC
本文介绍了仅在SImpleWebRTC中启动音频呼叫的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用这个用于WebRtc的jQuery插件
I am using This jQuery plugin for WebRtc
我想只开始音频通话,但我看不到任何功能。我使用以下代码
和autoRequestMedia:false: -
I want to start audio call only but i can't see any function for this. I am using following code with autoRequestMedia:false :-
webrtc = new SimpleWebRTC({
localVideoEl: 'local-videos-container',
remoteVideosEl: 'videos-container',
autoRequestMedia: false,
url: 'https://192.168.1.11:2001/'
});
因此,当用户点击音频通话时我只想开始音频通话而不是视频
i可以看到方法 webrtc.startLocalVideo()
,它们都启动音频和视频。那么只有音频功能吗?
So when user click on audio call i just want to start audio call only not video
i can see the method webrtc.startLocalVideo()
which start audio and video both. so is there any function for audio only?
谢谢
推荐答案
你可以传递 media:{audio:true,video:false}
给webrtc的构造函数。
You can pass media: { audio: true, video: false }
to the constructor of webrtc.
试试这个: -
webrtc = new SimpleWebRTC({
localVideoEl: 'local-videos-container',
remoteVideosEl: 'videos-container',
autoRequestMedia: false,
url: 'https://192.168.1.11:2001/',
media: { audio: true, video: false }
);
这篇关于仅在SImpleWebRTC中启动音频呼叫的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文