diff --git a/dev/docker-compose.yaml b/dev/docker-compose.yaml index 1d9c99020f..ec957b7669 100644 --- a/dev/docker-compose.yaml +++ b/dev/docker-compose.yaml @@ -1,12 +1,13 @@ services: stream: - image: 'hardcoreeng/huly-stream' + image: 'hardcoreeng/stream' extra_hosts: - 'huly.local:host-gateway' container_name: stream environment: - STREAM_ENDPOINT_URL=s3://huly.local:9000 - STREAM_INSECURE=true + - STREAM_SERVER_SECRET=secret - AWS_ACCESS_KEY_ID=minioadmin - AWS_SECRET_ACCESS_KEY=minioadmin ports: diff --git a/packages/presentation/src/preview.ts b/packages/presentation/src/preview.ts index b91827c2bc..d9b7d7da71 100644 --- a/packages/presentation/src/preview.ts +++ b/packages/presentation/src/preview.ts @@ -11,9 +11,12 @@ export interface PreviewConfig { } export interface VideoMeta { - status: 'ready' | 'error' | 'inprogress' | 'queued' | 'downloading' | 'pendingupload' - thumbnail: string - hls: string + hls?: HLSMeta +} + +export interface HLSMeta { + thumbnail?: string + source?: string } const defaultImagePreview = (): string => `/files/${getCurrentWorkspaceUuid()}?file=:blobId&size=:size` diff --git a/plugins/attachment-resources/src/components/AttachmentVideoPreview.svelte b/plugins/attachment-resources/src/components/AttachmentVideoPreview.svelte index f97936a96d..a6d4d2c87c 100644 --- a/plugins/attachment-resources/src/components/AttachmentVideoPreview.svelte +++ b/plugins/attachment-resources/src/components/AttachmentVideoPreview.svelte @@ -64,8 +64,8 @@ {#await getVideoMeta(value.file, value.name) then meta} {@const src = getFileUrl(value.file, value.name)} - {#if meta && meta.status === 'ready'} - + {#if meta?.hls?.source !== undefined} + {:else}