wip fix preview of audio and video files

This commit is contained in:
Thomas Ramé
2026-03-06 19:18:04 +01:00
parent a3fdb206ef
commit 1da0f6600e
2 changed files with 7 additions and 0 deletions
@@ -94,6 +94,9 @@ const AudioToExternalHTML = ({
export const AudioBlock = createReactBlockSpec(
createAudioBlockConfig,
(config) => ({
meta: {
fileBlockAccept: ['audio/*'],
},
render: (props) => <AudioBlockComponent {...(props as any)} />,
parse: audioParse(config),
toExternalHTML: (props) => <AudioToExternalHTML {...(props as any)} />,
@@ -97,8 +97,12 @@ const VideoToExternalHTML = ({
export const VideoBlock = createReactBlockSpec(
createVideoBlockConfig,
(config) => ({
meta: {
fileBlockAccept: ['video/*'],
},
render: (props) => <VideoBlockComponent {...(props as any)} />,
parse: videoParse(config),
toExternalHTML: (props) => <VideoToExternalHTML {...(props as any)} />,
runsBefore: ['file'],
}),
);