aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/assets/player
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/assets/player')
-rw-r--r--client/src/assets/player/peertube-player-manager.ts3
-rw-r--r--client/src/assets/player/utils.ts13
2 files changed, 2 insertions, 14 deletions
diff --git a/client/src/assets/player/peertube-player-manager.ts b/client/src/assets/player/peertube-player-manager.ts
index da23c59a7..9407cf123 100644
--- a/client/src/assets/player/peertube-player-manager.ts
+++ b/client/src/assets/player/peertube-player-manager.ts
@@ -35,7 +35,8 @@ import {
35 VideoJSPluginOptions 35 VideoJSPluginOptions
36} from './peertube-videojs-typings' 36} from './peertube-videojs-typings'
37import { TranslationsManager } from './translations-manager' 37import { TranslationsManager } from './translations-manager'
38import { buildVideoOrPlaylistEmbed, buildVideoLink, copyToClipboard, getRtcConfig, isSafari, isIOS } from './utils' 38import { buildVideoOrPlaylistEmbed, buildVideoLink, getRtcConfig, isSafari, isIOS } from './utils'
39import { copyToClipboard } from '../../root-helpers/utils'
39 40
40// Change 'Playback Rate' to 'Speed' (smaller for our settings menu) 41// Change 'Playback Rate' to 'Speed' (smaller for our settings menu)
41(videojs.getComponent('PlaybackRateMenuButton') as any).prototype.controlText_ = 'Speed' 42(videojs.getComponent('PlaybackRateMenuButton') as any).prototype.controlText_ = 'Speed'
diff --git a/client/src/assets/player/utils.ts b/client/src/assets/player/utils.ts
index ce7a7fe6c..280f721bd 100644
--- a/client/src/assets/player/utils.ts
+++ b/client/src/assets/player/utils.ts
@@ -176,18 +176,6 @@ function buildVideoOrPlaylistEmbed (embedUrl: string) {
176 '</iframe>' 176 '</iframe>'
177} 177}
178 178
179function copyToClipboard (text: string) {
180 const el = document.createElement('textarea')
181 el.value = text
182 el.setAttribute('readonly', '')
183 el.style.position = 'absolute'
184 el.style.left = '-9999px'
185 document.body.appendChild(el)
186 el.select()
187 document.execCommand('copy')
188 document.body.removeChild(el)
189}
190
191function videoFileMaxByResolution (files: VideoFile[]) { 179function videoFileMaxByResolution (files: VideoFile[]) {
192 let max = files[0] 180 let max = files[0]
193 181
@@ -236,7 +224,6 @@ export {
236 buildVideoOrPlaylistEmbed, 224 buildVideoOrPlaylistEmbed,
237 videoFileMaxByResolution, 225 videoFileMaxByResolution,
238 videoFileMinByResolution, 226 videoFileMinByResolution,
239 copyToClipboard,
240 isMobile, 227 isMobile,
241 bytes, 228 bytes,
242 isIOS, 229 isIOS,