-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0b48c61
commit a02faa8
Showing
3 changed files
with
17 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"name": "bitzliten", | ||
"name": "blitzate", | ||
"version": "0.0.1", | ||
"private": true, | ||
"scripts": { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,30 @@ | ||
<script lang=ts module> | ||
// import {ffmpeg as fuf} from 'https://cdn.jsdelivr.net/npm/@ffmpeg/[email protected]/dist/ffmpeg.min.js'; | ||
import { FFmpeg } from '@ffmpeg/ffmpeg'; | ||
// @ts-ignore | ||
// import type { LogEvent } from '@ffmpeg/ffmpeg/dist/esm/types'; | ||
import { fetchFile, toBlobURL } from '@ffmpeg/util'; | ||
import { onMount } from 'svelte'; | ||
let message:string | ||
let message | ||
let transcoded | ||
// async function loadFFmpeg() { | ||
// message = 'Loading ffmpeg'; | ||
// ffmpegInstance = await ffmpeg.createFFmpeg(); | ||
// isFFmpegLoaded = true; | ||
// message = 'Drop Audio Here' | ||
// } | ||
// loadFFmpeg(); | ||
let ffmpeg | ||
const baseURL = 'https://unpkg.com/@ffmpeg/[email protected]/dist/esm'; | ||
const baseURL = 'https://unpkg.com/@ffmpeg/[email protected]/dist/umd'; | ||
async function loadFFmpeg() { | ||
ffmpeg = new FFmpeg(); | ||
message = 'Loading ffmpeg-core.js'; | ||
ffmpeg.on('log', ({ message: msg }) => { | ||
message = msg; | ||
console.log(message); | ||
}); | ||
await ffmpeg.load({ | ||
let parts = { | ||
coreURL: await toBlobURL(`${baseURL}/ffmpeg-core.js`, 'text/javascript'), | ||
wasmURL: await toBlobURL(`${baseURL}/ffmpeg-core.wasm`, 'application/wasm'), | ||
workerURL: await toBlobURL(`${baseURL}/ffmpeg-core.worker.js`, 'text/javascript') | ||
}); | ||
message = 'Drop Audio Here' | ||
} | ||
message = 'Init ffmpeg-core.js'; | ||
await ffmpeg.load(parts); | ||
message = 'Ready' | ||
} | ||
onMount(() => loadFFmpeg()) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters