aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/assets/player
diff options
context:
space:
mode:
authorkontrollanten <6680299+kontrollanten@users.noreply.github.com>2022-12-28 20:59:02 +0100
committerChocobozzz <chocobozzz@cpy.re>2022-12-29 08:38:18 +0100
commit0e08a5e7492498a8c43c94277e6c3f311da8fa53 (patch)
treee7599bf543031c2736e11128e76d08f8386244f9 /client/src/assets/player
parent1f3198444f9c839508876870cb3f7feecc1b3108 (diff)
downloadPeerTube-0e08a5e7492498a8c43c94277e6c3f311da8fa53.tar.gz
PeerTube-0e08a5e7492498a8c43c94277e6c3f311da8fa53.tar.zst
PeerTube-0e08a5e7492498a8c43c94277e6c3f311da8fa53.zip
feat(player/playbackRate): set rate with url param
Diffstat (limited to 'client/src/assets/player')
-rw-r--r--client/src/assets/player/peertube-player-manager.ts4
-rw-r--r--client/src/assets/player/types/manager-options.ts2
2 files changed, 6 insertions, 0 deletions
diff --git a/client/src/assets/player/peertube-player-manager.ts b/client/src/assets/player/peertube-player-manager.ts
index 710c9dc87..413ec2b80 100644
--- a/client/src/assets/player/peertube-player-manager.ts
+++ b/client/src/assets/player/peertube-player-manager.ts
@@ -97,6 +97,10 @@ export class PeertubePlayerManager {
97 videojs(options.common.playerElement, videojsOptions, function (this: videojs.Player) { 97 videojs(options.common.playerElement, videojsOptions, function (this: videojs.Player) {
98 const player = this 98 const player = this
99 99
100 if (!isNaN(+options.common.playbackRate)) {
101 player.playbackRate(+options.common.playbackRate)
102 }
103
100 let alreadyFallback = false 104 let alreadyFallback = false
101 105
102 const handleError = () => { 106 const handleError = () => {
diff --git a/client/src/assets/player/types/manager-options.ts b/client/src/assets/player/types/manager-options.ts
index 3057a5adb..78b2e30f4 100644
--- a/client/src/assets/player/types/manager-options.ts
+++ b/client/src/assets/player/types/manager-options.ts
@@ -29,6 +29,8 @@ export interface CustomizationOptions {
29 resume?: string 29 resume?: string
30 30
31 peertubeLink: boolean 31 peertubeLink: boolean
32
33 playbackRate: number | string
32} 34}
33 35
34export interface CommonOptions extends CustomizationOptions { 36export interface CommonOptions extends CustomizationOptions {