ffmpeglab-sdk 0.3.8 → 0.3.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +0 -1
- package/.openapi-generator-ignore +1 -0
- package/README.md +31 -13
- package/package.json +5 -5
package/.openapi-generator/FILES
CHANGED
package/README.md
CHANGED
|
@@ -7,22 +7,40 @@ Welcome to ffmpeglab typescript sdk.
|
|
|
7
7
|
|
|
8
8
|
This simple code allows you to render a small project
|
|
9
9
|
|
|
10
|
-
```
|
|
11
|
-
import * as ffmpeglab from 'ffmpeglab-sdk'
|
|
10
|
+
```ts
|
|
11
|
+
import * as ffmpeglab from 'ffmpeglab-sdk';
|
|
12
12
|
|
|
13
|
+
const mediaUrl = 'https://test-videos.co.uk/vids/bigbuckbunny/mp4/h264/360/Big_Buck_Bunny_360_10s_1MB.mp4'
|
|
13
14
|
const clientConfig = new ffmpeglab.Configuration({
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
accessToken: 'API_KEY',
|
|
16
|
+
basePath: 'https://api.ffmpeglab.com',
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
const client = new ffmpeglab.RendersApi(clientConfig);
|
|
20
|
+
|
|
21
|
+
client.rendersControllerCreate({
|
|
22
|
+
project: {
|
|
23
|
+
id:'myproject',
|
|
24
|
+
editor: {
|
|
25
|
+
code: '-i $MEDIA_1 -movflags +faststart myproject.mp4',
|
|
26
|
+
selectedCode: 'custom'
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
layers: [
|
|
30
|
+
{
|
|
31
|
+
id: 'layer1',
|
|
32
|
+
media: [
|
|
33
|
+
{
|
|
34
|
+
id: 'media1',
|
|
35
|
+
url: mediaUrl,
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
},
|
|
39
|
+
],
|
|
16
40
|
})
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
const renderDto = renderData as ffmpeglab.RenderDto
|
|
21
|
-
|
|
22
|
-
const newRender = await client.rendersControllerCreate({renderDto})
|
|
23
|
-
|
|
24
|
-
await client.rendersControllerRunRender({runDto:{id:newRender.id}})
|
|
25
|
-
|
|
41
|
+
.then((render)=>client.rendersControllerRunRender({
|
|
42
|
+
runDto:{id:render.id}
|
|
43
|
+
}))
|
|
26
44
|
```
|
|
27
45
|
|
|
28
46
|
|
package/package.json
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ffmpeglab-sdk",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"author": "OpenAPI-Generator",
|
|
3
|
+
"description": "typescript client for ffmpeglab",
|
|
4
|
+
"author": "danilaplee",
|
|
6
5
|
"repository": {
|
|
7
6
|
"type": "git",
|
|
8
|
-
"url": "https://github.com/
|
|
7
|
+
"url": "https://github.com/ffmpeglab/server.git"
|
|
9
8
|
},
|
|
10
9
|
"main": "./dist/index.js",
|
|
11
10
|
"types": "./dist/index.d.ts",
|
|
@@ -17,5 +16,6 @@
|
|
|
17
16
|
},
|
|
18
17
|
"devDependencies": {
|
|
19
18
|
"typescript": "^4.0 || ^5.0"
|
|
20
|
-
}
|
|
19
|
+
},
|
|
20
|
+
"version": "0.3.12"
|
|
21
21
|
}
|