From 54909304287f3c04dcfb39660be8ead57dc95440 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 24 May 2023 16:48:54 +0200 Subject: Remove suppressImplicitAnyIndexErrors It's deprecated by TS --- client/src/standalone/videos/embed.ts | 6 +++--- client/src/standalone/videos/test-embed.ts | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'client/src/standalone/videos') diff --git a/client/src/standalone/videos/embed.ts b/client/src/standalone/videos/embed.ts index d268f4762..cc4274b99 100644 --- a/client/src/standalone/videos/embed.ts +++ b/client/src/standalone/videos/embed.ts @@ -52,7 +52,7 @@ export class PeerTubeEmbed { this.liveManager = new LiveManager(this.playerHTML) try { - this.config = JSON.parse(window['PeerTubeServerConfig']) + this.config = JSON.parse((window as any)['PeerTubeServerConfig']) } catch (err) { logger.error('Cannot parse HTML config.', err) } @@ -254,9 +254,9 @@ export class PeerTubeEmbed { this.player.dispose() this.playerHTML.removePlayerElement() this.playerHTML.displayError('This video is not available because the remote instance is not responding.', translations) - }) + }); - window['videojsPlayer'] = this.player + (window as any)['videojsPlayer'] = this.player this.buildCSS() this.buildPlayerDock(video) diff --git a/client/src/standalone/videos/test-embed.ts b/client/src/standalone/videos/test-embed.ts index ab5262902..b34df11ee 100644 --- a/client/src/standalone/videos/test-embed.ts +++ b/client/src/standalone/videos/test-embed.ts @@ -22,9 +22,9 @@ window.addEventListener('load', async () => { mainElement.appendChild(iframe) logger.info('Document finished loading.') - const player = new PeerTubePlayer(document.querySelector('iframe')) + const player = new PeerTubePlayer(document.querySelector('iframe')); - window['player'] = player + (window as any)['player'] = player logger.info('Awaiting player ready...') await player.ready -- cgit v1.2.3