diff --git a/src/app/components/unified-file-card/unified-file-card.component.html b/src/app/components/unified-file-card/unified-file-card.component.html index 9e379865..39c8ade5 100644 --- a/src/app/components/unified-file-card/unified-file-card.component.html +++ b/src/app/components/unified-file-card/unified-file-card.component.html @@ -51,8 +51,10 @@
-
- Thumbnail +
+ Thumbnail +
{{file_length}}
diff --git a/src/app/components/unified-file-card/unified-file-card.component.scss b/src/app/components/unified-file-card/unified-file-card.component.scss index 9726f44c..b1c4200c 100644 --- a/src/app/components/unified-file-card/unified-file-card.component.scss +++ b/src/app/components/unified-file-card/unified-file-card.component.scss @@ -51,6 +51,30 @@ object-fit: cover; } +.video-large { + width: 300px; + height: 167.5px; + object-fit: cover; + position: absolute; + top: 0px; +} + +.video { + width: 200px; + height: 112.5px; + object-fit: cover; + position: absolute; + top: 0px; +} + +.video-small { + width: 150px; + height: 84.5px; + object-fit: cover; + position: absolute; + top: 0px; +} + .example-full-width-height { width: 100%; height: 100% diff --git a/src/app/components/unified-file-card/unified-file-card.component.ts b/src/app/components/unified-file-card/unified-file-card.component.ts index 0f92bf0b..354d9213 100644 --- a/src/app/components/unified-file-card/unified-file-card.component.ts +++ b/src/app/components/unified-file-card/unified-file-card.component.ts @@ -35,6 +35,8 @@ export class UnifiedFileCardComponent implements OnInit { // optional vars thumbnailBlobURL = null; + streamURL = null; + // input/output @Input() loading = true; @Input() theme = null; @@ -78,6 +80,8 @@ export class UnifiedFileCardComponent implements OnInit { const bloburl = URL.createObjectURL(blob); this.thumbnailBlobURL = this.sanitizer.bypassSecurityTrustUrl(bloburl);*/ } + + this.streamURL = this.generateStreamURL(); } emitDeleteFile(blacklistMode = false) { @@ -128,6 +132,23 @@ export class UnifiedFileCardComponent implements OnInit { this.contextMenu.openMenu(); } + generateStreamURL() { + let baseLocation = 'stream/'; + let fullLocation = this.baseStreamPath + baseLocation + `?test=test&uid=${this.file_obj['uid']}`; + + if (this.jwtString) { + fullLocation += `&jwt=${this.jwtString}`; + } + + if (this.file_obj['sub_id']) { + fullLocation += `&sub_id=${this.file_obj['sub_id']}`; + } + + fullLocation += '&t=,10'; + + return fullLocation; + } + } function fancyTimeFormat(time) {