Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Add thumbnail info if live

Chocobozzzda0310f821b0
diff --git a/client/src/app/+videos/+video-watch/video-watch.component.html b/client/src/app/+videos/+video-watch/video-watch.component.html
index bc1c302de5..74c82fbfd8 100644
--- a/client/src/app/+videos/+video-watch/video-watch.component.html
+++ b/client/src/app/+videos/+video-watch/video-watch.component.html
@@ -268,7 +268,7 @@
>{{ tag }}</a>
</div>
- <div class="video-attribute">
+ <div class="video-attribute" *ngIf="!video.isLive">
<span i18n class="video-attribute-label">Duration</span>
<span class="video-attribute-value">{{ video.duration | myDurationFormatter }}</span>
</div>
diff --git a/client/src/app/shared/shared-thumbnail/video-thumbnail.component.html b/client/src/app/shared/shared-thumbnail/video-thumbnail.component.html
index 0cb0f321bb..be07844ab3 100644
--- a/client/src/app/shared/shared-thumbnail/video-thumbnail.component.html
+++ b/client/src/app/shared/shared-thumbnail/video-thumbnail.component.html
@@ -26,7 +26,8 @@
<div class="video-thumbnail-label-overlay warning"><ng-content select="label-warning"></ng-content></div>
<div class="video-thumbnail-label-overlay danger"><ng-content select="label-danger"></ng-content></div>
- <div class="video-thumbnail-duration-overlay">{{ video.durationLabel }}</div>
+ <div class="video-thumbnail-duration-overlay" *ngIf="!video.isLive">{{ video.durationLabel }}</div>
+ <div i18n class="video-thumbnail-live-overlay" *ngIf="video.isLive">LIVE</div>
<div class="play-overlay">
<div class="icon"></div>
diff --git a/client/src/app/shared/shared-thumbnail/video-thumbnail.component.scss b/client/src/app/shared/shared-thumbnail/video-thumbnail.component.scss
index feff78a878..1b6151c895 100644
--- a/client/src/app/shared/shared-thumbnail/video-thumbnail.component.scss
+++ b/client/src/app/shared/shared-thumbnail/video-thumbnail.component.scss
@@ -20,7 +20,8 @@
.video-thumbnail-watch-later-overlay,
.video-thumbnail-label-overlay,
- .video-thumbnail-duration-overlay {
+ .video-thumbnail-duration-overlay,
+ .video-thumbnail-live-overlay {
@include static-thumbnail-overlay;
border-radius: 3px;
@@ -41,13 +42,20 @@
&.danger { background-color: red; }
}
- .video-thumbnail-duration-overlay {
+ .video-thumbnail-duration-overlay,
+ .video-thumbnail-live-overlay {
position: absolute;
padding: 0 3px;
right: 5px;
bottom: 5px;
}
+ .video-thumbnail-live-overlay {
+ background-color: rgba(224, 8, 8, 0.7);
+ color: #fff;
+ font-weight: $font-semibold;
+ }
+
.video-thumbnail-actions-overlay {
position: absolute;
display: flex;