Skip to content

Commit 1ee27cc

Browse files
committed
added on progress callback function
1 parent 2629576 commit 1ee27cc

29 files changed

+222
-27
lines changed

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,31 @@ server: {
5555
...
5656
```
5757

58+
### △Next.js
59+
60+
Here is an example `next.config.js` that supports the SharedArrayBuffer:
61+
```
62+
module.exports = {
63+
async headers() {
64+
return [
65+
{
66+
source: '/',
67+
headers: [
68+
{
69+
key: 'Cross-Origin-Embedder-Policy',
70+
value: 'require-corp',
71+
},
72+
{
73+
key: 'Cross-Origin-Opener-Policy',
74+
value: 'same-origin',
75+
},
76+
],
77+
},
78+
];
79+
},
80+
};
81+
```
82+
5883
## 💻 Usage
5984

6085
Somewhere in your project you need to initiate a ffmpeg instance.

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
</head>
88
<body>
99
<div id="app"></div>
10-
<script type="module" src="/src/tests/main.ts"></script>
10+
<script type="module" src="/tests/main.ts"></script>
1111
</body>
1212
</html>

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@diffusion-studio/ffmpeg-js",
33
"private": false,
4-
"version": "0.0.2",
4+
"version": "0.1.0",
55
"description": "FFmpeg.js - Use FFmpeg in the browser powered by WebAssembly",
66
"type": "module",
77
"files": [
@@ -57,7 +57,7 @@
5757
"build": "rm -r -f ./dist && tsc && vite build",
5858
"preview": "vite preview",
5959
"test": "npx playwright test --project=chromium",
60-
"prettier": "npx prettier --write ./src",
60+
"prettier": "npx prettier --write ./src ./tests",
6161
"tarball": "npm view @diffusion-studio/ffmpeg-js dist.tarball"
6262
},
6363
"devDependencies": {

playwright.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export default defineConfig({
1414
command: 'npm run dev',
1515
url: 'http://localhost:5173/',
1616
},
17-
testDir: './src/tests',
17+
testDir: './tests',
1818
/* Run tests in files in parallel */
1919
fullyParallel: false,
2020
/* Fail the build on CI if you accidentally left test.only in the source code. */

public/samples/video.avi

725 KB
Binary file not shown.

public/samples/video.mov

693 KB
Binary file not shown.

public/samples/video.ogg

1.65 MB
Binary file not shown.

public/samples/video.webm

880 KB
Binary file not shown.

public/samples/video.wmv

1.12 MB
Binary file not shown.

public/samples/video_xl.mp4

17 MB
Binary file not shown.

0 commit comments

Comments
 (0)