mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-05-08 03:37:28 +08:00
feat(frontend/vditor): 实现基于 FFmpeg.wasm 的视频压缩功能
- 添加视频压缩相关配置和工具函数 - 实现 FFmpeg.wasm 初始化和视频压缩功能 - 优化文件上传流程,支持视频文件压缩
This commit is contained in:
@@ -1,9 +1,21 @@
|
||||
import { defineNuxtConfig } from 'nuxt/config'
|
||||
import { createRequire } from 'node:module'
|
||||
|
||||
const require = createRequire(import.meta.url)
|
||||
const appPkg = require('./package.json') as {
|
||||
dependencies?: Record<string, string>
|
||||
devDependencies?: Record<string, string>
|
||||
}
|
||||
const ffmpegVersion = (
|
||||
process.env.NUXT_PUBLIC_FFMPEG_VERSION ||
|
||||
appPkg.dependencies?.['@ffmpeg/ffmpeg'] ||
|
||||
appPkg.devDependencies?.['@ffmpeg/ffmpeg'] ||
|
||||
'0.12.15'
|
||||
).replace(/^[^\d]*/, '')
|
||||
export default defineNuxtConfig({
|
||||
devServer: {
|
||||
host: '0.0.0.0',
|
||||
port: 3000
|
||||
port: 3000,
|
||||
},
|
||||
ssr: true,
|
||||
modules: ['@nuxt/image'],
|
||||
@@ -17,6 +29,7 @@ export default defineNuxtConfig({
|
||||
discordClientId: process.env.NUXT_PUBLIC_DISCORD_CLIENT_ID || '',
|
||||
twitterClientId: process.env.NUXT_PUBLIC_TWITTER_CLIENT_ID || '',
|
||||
telegramBotId: process.env.NUXT_PUBLIC_TELEGRAM_BOT_ID || '',
|
||||
ffmpegVersion,
|
||||
},
|
||||
},
|
||||
css: [
|
||||
|
||||
Reference in New Issue
Block a user