mirror of https://github.com/Chocobozzz/PeerTube
feat(player/playbackRate): set rate with url param
parent
1f3198444f
commit
0e08a5e749
|
@ -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,
|
||||
|
||||
|
|
|
@ -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 = () => {
|
||||
|
|
|
@ -29,6 +29,8 @@ export interface CustomizationOptions {
|
|||
resume?: string
|
||||
|
||||
peertubeLink: boolean
|
||||
|
||||
playbackRate: number | string
|
||||
}
|
||||
|
||||
export interface CommonOptions extends CustomizationOptions {
|
||||
|
|
Loading…
Reference in New Issue