]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/shared-thumbnail/video-thumbnail.component.ts
Redesign channel page
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / shared-thumbnail / video-thumbnail.component.ts
index b2a2cf240e11c24a57b26873b81acffb2db6b7f4..bdede17a3d448bc13651b28cdbd6fc1a9b95754c 100644 (file)
@@ -1,5 +1,6 @@
 import { Component, EventEmitter, Input, Output } from '@angular/core'
 import { ScreenService } from '@app/core'
+import { VideoState } from '@shared/models'
 import { Video } from '../shared-main'
 
 @Component({
@@ -29,6 +30,12 @@ export class VideoThumbnailComponent {
     this.addedToWatchLaterText = $localize`Remove from watch later`
   }
 
+  isLiveEnded () {
+    if (!this.video.state) return
+
+    return this.video.state.id === VideoState.LIVE_ENDED
+  }
+
   getImageUrl () {
     if (!this.video) return ''