mirror of https://github.com/OpenVidu/openvidu.git
openvidu-components: Fixed captions lang update
Updated captions lang only when it is different than older onepull/759/head
parent
80a0f16778
commit
4be4b9695b
|
@ -43,8 +43,9 @@ export class CaptionService {
|
||||||
}
|
}
|
||||||
|
|
||||||
setLanguage(lang: string) {
|
setLanguage(lang: string) {
|
||||||
if (this.langTitles.some((l) => l.ISO === lang)) {
|
const newLang = this.langTitles.find((l) => l.ISO === lang);
|
||||||
this.captionLangSelected = this.langTitles.find((l) => l.ISO === lang);
|
if(!!newLang && newLang.ISO !== this.captionLangSelected.ISO){
|
||||||
|
this.captionLangSelected = newLang;
|
||||||
this.storageService.setCaptionLang(lang);
|
this.storageService.setCaptionLang(lang);
|
||||||
this._captionLangObs.next(this.captionLangSelected);
|
this._captionLangObs.next(this.captionLangSelected);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue