skyway / old-skyway-screenshare

[Deprecated] This is a library for easy implementation of screen sharing for WebRTC.
Other
24 stars 11 forks source link

Audio #3

Closed Mrsevic closed 6 years ago

Mrsevic commented 7 years ago

Is it possible to append audio stream whilst sharing screen?

brickgale commented 7 years ago

this is what I was just working on today. It's seems that audioCapture on chrome only for chrome apps. So for doing audio, I separated it entirely with the video stream. Doing a separate call that only has audio.

iwashi commented 6 years ago

Sorry for late reply but sending audio w/ shared screen can be done like

let ms = new MediaStream();

// Supposed newStream is obtained from ScreenShare
newStream.getVideoTracks().forEach(track => {
    ms.addTrack(track.clone())
});

audioStream.getAudioTracks().forEach(track => {
    ms.addTrack(track.clone())
});

If there's another question about how to use, feel free to post https://support.skyway.io/hc/en-us .