Fix Netlify export runtime error
This commit is contained in:
@@ -6,3 +6,10 @@
|
||||
from = "/*"
|
||||
to = "/index.html"
|
||||
status = 200
|
||||
|
||||
[[headers]]
|
||||
for = "/*"
|
||||
[headers.values]
|
||||
Cross-Origin-Opener-Policy = "same-origin"
|
||||
Cross-Origin-Embedder-Policy = "require-corp"
|
||||
Cross-Origin-Resource-Policy = "same-origin"
|
||||
|
||||
@@ -50,6 +50,7 @@ import {
|
||||
exportBrowserVideo,
|
||||
extractAudioFromVideo,
|
||||
getAudioRecordingFormat,
|
||||
getSupportedRecordingFormat,
|
||||
transcodeWebmToMp4,
|
||||
} from "./lib/media.js";
|
||||
|
||||
|
||||
+9
-1
@@ -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),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user