respect video history on explicit playlist click
authorRigel Kent <sendmemail@rigelk.eu>
Wed, 18 Dec 2019 22:39:07 +0000 (23:39 +0100)
committerRigel Kent <sendmemail@rigelk.eu>
Wed, 18 Dec 2019 22:39:11 +0000 (23:39 +0100)
also correct font-weight for .title-page-single, and tooltip dynamic
text for playlist loop button.

fixes #1889

client/src/app/shared/video-playlist/video-playlist-element-miniature.component.ts
client/src/app/videos/+video-watch/video-watch-playlist.component.html
client/src/app/videos/+video-watch/video-watch.component.ts
client/src/assets/player/bezels/bezels-plugin.ts
client/src/assets/player/peertube-player-manager.ts
client/src/sass/application.scss

index cd592eab082aea423324c8b781300ae8beb46889..bb2fe7da38df5dda65febdadbb7b5df5edfc2c6c 100644 (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
     }
   }
 
index a04081d35bfc6d6411147a37c37ca3ebf316bb22..d43dcec9330db74e5b5531b7045e232fd735f9da 100644 (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>
index 9eae45fed912fab777c77595c04614a5347f6be7..dbd75b35a57335faa6ec3f9ea6326821357f657e 100644 (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)
index 4317d60f95dfd587b1830f027086164a52fd867f..c2c2519617846acfcdf730b00f2a6d6ac8981c7a 100644 (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()
     })
index ac3609c04cef1e1fede4fb14a4f2367b9f272b5e..27aa360e66e8aa30cdbefadf085270dadf3a5cfb 100644 (file)
@@ -52,6 +52,7 @@ export interface CustomizationOptions {
   muted?: boolean
   loop?: boolean
   subtitle?: string
+  resume?: string
 
   peertubeLink: boolean
 }
index 463aeec5b953f8f08d3c0aafcfaae3eb4e4e1b5e..751f101ed6481cf9296f9468127d55653ec1eb60 100644 (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);
   }