diff --git a/src/components/list.ts b/src/components/list.ts index 7e35ba9..ccccda9 100644 --- a/src/components/list.ts +++ b/src/components/list.ts @@ -42,6 +42,10 @@ export class List extends MaveElement { } } + refresh(): Promise { + return this.embedController.refresh(); + } + containsEmbed(embedId: string): boolean { return this._collection?.videos?.some((video) => video.id === embedId); } diff --git a/src/embed/controller.ts b/src/embed/controller.ts index 1b203e1..7ddb626 100644 --- a/src/embed/controller.ts +++ b/src/embed/controller.ts @@ -117,6 +117,11 @@ export class EmbedController { return Config.cdn.endpoint.replace('${this.spaceId}', this.spaceId); } + refresh(): Promise { + this.loading = true; + return this.task?.run(); + } + embedFile(file: string, params = new URLSearchParams()): string { const url = new URL( `${this.cdnRoot}/${this.embedId}${file == 'manifest' ? '/' : this.version}${file}`,