Fix Netlify export runtime error

This commit is contained in:
haixin.yang committed 2026-07-09 13:07:40 +08:00
1 parent 58cfec6e09
commit a7fd7b13a0
3 files changed
+17 -1

No files matched your search

+9 -1
View File
@@ -202,7 +202,15 @@ function drawPreviewFrame(context, visual, canvas, options) {
context.fillRect(110, height - 24, (width - 220) * progress, 6);
}
function getSupportedRecordingFormat() {
export function getSupportedRecordingFormat() {
if (typeof MediaRecorder === "undefined") {
return {
mimeType: "",
extension: "webm",
label: "默认视频",
};
}
const supportedFormat = EXPORT_RECORDING_FORMATS.find((format) =>
MediaRecorder.isTypeSupported(format.mimeType),
);