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
pull/2356/head
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 {
videoId: this.playlistElement.video.uuid,
start: this.playlistElement.startTimestamp,
stop: this.playlistElement.stopTimestamp
stop: this.playlistElement.stopTimestamp,
resume: true
}
}

View File

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

View File

@ -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)

View File

@ -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()
})

View File

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

View File

@ -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);
}