Re: [discuss-webrtc] Is it possible to use WEBRTC without audio and camera locally?

123 views
Skip to first unread message

PhistucK

unread,
Oct 10, 2012, 9:36:35 AM10/10/12
to discuss...@googlegroups.com
I believe you can. Just skip the code where you (create or) add a stream.

PhistucK



On Wed, Oct 10, 2012 at 5:24 AM, Yin Xiaopeng <xiaope...@gmail.com> wrote:
WebRTC is normally used for video chat. 
But is it possible to create the peerconnection without audio input and camera stream locally?
It maybe the good scenario which can be used for video monitor.

Thanks

--
 
 
 

Yin Xiaopeng

unread,
Oct 16, 2012, 6:11:33 AM10/16/12
to discuss...@googlegroups.com
I have tested the following code on Windows7, but createOffer will throw the exception: SYNTAX_ERR: DOM Exception 12

var pc = new window.webkitPeerConnection00("STUN stun.l.google.com:19302", function(msg) {
console.log(msg);
console.log("Send offer to peer");
});

   var offer = pc.createOffer({has_audio:true, has_video:false});
   pc.setLocalDescription(pc.SDP_OFFER, offer);
   sendMessage({type: 'offer', sdp: offer.toSdp()});
   pc.startIce()

But the above code works on Mac. Does chrome windows version has more strict limitation?

Thanks.

在 2012年10月10日星期三UTC+8下午9时37分18秒,PhistucK写道:

Ronghua Wu

unread,
Oct 17, 2012, 11:19:55 AM10/17/12
to discuss...@googlegroups.com
If this works on mac but not on windows, it may indicate a bug. What version of chrome did you use on each platforms?

--
 
 
 

Yin Xiaopeng

unread,
Oct 22, 2012, 11:35:53 PM10/22/12
to discuss...@googlegroups.com
Thanks for the reply.

I have tested it on Mac with Chrome canary version: 23.0.1262.0 canary. On Windows, I also tested it with Chrome canary, but my chrome canary has updated the latest version on which lots of peerconnection API have been changed. 
But it also can be reproduced with Chrome formal version 21.0.1180.89 m.
BTW, I have not checked this with latest API.

Thanks


在 2012年10月10日星期三UTC+8上午11时24分20秒,Yin Xiaopeng写道:
Reply all
Reply to author
Forward
0 new messages