aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/assets
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/assets')
-rw-r--r--client/src/assets/images/feather/codesandbox.svg1
-rw-r--r--client/src/assets/player/peertube-player-manager.ts3
-rw-r--r--client/src/assets/player/utils.ts13
3 files changed, 3 insertions, 14 deletions
diff --git a/client/src/assets/images/feather/codesandbox.svg b/client/src/assets/images/feather/codesandbox.svg
new file mode 100644
index 000000000..49848f520
--- /dev/null
+++ b/client/src/assets/images/feather/codesandbox.svg
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-codesandbox"><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path><polyline points="7.5 4.21 12 6.81 16.5 4.21"></polyline><polyline points="7.5 19.79 7.5 14.6 3 12"></polyline><polyline points="21 12 16.5 14.6 16.5 19.79"></polyline><polyline points="3.27 6.96 12 12.01 20.73 6.96"></polyline><line x1="12" y1="22.08" x2="12" y2="12"></line></svg> \ No newline at end of file
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,