]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/+videos/+video-watch/video-watch.component.ts
Fix live image aspect ratio in theatre mode
[github/Chocobozzz/PeerTube.git] / client / src / app / +videos / +video-watch / video-watch.component.ts
index 10782682424b03445b668724c5aa50ef8dce7166..116139d473e372fa39db69415c3914904b069904 100644 (file)
@@ -189,11 +189,11 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
 
     this.queryParamsSub = this.route.queryParams.subscribe(queryParams => {
       // Handle the ?playlistPosition
-      const positionParam = queryParams[ 'playlistPosition' ]
+      const positionParam = queryParams[ 'playlistPosition' ] ?? 1
 
       this.playlistPosition = positionParam === 'last'
         ? -1 // Handle the "last" index
-        : parseInt(positionParam, 10)
+        : parseInt(positionParam + '', 10)
 
       if (isNaN(this.playlistPosition)) {
         console.error(`playlistPosition query param '${positionParam}' was parsed as NaN, defaulting to 1.`)
@@ -674,7 +674,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
 
       this.player.one('ended', () => {
         if (this.video.isLive) {
-          this.video.state.id = VideoState.LIVE_ENDED
+          this.zone.run(() => this.video.state.id = VideoState.LIVE_ENDED)
         }
       })