Added backend and database support for video streaming

Added UI support for video streaming. branch is now feature-complete
This commit is contained in:
Isaac Grynsztein
2020-04-09 23:33:58 -04:00
parent a61606b69f
commit e15141c5e0
7 changed files with 60 additions and 16 deletions

View File

@@ -54,7 +54,11 @@ export class SubscriptionFileCardComponent implements OnInit {
}
goToFile() {
this.goToFileEmit.emit(this.file.id);
const emit_obj = {
name: this.file.id,
url: this.file.requested_formats ? this.file.requested_formats[0].url : this.file.url
}
this.goToFileEmit.emit(emit_obj);
}
openSubscriptionInfoDialog() {

View File

@@ -84,10 +84,16 @@ export class SubscriptionComponent implements OnInit {
});
}
goToFile(name) {
goToFile(emit_obj) {
const name = emit_obj['name'];
const url = emit_obj['url'];
localStorage.setItem('player_navigator', this.router.url);
this.router.navigate(['/player', {fileNames: name, type: 'subscription', subscriptionName: this.subscription.name,
subPlaylist: this.subscription.isPlaylist}]);
if (this.subscription.streamingOnly) {
this.router.navigate(['/player', {name: name, url: url}]);
} else {
this.router.navigate(['/player', {fileNames: name, type: 'subscription', subscriptionName: this.subscription.name,
subPlaylist: this.subscription.isPlaylist}]);
}
}
onSearchInputChanged(newvalue) {