From 96f6278f3e5b35d6e812176c799088f88729a0b0 Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Wed, 18 Dec 2019 23:39:07 +0100 Subject: respect video history on explicit playlist click also correct font-weight for .title-page-single, and tooltip dynamic text for playlist loop button. fixes #1889 --- .../video-playlist/video-playlist-element-miniature.component.ts | 3 ++- client/src/app/videos/+video-watch/video-watch-playlist.component.html | 2 +- client/src/app/videos/+video-watch/video-watch.component.ts | 2 +- client/src/assets/player/bezels/bezels-plugin.ts | 2 +- client/src/assets/player/peertube-player-manager.ts | 1 + client/src/sass/application.scss | 2 +- 6 files changed, 7 insertions(+), 5 deletions(-) (limited to 'client/src') diff --git a/client/src/app/shared/video-playlist/video-playlist-element-miniature.component.ts b/client/src/app/shared/video-playlist/video-playlist-element-miniature.component.ts index cd592eab0..bb2fe7da3 100644 --- a/client/src/app/shared/video-playlist/video-playlist-element-miniature.component.ts +++ b/client/src/app/shared/video-playlist/video-playlist-element-miniature.component.ts @@ -86,7 +86,8 @@ export class VideoPlaylistElementMiniatureComponent implements OnInit { return { videoId: this.playlistElement.video.uuid, start: this.playlistElement.startTimestamp, - stop: this.playlistElement.stopTimestamp + stop: this.playlistElement.stopTimestamp, + resume: true } } diff --git a/client/src/app/videos/+video-watch/video-watch-playlist.component.html b/client/src/app/videos/+video-watch/video-watch-playlist.component.html index a04081d35..d43dcec93 100644 --- a/client/src/app/videos/+video-watch/video-watch-playlist.component.html +++ b/client/src/app/videos/+video-watch/video-watch-playlist.component.html @@ -29,7 +29,7 @@ iconName="repeat" [class.active]="loopPlaylist" (click)="switchLoopPlaylist()" - [ngbTooltip]="'Loop playlist videos'" + [ngbTooltip]="loopPlaylistSwitchText" placement="bottom auto" container="body" > 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 9eae45fed..dbd75b35a 100644 --- a/client/src/app/videos/+video-watch/video-watch.component.ts +++ b/client/src/app/videos/+video-watch/video-watch.component.ts @@ -619,7 +619,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy { const { video, videoCaptions, urlOptions, user } = params const getStartTime = () => { const byUrl = urlOptions.startTime !== undefined - const byHistory = video.userHistory && !this.playlist + const byHistory = video.userHistory && (!this.playlist || urlOptions.resume !== undefined) if (byUrl) { return timeToInt(urlOptions.startTime) diff --git a/client/src/assets/player/bezels/bezels-plugin.ts b/client/src/assets/player/bezels/bezels-plugin.ts index 4317d60f9..c2c251961 100644 --- a/client/src/assets/player/bezels/bezels-plugin.ts +++ b/client/src/assets/player/bezels/bezels-plugin.ts @@ -43,7 +43,7 @@ class PauseBezel extends Component { this.options_ = options player.on('pause', (_: any) => { - if (player.seeking()) return + if (player.seeking() || player.ended()) return this.container.innerHTML = getPauseBezel() this.showBezel() }) diff --git a/client/src/assets/player/peertube-player-manager.ts b/client/src/assets/player/peertube-player-manager.ts index ac3609c04..27aa360e6 100644 --- a/client/src/assets/player/peertube-player-manager.ts +++ b/client/src/assets/player/peertube-player-manager.ts @@ -52,6 +52,7 @@ export interface CustomizationOptions { muted?: boolean loop?: boolean subtitle?: string + resume?: string peertubeLink: boolean } diff --git a/client/src/sass/application.scss b/client/src/sass/application.scss index 463aeec5b..751f101ed 100644 --- a/client/src/sass/application.scss +++ b/client/src/sass/application.scss @@ -142,12 +142,12 @@ label { @include disable-default-a-behaviour; &.active, &.title-page-single { - font-weight: $font-bold; margin-top: 30px; margin-bottom: 25px; } &.active { + font-weight: $font-bold; border-bottom: 2px solid var(--mainColor); } -- cgit v1.2.3