Make video loading dynamic.

This commit is contained in:
Florian THIERRY
2026-07-24 15:38:36 +02:00
parent cef96884c6
commit b6ab469616
4 changed files with 30 additions and 16 deletions
+1 -4
View File
@@ -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();