diff options
Diffstat (limited to 'client/src/standalone')
-rw-r--r-- | client/src/standalone/videos/embed.ts | 7 | ||||
-rw-r--r-- | client/src/standalone/videos/test-embed.ts | 6 |
2 files changed, 8 insertions, 5 deletions
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' | |||
17 | // For google bot that uses Chrome 41 and does not understand fetch | 17 | // For google bot that uses Chrome 41 and does not understand fetch |
18 | import 'whatwg-fetch' | 18 | import 'whatwg-fetch' |
19 | 19 | ||
20 | const vjs = require('video.js') | 20 | // FIXME: something weird with our path definition in tsconfig and typings |
21 | // @ts-ignore | ||
22 | import vjs from 'video.js' | ||
23 | |||
21 | import * as Channel from 'jschannel' | 24 | import * as Channel from 'jschannel' |
22 | 25 | ||
23 | import { peertubeTranslate, ResultList, VideoDetails } from '../../../../shared' | 26 | import { peertubeTranslate, ResultList, VideoDetails } from '../../../../shared' |
@@ -304,7 +307,7 @@ class PeerTubeEmbed { | |||
304 | 307 | ||
305 | this.playerOptions = videojsOptions | 308 | this.playerOptions = videojsOptions |
306 | this.player = vjs(this.videoContainerId, videojsOptions, () => { | 309 | this.player = vjs(this.videoContainerId, videojsOptions, () => { |
307 | this.player.on('customError', (data: any) => this.handleError(data.err)) | 310 | this.player.on('customError', (event: any, data: any) => this.handleError(data.err)) |
308 | 311 | ||
309 | window[ 'videojsPlayer' ] = this.player | 312 | window[ 'videojsPlayer' ] = this.player |
310 | 313 | ||
diff --git a/client/src/standalone/videos/test-embed.ts b/client/src/standalone/videos/test-embed.ts index b750c2ee6..30a298573 100644 --- a/client/src/standalone/videos/test-embed.ts +++ b/client/src/standalone/videos/test-embed.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import './test-embed.scss' | 1 | import './test-embed.scss' |
2 | import { PeerTubePlayer } from '../player/player' | 2 | import { PeerTubePlayer } from '../player/player' |
3 | import { PlayerEventType } from '../player/definitions' | 3 | import { PeerTubeResolution, PlayerEventType } from '../player/definitions' |
4 | 4 | ||
5 | window.addEventListener('load', async () => { | 5 | window.addEventListener('load', async () => { |
6 | const urlParts = window.location.href.split('/') | 6 | const urlParts = window.location.href.split('/') |
@@ -66,11 +66,11 @@ window.addEventListener('load', async () => { | |||
66 | updateRates() | 66 | updateRates() |
67 | }) | 67 | }) |
68 | 68 | ||
69 | let updateResolutions = ((resolutions: any) => { | 69 | let updateResolutions = ((resolutions: PeerTubeResolution[]) => { |
70 | let resolutionListEl = document.querySelector('#resolution-list') | 70 | let resolutionListEl = document.querySelector('#resolution-list') |
71 | resolutionListEl.innerHTML = '' | 71 | resolutionListEl.innerHTML = '' |
72 | 72 | ||
73 | resolutions.forEach((resolution: any) => { | 73 | resolutions.forEach(resolution => { |
74 | if (resolution.active) { | 74 | if (resolution.active) { |
75 | let itemEl = document.createElement('strong') | 75 | let itemEl = document.createElement('strong') |
76 | itemEl.innerText = `${resolution.label} (active)` | 76 | itemEl.innerText = `${resolution.label} (active)` |