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,
|
subtitle: queryParams.subtitle,
|
||||||
|
|
||||||
playerMode: queryParams.mode,
|
playerMode: queryParams.mode,
|
||||||
|
playbackRate: queryParams.playbackRate,
|
||||||
peertubeLink: false
|
peertubeLink: false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -657,6 +658,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
|
||||||
muted: urlOptions.muted,
|
muted: urlOptions.muted,
|
||||||
loop: urlOptions.loop,
|
loop: urlOptions.loop,
|
||||||
subtitle: urlOptions.subtitle,
|
subtitle: urlOptions.subtitle,
|
||||||
|
playbackRate: urlOptions.playbackRate,
|
||||||
|
|
||||||
peertubeLink: urlOptions.peertubeLink,
|
peertubeLink: urlOptions.peertubeLink,
|
||||||
|
|
||||||
|
|
|
@ -97,6 +97,10 @@ export class PeertubePlayerManager {
|
||||||
videojs(options.common.playerElement, videojsOptions, function (this: videojs.Player) {
|
videojs(options.common.playerElement, videojsOptions, function (this: videojs.Player) {
|
||||||
const player = this
|
const player = this
|
||||||
|
|
||||||
|
if (!isNaN(+options.common.playbackRate)) {
|
||||||
|
player.playbackRate(+options.common.playbackRate)
|
||||||
|
}
|
||||||
|
|
||||||
let alreadyFallback = false
|
let alreadyFallback = false
|
||||||
|
|
||||||
const handleError = () => {
|
const handleError = () => {
|
||||||
|
|
|
@ -29,6 +29,8 @@ export interface CustomizationOptions {
|
||||||
resume?: string
|
resume?: string
|
||||||
|
|
||||||
peertubeLink: boolean
|
peertubeLink: boolean
|
||||||
|
|
||||||
|
playbackRate: number | string
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface CommonOptions extends CustomizationOptions {
|
export interface CommonOptions extends CustomizationOptions {
|
||||||
|
|
Loading…
Reference in New Issue