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
This commit is contained in:
Rigel Kent 2019-12-18 23:39:07 +01:00
parent 9650937374
commit 96f6278f3e
No known key found for this signature in database
GPG Key ID: 5E53E96A494E452F
6 changed files with 7 additions and 5 deletions

View File

@ -86,7 +86,8 @@ export class VideoPlaylistElementMiniatureComponent implements OnInit {
return { return {
videoId: this.playlistElement.video.uuid, videoId: this.playlistElement.video.uuid,
start: this.playlistElement.startTimestamp, start: this.playlistElement.startTimestamp,
stop: this.playlistElement.stopTimestamp stop: this.playlistElement.stopTimestamp,
resume: true
} }
} }

View File

@ -29,7 +29,7 @@
iconName="repeat" iconName="repeat"
[class.active]="loopPlaylist" [class.active]="loopPlaylist"
(click)="switchLoopPlaylist()" (click)="switchLoopPlaylist()"
[ngbTooltip]="'Loop playlist videos'" [ngbTooltip]="loopPlaylistSwitchText"
placement="bottom auto" placement="bottom auto"
container="body" container="body"
></my-global-icon> ></my-global-icon>

View File

@ -619,7 +619,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
const { video, videoCaptions, urlOptions, user } = params const { video, videoCaptions, urlOptions, user } = params
const getStartTime = () => { const getStartTime = () => {
const byUrl = urlOptions.startTime !== undefined const byUrl = urlOptions.startTime !== undefined
const byHistory = video.userHistory && !this.playlist const byHistory = video.userHistory && (!this.playlist || urlOptions.resume !== undefined)
if (byUrl) { if (byUrl) {
return timeToInt(urlOptions.startTime) return timeToInt(urlOptions.startTime)

View File

@ -43,7 +43,7 @@ class PauseBezel extends Component {
this.options_ = options this.options_ = options
player.on('pause', (_: any) => { player.on('pause', (_: any) => {
if (player.seeking()) return if (player.seeking() || player.ended()) return
this.container.innerHTML = getPauseBezel() this.container.innerHTML = getPauseBezel()
this.showBezel() this.showBezel()
}) })

View File

@ -52,6 +52,7 @@ export interface CustomizationOptions {
muted?: boolean muted?: boolean
loop?: boolean loop?: boolean
subtitle?: string subtitle?: string
resume?: string
peertubeLink: boolean peertubeLink: boolean
} }

View File

@ -142,12 +142,12 @@ label {
@include disable-default-a-behaviour; @include disable-default-a-behaviour;
&.active, &.title-page-single { &.active, &.title-page-single {
font-weight: $font-bold;
margin-top: 30px; margin-top: 30px;
margin-bottom: 25px; margin-bottom: 25px;
} }
&.active { &.active {
font-weight: $font-bold;
border-bottom: 2px solid var(--mainColor); border-bottom: 2px solid var(--mainColor);
} }