Make video loading dynamic.
This commit is contained in:
@@ -28,10 +28,7 @@ export class App implements OnInit {
|
||||
loader: ({}) => firstValueFrom(this.#httpClient.get<LibraryItem[]>('/api/library'))
|
||||
});
|
||||
|
||||
firstVideo = computed(() => {
|
||||
const libraryItems = this.libraryItems.value() ?? [];
|
||||
return libraryItems.length ? libraryItems[0] : null
|
||||
});
|
||||
activeVideo = signal<LibraryItem | null>(null);
|
||||
|
||||
ngOnInit(): void {
|
||||
this.loadLibrary();
|
||||
|
||||
Reference in New Issue
Block a user