Skip to content
This repository has been archived by the owner on Jan 6, 2024. It is now read-only.

Commit

Permalink
feat(assets): support audio assets preview (#187)
Browse files Browse the repository at this point in the history
  • Loading branch information
OneGIl authored Aug 7, 2023
1 parent 28815b1 commit ac91b3f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/client/components/AssetDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ const supportsPreview = computed(() => {
'image',
'text',
'video',
'audio',
'font',
].includes(asset.value.type)
})
Expand Down
4 changes: 4 additions & 0 deletions packages/client/components/AssetPreview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ defineProps<{
<div v-else-if="asset.type === 'video'">
<video :src="asset.publicPath" :autoplay="detail" :controls="detail" />
</div>
<div v-else-if="asset.type === 'audio'">
<audio v-if="detail" :src="asset.publicPath" :autoplay="detail" :controls="detail" />
<div v-else i-carbon:volume-up text-3xl op20 />
</div>
<div v-else i-carbon-help text-3xl op20 />
</div>
</template>

0 comments on commit ac91b3f

Please sign in to comment.