feat(player/playbackRate): set rate with url param

pull/5502/head
kontrollanten 2022-12-28 20:59:02 +01:00 committed by Chocobozzz
parent 1f3198444f
commit 0e08a5e749
3 changed files with 8 additions and 0 deletions

View File

@ -295,6 +295,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
subtitle: queryParams.subtitle,
playerMode: queryParams.mode,
playbackRate: queryParams.playbackRate,
peertubeLink: false
}
@ -657,6 +658,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
muted: urlOptions.muted,
loop: urlOptions.loop,
subtitle: urlOptions.subtitle,
playbackRate: urlOptions.playbackRate,
peertubeLink: urlOptions.peertubeLink,

View File

@ -97,6 +97,10 @@ export class PeertubePlayerManager {
videojs(options.common.playerElement, videojsOptions, function (this: videojs.Player) {
const player = this
if (!isNaN(+options.common.playbackRate)) {
player.playbackRate(+options.common.playbackRate)
}
let alreadyFallback = false
const handleError = () => {

View File

@ -29,6 +29,8 @@ export interface CustomizationOptions {
resume?: string
peertubeLink: boolean
playbackRate: number | string
}
export interface CommonOptions extends CustomizationOptions {