From c199c427d4ae586339822320f20f512a7a19dc3f Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 18 Oct 2018 14:35:31 +0200 Subject: Better typings --- client/src/standalone/videos/embed.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'client/src/standalone/videos/embed.ts') diff --git a/client/src/standalone/videos/embed.ts b/client/src/standalone/videos/embed.ts index e5a2d208a..7b269eeb9 100644 --- a/client/src/standalone/videos/embed.ts +++ b/client/src/standalone/videos/embed.ts @@ -17,7 +17,10 @@ import 'core-js/es6/set' // For google bot that uses Chrome 41 and does not understand fetch import 'whatwg-fetch' -const vjs = require('video.js') +// FIXME: something weird with our path definition in tsconfig and typings +// @ts-ignore +import vjs from 'video.js' + import * as Channel from 'jschannel' import { peertubeTranslate, ResultList, VideoDetails } from '../../../../shared' @@ -304,7 +307,7 @@ class PeerTubeEmbed { this.playerOptions = videojsOptions this.player = vjs(this.videoContainerId, videojsOptions, () => { - this.player.on('customError', (data: any) => this.handleError(data.err)) + this.player.on('customError', (event: any, data: any) => this.handleError(data.err)) window[ 'videojsPlayer' ] = this.player -- cgit v1.2.3