mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-04-22 02:23:21 +03:00
Added video previews when hovering over a file card
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user