From 244b4ae3973bc1511464a08158a123767f83179c Mon Sep 17 00:00:00 2001 From: BO41 Date: Thu, 18 Oct 2018 09:08:59 +0200 Subject: 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 --- client/src/assets/player/peertube-player.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'client/src/assets/player/peertube-player.ts') diff --git a/client/src/assets/player/peertube-player.ts b/client/src/assets/player/peertube-player.ts index 792662b6c..ef9e7fcc0 100644 --- a/client/src/assets/player/peertube-player.ts +++ b/client/src/assets/player/peertube-player.ts @@ -75,12 +75,12 @@ function getVideojsOptions (options: { enableVolumeScroll: false, enableModifiersForNumbers: false, - fullscreenKey: function (event) { + fullscreenKey: function (event: any) { // fullscreen with the f key or Ctrl+Enter return event.key === 'f' || (event.ctrlKey && event.key === 'Enter') }, - seekStep: function (event) { + seekStep: function (event: any) { // mimic VLC seek behavior, and default to 5 (original value is 5). if (event.ctrlKey && event.altKey) { return 5 * 60 @@ -95,26 +95,26 @@ function getVideojsOptions (options: { customKeys: { increasePlaybackRateKey: { - key: function (event) { + key: function (event: any) { return event.key === '>' }, - handler: function (player) { + handler: function (player: any) { player.playbackRate((player.playbackRate() + 0.1).toFixed(2)) } }, decreasePlaybackRateKey: { - key: function (event) { + key: function (event: any) { return event.key === '<' }, - handler: function (player) { + handler: function (player: any) { player.playbackRate((player.playbackRate() - 0.1).toFixed(2)) } }, frameByFrame: { - key: function (event) { + key: function (event: any) { return event.key === '.' }, - handler: function (player, options, event) { + handler: function (player: any) { player.pause() // Calculate movement distance (assuming 30 fps) const dist = 1 / 30 -- cgit v1.2.3