-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrender.js
58 lines (48 loc) · 1.08 KB
/
render.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
import { render } from '../'
async function test () {
const data = {
id: 'test-render',
credentials: [
{
accessKeyId: process.env.ACCESS_KEY_ID,
secretAccessKey: process.env.SECRET_ACCESS_KEY
}
],
template: {
path: 'UserName/Template',
aepName: 'project.aep',
composition: 'Composition'
},
layers: [
{
relativePath: '/(Footage)/_Project Files/Images/logo.png',
resource: {
fetchMethod: 'http',
url: 'https://fakeimg.pl/1500x1500/ffffff,0/ccc,255/?text=Logo'
}
},
{
name: 'Layer Name',
value: 'The Text'
}
],
output: {
name: 'CineForm',
resolution: {
width: 1920,
height: 1080
}
},
upload: {
credentialsIndex: 0,
endpoint: 'ams3.digitaloceanspaces.com',
bucket: 'OutputBucket'
}
}
const { uri, error } = await render(data)
if (error) {
return console.error(`failed rendering: ${error}`)
}
console.log(`uploaded to: ${uri}`)
}
test().catch(console.error)