ov-components: Add check for existing Material Icons link in VideoconferenceComponent

master
Carlos Santos 2025-06-18 10:12:39 +02:00
parent fd8be9f23f
commit 2de2920acf
1 changed files with 8 additions and 5 deletions

View File

@ -413,11 +413,14 @@ export class VideoconferenceComponent implements OnDestroy, AfterViewInit {
* @internal * @internal
*/ */
ngAfterViewInit() { ngAfterViewInit() {
//Add material icons to the page //Add material icons to the page if not already present
const link = document.createElement('link'); const existingLink = document.querySelector('link[href*="Material+Symbols+Outlined"]');
link.href = 'https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined&icon_names=background_replace,keep_off'; if (!existingLink) {
link.rel = 'stylesheet'; const link = document.createElement('link');
document.head.appendChild(link); link.href = 'https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined&icon_names=background_replace,keep_off';
link.rel = 'stylesheet';
document.head.appendChild(link);
}
if (this.externalToolbar) { if (this.externalToolbar) {
this.log.d('Setting EXTERNAL TOOLBAR'); this.log.d('Setting EXTERNAL TOOLBAR');
this.openviduAngularToolbarTemplate = this.externalToolbar.template; this.openviduAngularToolbarTemplate = this.externalToolbar.template;