// 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 * as vjs from 'video.js'
+
import * as Channel from 'jschannel'
import { peertubeTranslate, ResultList, VideoDetails } from '../../../../shared'
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