webRTC-io / webRTC.io

An abstraction layer for webRTC. Aim is to simplify the HTML5 web standard webRTC in a similar manner to socket.io w/ websockets. Highly experimental technology
1.6k stars 293 forks source link

Screen sharing #27

Open Jorger opened 11 years ago

Jorger commented 11 years ago

Hello, webrtc.io is great, congratulations for this excellent library, I recently read support for screen capture from Google Chrome. Webrtc.io will in the future perform this action? or it is possible to do, making some kind of change, I have observed through getUserMedia option in the video option associated a number of parameters:

navigator.getUserMedia({ video: { mandatory: { chromeMediaSource: 'screen' // maxWidth: 640, // maxHeight: 480 } } });

Thanks for your attention ..

JimCook57 commented 11 years ago

I would love to see this added as well.

benfoxall commented 11 years ago

Looks like the client normalising the video to boolean prohibits this:

https://github.com/webRTC/webrtc.io-client/blob/master/lib/webrtc.io.js#L360-L363

If you were to change video: !! opt.video to video: opt.video || false - then that might allow the options above.

dhassoun commented 11 years ago

the above change works pretty good. but just an fyi you cant publish a video and screen share from same connection at the moment.