aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/standalone/videos
diff options
context:
space:
mode:
authorBO41 <lukasw41@gmail.com>2018-10-18 09:08:59 +0200
committerRigel Kent <par@rigelk.eu>2018-10-18 09:08:59 +0200
commit244b4ae3973bc1511464a08158a123767f83179c (patch)
tree24f4399489167bc92921e3fe0c1c04a87d7c1161 /client/src/standalone/videos
parent28e51e831bd121f063600a597d7b02f8fd846de9 (diff)
downloadPeerTube-244b4ae3973bc1511464a08158a123767f83179c.tar.gz
PeerTube-244b4ae3973bc1511464a08158a123767f83179c.tar.zst
PeerTube-244b4ae3973bc1511464a08158a123767f83179c.zip
NoImplicitAny flag true (#1157)
this enables the `noImplicitAny` flag in the Typescript compiler > When the noImplicitAny flag is true and the TypeScript compiler cannot infer the type, it still generates the JavaScript files, but it also reports an error. Many seasoned developers prefer this stricter setting because type checking catches more unintentional errors at compile time. closes: #1131 replaces #1137
Diffstat (limited to 'client/src/standalone/videos')
-rw-r--r--client/src/standalone/videos/embed.ts4
-rw-r--r--client/src/standalone/videos/test-embed.ts6
2 files changed, 5 insertions, 5 deletions
diff --git a/client/src/standalone/videos/embed.ts b/client/src/standalone/videos/embed.ts
index ea3436c7c..e5a2d208a 100644
--- a/client/src/standalone/videos/embed.ts
+++ b/client/src/standalone/videos/embed.ts
@@ -17,7 +17,7 @@ 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
18import 'whatwg-fetch' 18import 'whatwg-fetch'
19 19
20import * as vjs from 'video.js' 20const vjs = require('video.js')
21import * as Channel from 'jschannel' 21import * as Channel from 'jschannel'
22 22
23import { peertubeTranslate, ResultList, VideoDetails } from '../../../../shared' 23import { peertubeTranslate, ResultList, VideoDetails } from '../../../../shared'
@@ -304,7 +304,7 @@ class PeerTubeEmbed {
304 304
305 this.playerOptions = videojsOptions 305 this.playerOptions = videojsOptions
306 this.player = vjs(this.videoContainerId, videojsOptions, () => { 306 this.player = vjs(this.videoContainerId, videojsOptions, () => {
307 this.player.on('customError', (event, data) => this.handleError(data.err)) 307 this.player.on('customError', (data: any) => this.handleError(data.err))
308 308
309 window[ 'videojsPlayer' ] = this.player 309 window[ 'videojsPlayer' ] = this.player
310 310
diff --git a/client/src/standalone/videos/test-embed.ts b/client/src/standalone/videos/test-embed.ts
index dba331e90..b750c2ee6 100644
--- a/client/src/standalone/videos/test-embed.ts
+++ b/client/src/standalone/videos/test-embed.ts
@@ -66,11 +66,11 @@ window.addEventListener('load', async () => {
66 updateRates() 66 updateRates()
67 }) 67 })
68 68
69 let updateResolutions = resolutions => { 69 let updateResolutions = ((resolutions: any) => {
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 => { 73 resolutions.forEach((resolution: any) => {
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)`
@@ -87,7 +87,7 @@ window.addEventListener('load', async () => {
87 resolutionListEl.appendChild(itemEl) 87 resolutionListEl.appendChild(itemEl)
88 } 88 }
89 }) 89 })
90 } 90 })
91 91
92 player.getResolutions().then( 92 player.getResolutions().then(
93 resolutions => updateResolutions(resolutions)) 93 resolutions => updateResolutions(resolutions))