From 1198a08cc76c9b25209e776a3cfc529584cbdd67 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 1 Mar 2018 14:14:56 +0100 Subject: Fix playback rate --- client/src/app/videos/+video-watch/video-watch.component.ts | 2 +- client/src/assets/player/peertube-videojs-plugin.ts | 2 ++ client/src/sass/video-js-custom.scss | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) (limited to 'client/src') diff --git a/client/src/app/videos/+video-watch/video-watch.component.ts b/client/src/app/videos/+video-watch/video-watch.component.ts index 66ef0399a..b1dd3d10b 100644 --- a/client/src/app/videos/+video-watch/video-watch.component.ts +++ b/client/src/app/videos/+video-watch/video-watch.component.ts @@ -341,7 +341,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy { const videojsOptions = { controls: true, autoplay: this.isAutoplay(), - playbackRates: [0.5, 1, 1.25, 1.5, 2], + playbackRates: [ 0.5, 1, 1.5, 2 ], plugins: { peertube: { videoFiles: this.video.files, diff --git a/client/src/assets/player/peertube-videojs-plugin.ts b/client/src/assets/player/peertube-videojs-plugin.ts index 618d77cbe..3b366ec9b 100644 --- a/client/src/assets/player/peertube-videojs-plugin.ts +++ b/client/src/assets/player/peertube-videojs-plugin.ts @@ -307,7 +307,9 @@ class PeerTubePlugin extends Plugin { // Do not display error to user because we will have multiple fallbacks this.disableErrorDisplay() + this.player.src = () => true + this.player.playbackRate(1) const previousVideoFile = this.currentVideoFile this.currentVideoFile = videoFile diff --git a/client/src/sass/video-js-custom.scss b/client/src/sass/video-js-custom.scss index f2251244a..3dfad5ff6 100644 --- a/client/src/sass/video-js-custom.scss +++ b/client/src/sass/video-js-custom.scss @@ -220,7 +220,7 @@ $control-bar-height: 34px; .vjs-playback-rate { font-size: 10px; - margin-right: 48px; + margin-right: 50px; .vjs-playback-rate-value { font-size: 13px; -- cgit v1.2.3