Set audioActive and videoActive for subscriber

Have those values behaving as for publihser
pull/443/head
Fabrizio Ruggeri 2020-04-21 16:44:14 +02:00
parent b7a36700f9
commit 20b638d245
1 changed files with 5 additions and 3 deletions

View File

@ -48,7 +48,8 @@ export class Subscriber extends StreamManager {
this.stream.getMediaStream().getAudioTracks().forEach((track) => {
track.enabled = value;
});
console.info("'Subscriber' has " + (value ? 'subscribed to' : 'unsubscribed from') + ' its audio stream');
this.stream.audioActive = value;
logger.info("'Subscriber' has " + (value ? 'subscribed to' : 'unsubscribed from') + ' its audio stream');
return this;
}
@ -60,8 +61,9 @@ export class Subscriber extends StreamManager {
this.stream.getMediaStream().getVideoTracks().forEach((track) => {
track.enabled = value;
});
console.info("'Subscriber' has " + (value ? 'subscribed to' : 'unsubscribed from') + ' its video stream');
this.stream.videoActive = value;
logger.info("'Subscriber' has " + (value ? 'subscribed to' : 'unsubscribed from') + ' its video stream');
return this;
}
}
}