|
|
@@ -85,7 +85,7 @@ export const AudioFilePreview = React.forwardRef<AudioFilePreviewDerivedComponen |
|
|
|
)} |
|
|
|
style={style} |
|
|
|
> |
|
|
|
<div className="h-full relative col-span-2"> |
|
|
|
<div className="sm:h-full relative col-span-2"> |
|
|
|
{ |
|
|
|
typeof fileWithMetadata.url === 'string' |
|
|
|
&& ( |
|
|
@@ -94,7 +94,7 @@ export const AudioFilePreview = React.forwardRef<AudioFilePreviewDerivedComponen |
|
|
|
data-testid="preview" |
|
|
|
> |
|
|
|
<div |
|
|
|
className="w-full flex-auto relative" |
|
|
|
className="w-full flex-auto relative aspect-video sm:aspect-auto" |
|
|
|
key={`${fileWithMetadata?.url ?? ''}:${fileWithMetadata?.type ?? ''}`} |
|
|
|
> |
|
|
|
<audio |
|
|
@@ -117,7 +117,7 @@ export const AudioFilePreview = React.forwardRef<AudioFilePreviewDerivedComponen |
|
|
|
<> |
|
|
|
<WaveformCanvas |
|
|
|
className={clsx( |
|
|
|
'sm:absolute w-full sm:h-full top-0 left-0 block object-center object-contain flex-auto aspect-video sm:aspect-auto bg-primary/10 cursor-text', |
|
|
|
'absolute w-full sm:h-full top-0 left-0 block object-center object-contain flex-auto aspect-video sm:aspect-auto bg-primary/10 cursor-text', |
|
|
|
visualizationMode !== 'waveform' && 'opacity-0', |
|
|
|
)} |
|
|
|
ref={mediaControllerRef} |
|
|
@@ -136,7 +136,7 @@ export const AudioFilePreview = React.forwardRef<AudioFilePreviewDerivedComponen |
|
|
|
/> |
|
|
|
<SpectrogramCanvas |
|
|
|
className={clsx( |
|
|
|
'sm:absolute w-full sm:h-full top-0 left-0 block object-center object-contain flex-auto aspect-video sm:aspect-auto bg-primary/10 pointer-events-none', |
|
|
|
'absolute w-full sm:h-full top-0 left-0 block object-center object-contain flex-auto aspect-video sm:aspect-auto bg-primary/10 pointer-events-none', |
|
|
|
visualizationMode !== 'spectrum' && 'opacity-0', |
|
|
|
)} |
|
|
|
ref={mediaControllerRef} |
|
|
|