openvidu-components: Fixed captions lang update
Updated captions lang only when it is different than older one
This commit is contained in:
parent
80a0f16778
commit
4be4b9695b
@ -43,8 +43,9 @@ export class CaptionService {
|
||||
}
|
||||
|
||||
setLanguage(lang: string) {
|
||||
if (this.langTitles.some((l) => l.ISO === lang)) {
|
||||
this.captionLangSelected = this.langTitles.find((l) => l.ISO === lang);
|
||||
const newLang = this.langTitles.find((l) => l.ISO === lang);
|
||||
if(!!newLang && newLang.ISO !== this.captionLangSelected.ISO){
|
||||
this.captionLangSelected = newLang;
|
||||
this.storageService.setCaptionLang(lang);
|
||||
this._captionLangObs.next(this.captionLangSelected);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user