Closed lyl0921 closed 8 years ago
You can capture two parallel streams: one for audio and another one for screen.
Now,
screenStream.addTrack( audioStream.getAudioTracks()[0] );
// this "screenStream" now has audio tracks as well
peer.addStream(screenStream);
peer.createOffer(.....and so on.....);
I capture two parallel streams, than it will be right in chrome. Thank you too much!
hi, I want to share the screen with audio. Firefox is ok, but chrome is not. the callback paramter of constraints in chrome is following:
screen_constraints { "video": { "mandatory": { "chromeMediaSource": "desktop", "maxWidth": 1280, "maxHeight": 720, "chromeMediaSourceId": "duqJhQS6UlzRqFpgGB4W5w==", "maxFrameRate": 10 }, "optional": [] }, "audio": true }
in firefox is following:screen_constraints { "video": { "mozMediaSource": "screen", "mediaSource": "screen", "width": { "max": 1280 }, "height": { "max": 720 }, "frameRate": { "max": 10 } }, "audio": true }
after function getUserMedia(), it will be going to the failed callback, the error message is none as following:
NavigatorUserMediaError {name: "ScreenCaptureError", message: "", constraintName: ""}
How can I do if I want to share screen with audio in chrome?
Thanks!