diff options
author | BO41 <lukasw41@gmail.com> | 2018-10-18 09:08:59 +0200 |
---|---|---|
committer | Rigel Kent <par@rigelk.eu> | 2018-10-18 09:08:59 +0200 |
commit | 244b4ae3973bc1511464a08158a123767f83179c (patch) | |
tree | 24f4399489167bc92921e3fe0c1c04a87d7c1161 /client/src/assets/player/peertube-player.ts | |
parent | 28e51e831bd121f063600a597d7b02f8fd846de9 (diff) | |
download | PeerTube-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/assets/player/peertube-player.ts')
-rw-r--r-- | client/src/assets/player/peertube-player.ts | 16 |
1 files changed, 8 insertions, 8 deletions
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: { | |||
75 | enableVolumeScroll: false, | 75 | enableVolumeScroll: false, |
76 | enableModifiersForNumbers: false, | 76 | enableModifiersForNumbers: false, |
77 | 77 | ||
78 | fullscreenKey: function (event) { | 78 | fullscreenKey: function (event: any) { |
79 | // fullscreen with the f key or Ctrl+Enter | 79 | // fullscreen with the f key or Ctrl+Enter |
80 | return event.key === 'f' || (event.ctrlKey && event.key === 'Enter') | 80 | return event.key === 'f' || (event.ctrlKey && event.key === 'Enter') |
81 | }, | 81 | }, |
82 | 82 | ||
83 | seekStep: function (event) { | 83 | seekStep: function (event: any) { |
84 | // mimic VLC seek behavior, and default to 5 (original value is 5). | 84 | // mimic VLC seek behavior, and default to 5 (original value is 5). |
85 | if (event.ctrlKey && event.altKey) { | 85 | if (event.ctrlKey && event.altKey) { |
86 | return 5 * 60 | 86 | return 5 * 60 |
@@ -95,26 +95,26 @@ function getVideojsOptions (options: { | |||
95 | 95 | ||
96 | customKeys: { | 96 | customKeys: { |
97 | increasePlaybackRateKey: { | 97 | increasePlaybackRateKey: { |
98 | key: function (event) { | 98 | key: function (event: any) { |
99 | return event.key === '>' | 99 | return event.key === '>' |
100 | }, | 100 | }, |
101 | handler: function (player) { | 101 | handler: function (player: any) { |
102 | player.playbackRate((player.playbackRate() + 0.1).toFixed(2)) | 102 | player.playbackRate((player.playbackRate() + 0.1).toFixed(2)) |
103 | } | 103 | } |
104 | }, | 104 | }, |
105 | decreasePlaybackRateKey: { | 105 | decreasePlaybackRateKey: { |
106 | key: function (event) { | 106 | key: function (event: any) { |
107 | return event.key === '<' | 107 | return event.key === '<' |
108 | }, | 108 | }, |
109 | handler: function (player) { | 109 | handler: function (player: any) { |
110 | player.playbackRate((player.playbackRate() - 0.1).toFixed(2)) | 110 | player.playbackRate((player.playbackRate() - 0.1).toFixed(2)) |
111 | } | 111 | } |
112 | }, | 112 | }, |
113 | frameByFrame: { | 113 | frameByFrame: { |
114 | key: function (event) { | 114 | key: function (event: any) { |
115 | return event.key === '.' | 115 | return event.key === '.' |
116 | }, | 116 | }, |
117 | handler: function (player, options, event) { | 117 | handler: function (player: any) { |
118 | player.pause() | 118 | player.pause() |
119 | // Calculate movement distance (assuming 30 fps) | 119 | // Calculate movement distance (assuming 30 fps) |
120 | const dist = 1 / 30 | 120 | const dist = 1 / 30 |