mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-03-05 11:30:46 +08:00
feat: switch video compression to webcodecs
This commit is contained in:
@@ -121,14 +121,13 @@ export function createVditor(editorId, options = {}) {
|
||||
vditor.tip('视频压缩中...', 0)
|
||||
vditor.disabled()
|
||||
|
||||
// 使用 FFmpeg 压缩视频
|
||||
// 使用 WebCodecs 压缩视频
|
||||
processedFile = await compressVideo(file, (progress) => {
|
||||
const messages = {
|
||||
initializing: '初始化 FFmpeg',
|
||||
initializing: '初始化编解码器',
|
||||
preparing: '准备压缩',
|
||||
analyzing: '分析视频',
|
||||
compressing: '压缩中',
|
||||
finalizing: '完成压缩',
|
||||
packaging: '封装中',
|
||||
completed: '压缩完成',
|
||||
}
|
||||
const message = messages[progress.stage] || progress.stage
|
||||
|
||||
Reference in New Issue
Block a user