mirror of https://github.com/OpenVidu/openvidu.git
openvidu-components: Changed language only when captions are enabled
parent
a8e0fcfb79
commit
d4cfd3893a
|
@ -343,6 +343,7 @@ export class SessionComponent implements OnInit, OnDestroy {
|
|||
|
||||
private subscribeToCaptionLanguage() {
|
||||
this.captionLanguageSubscription = this.captionService.captionLangObs.subscribe(async (lang) => {
|
||||
if (this.captionService.areCaptionsEnabled()) {
|
||||
// Unsubscribe all streams from speech to text and re-subscribe with new language
|
||||
this.log.d('Re-subscribe from STT because of language changed to ', lang.ISO);
|
||||
for (const participant of this.participantService.getRemoteParticipants()) {
|
||||
|
@ -356,6 +357,7 @@ export class SessionComponent implements OnInit, OnDestroy {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue