diff --git a/src/frontend/fields/attachments/bunny-service.ts b/src/frontend/fields/attachments/bunny-service.ts index 9397f2d..84edcb4 100644 --- a/src/frontend/fields/attachments/bunny-service.ts +++ b/src/frontend/fields/attachments/bunny-service.ts @@ -103,6 +103,23 @@ export default class BunnyService implements HostService { return { url: '' }; }; + public async fetchVideoTitle(videoId: string): Promise<{ title?: string }> { + const { default: axios } = await import('axios'); + + const response = await axios.get( + `${authority}/library/${this.libraryId}/videos/${videoId}`, + { + headers: { + AccessKey: this.accessKey, + }, + }, + ); + + return { + title: response.data.title, + }; + } + public get url(): string | null { return this.guid ? `https://${this.host}/${this.guid}/playlist.m3u8` : null; } diff --git a/src/frontend/fields/attachments/video-meta.story.vue b/src/frontend/fields/attachments/video-meta.story.vue new file mode 100644 index 0000000..a2aea03 --- /dev/null +++ b/src/frontend/fields/attachments/video-meta.story.vue @@ -0,0 +1,17 @@ + + + + + + + + + diff --git a/src/frontend/fields/attachments/video-meta.vue b/src/frontend/fields/attachments/video-meta.vue new file mode 100644 index 0000000..b02e762 --- /dev/null +++ b/src/frontend/fields/attachments/video-meta.vue @@ -0,0 +1,43 @@ + + + + + {{ row.label }} + + + + {{ row.value }} + + + + + + + + + diff --git a/src/frontend/fields/attachments/video-player.vue b/src/frontend/fields/attachments/video-player.vue index 54ea7c4..2d5ad9d 100644 --- a/src/frontend/fields/attachments/video-player.vue +++ b/src/frontend/fields/attachments/video-player.vue @@ -1,6 +1,12 @@ - - + + diff --git a/src/frontend/fields/video-field.vue b/src/frontend/fields/video-field.vue index 6ec14eb..98c41fb 100644 --- a/src/frontend/fields/video-field.vue +++ b/src/frontend/fields/video-field.vue @@ -17,7 +17,12 @@ @attached="onAttached" @dropped="onDropped" > - + + + + + + @@ -27,7 +32,7 @@ diff --git a/src/frontend/shared/icon.vue b/src/frontend/shared/icon.vue index 33cb5a2..9199730 100644 --- a/src/frontend/shared/icon.vue +++ b/src/frontend/shared/icon.vue @@ -738,6 +738,20 @@ fill="#1D4ED8" /> + + + +