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:
parent
9650937374
commit
96f6278f3e
|
@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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)
|
||||||
|
|
|
@ -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()
|
||||||
})
|
})
|
||||||
|
|
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue