aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/assets/player/peertube-player-manager.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/assets/player/peertube-player-manager.ts')
-rw-r--r--client/src/assets/player/peertube-player-manager.ts9
1 files changed, 7 insertions, 2 deletions
diff --git a/client/src/assets/player/peertube-player-manager.ts b/client/src/assets/player/peertube-player-manager.ts
index 018845a54..b112e231f 100644
--- a/client/src/assets/player/peertube-player-manager.ts
+++ b/client/src/assets/player/peertube-player-manager.ts
@@ -500,7 +500,8 @@ export class PeertubePlayerManager {
500 const isLoopEnabled = player.options_['loop'] 500 const isLoopEnabled = player.options_['loop']
501 const items = [ 501 const items = [
502 { 502 {
503 label: isLoopEnabled ? player.localize('Stop playing in loop') : player.localize('Play in loop'), 503 icon: 'repeat',
504 label: player.localize('Play in loop') + (isLoopEnabled ? '<span class="vjs-icon-tick-white"></span>' : ''),
504 listener: function () { 505 listener: function () {
505 player.options_['loop'] = !isLoopEnabled 506 player.options_['loop'] = !isLoopEnabled
506 } 507 }
@@ -518,6 +519,7 @@ export class PeertubePlayerManager {
518 } 519 }
519 }, 520 },
520 { 521 {
522 icon: 'code',
521 label: player.localize('Copy embed code'), 523 label: player.localize('Copy embed code'),
522 listener: () => { 524 listener: () => {
523 copyToClipboard(buildVideoOrPlaylistEmbed(videoEmbedUrl, videoEmbedTitle)) 525 copyToClipboard(buildVideoOrPlaylistEmbed(videoEmbedUrl, videoEmbedTitle))
@@ -534,7 +536,10 @@ export class PeertubePlayerManager {
534 }) 536 })
535 } 537 }
536 538
537 return items 539 return items.map(i => ({
540 ...i,
541 label: `<span class="vjs-icon-${i.icon || 'link-2'}"></span>` + i.label
542 }))
538 } 543 }
539 544
540 // adding the menu 545 // adding the menu