I came up with the idea of being able to record the lectures I make with other pairs so I can download them later, according to my theory, the simplest way would be to record the screen sequence and add the remote audio tracks. Try using getTracksAudio
and then addTracks
in the mediaStream
object of my screen, but I get an error that says that the last parameter is not an audio track itself.
Example of my code:
$rootScope.$on('videoAdded', function(event, data) {
// I hear the event when a video is added..
if(data.stream !== 'screenStream') {
var audioTracks = data.stream.getAudioTracks();
}
else {
var captureStream = data.stream;
captureStream.addTrack(audioTracks);
};
});
Code like this would return an error saying that the first parameter is not an audio track specifically.
I would like to be able to correctly capture the remote audio tracks, include them in the stream received by someone who shares their screen and then download it (if it is really possible).