aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/assets/player/peertube-player.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/assets/player/peertube-player.ts')
-rw-r--r--client/src/assets/player/peertube-player.ts16
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