feat: render ExternalLink when media type is not determined
This commit is contained in:
parent
0444c887f4
commit
c9723de863
1 changed files with 2 additions and 1 deletions
|
|
@ -3,6 +3,7 @@ import { useEffect, useState } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import AudioPlayer from '../AudioPlayer'
|
import AudioPlayer from '../AudioPlayer'
|
||||||
import VideoPlayer from '../VideoPlayer'
|
import VideoPlayer from '../VideoPlayer'
|
||||||
|
import ExternalLink from '../ExternalLink'
|
||||||
|
|
||||||
export default function MediaPlayer({
|
export default function MediaPlayer({
|
||||||
src,
|
src,
|
||||||
|
|
@ -77,7 +78,7 @@ export default function MediaPlayer({
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!mediaType) {
|
if (!mediaType) {
|
||||||
return null
|
return <ExternalLink url={src} />
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mediaType === 'video') {
|
if (mediaType === 'video') {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue