]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/standalone/videos/embed.ts
fix lint test
[github/Chocobozzz/PeerTube.git] / client / src / standalone / videos / embed.ts
index e5a2d208a369336b67a664135ee9a61818fc6810..7b269eeb9a627f52166e5654731ea6839fd91dc0 100644 (file)
@@ -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