@interactiveplatform/movika-manifest 1.0.0-dev.0
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/README.md +9 -0
- package/dist/chapter-COPBtRYg.d.cts +741 -0
- package/dist/chapter-COPBtRYg.d.ts +741 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.cts +80 -0
- package/dist/index.d.ts +80 -0
- package/dist/index.js +1 -0
- package/dist/mocks/index.cjs +15 -0
- package/dist/mocks/index.d.cts +37 -0
- package/dist/mocks/index.d.ts +37 -0
- package/dist/mocks/index.js +15 -0
- package/package.json +26 -0
|
@@ -0,0 +1,741 @@
|
|
|
1
|
+
type ControlType$3 = "Text" | "Button" | "Area";
|
|
2
|
+
type ControlEventType$3 = "onClick";
|
|
3
|
+
interface ControlEvent$3 {
|
|
4
|
+
type: ControlEventType$3;
|
|
5
|
+
action: {
|
|
6
|
+
type: "setNextBranch";
|
|
7
|
+
args: {
|
|
8
|
+
branchId: string;
|
|
9
|
+
shouldOpenNow: boolean;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
interface ControlLayoutParams$3 {
|
|
14
|
+
x: number;
|
|
15
|
+
y: number;
|
|
16
|
+
width: number;
|
|
17
|
+
height: number;
|
|
18
|
+
angle: number;
|
|
19
|
+
innerSizesDependOn?: "video" | "self";
|
|
20
|
+
}
|
|
21
|
+
interface ControlProps$3 {
|
|
22
|
+
text?: {
|
|
23
|
+
value: string;
|
|
24
|
+
gravityHorizontal: "start" | "end" | "center";
|
|
25
|
+
gravityVertical: "top" | "bottom" | "center";
|
|
26
|
+
color: string;
|
|
27
|
+
alpha: number;
|
|
28
|
+
size: number;
|
|
29
|
+
paddings?: {
|
|
30
|
+
top: number;
|
|
31
|
+
right: number;
|
|
32
|
+
bottom: number;
|
|
33
|
+
left: number;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
background: {
|
|
37
|
+
type: "color";
|
|
38
|
+
color: string;
|
|
39
|
+
alpha: number;
|
|
40
|
+
src?: string;
|
|
41
|
+
};
|
|
42
|
+
shape: {
|
|
43
|
+
type: "rectangle";
|
|
44
|
+
roundCorners: number;
|
|
45
|
+
border: {
|
|
46
|
+
width: number;
|
|
47
|
+
color: string;
|
|
48
|
+
alpha: number;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
interface Control$3 {
|
|
53
|
+
id: string;
|
|
54
|
+
type: "Button" | "Area";
|
|
55
|
+
label: string;
|
|
56
|
+
subtype: ControlType$3;
|
|
57
|
+
layoutParams: ControlLayoutParams$3;
|
|
58
|
+
props: ControlProps$3;
|
|
59
|
+
events: ControlEvent$3[];
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
interface ChapterBranch$3 {
|
|
63
|
+
id: string;
|
|
64
|
+
chapterId: string;
|
|
65
|
+
weight?: number;
|
|
66
|
+
manifestUrl?: string;
|
|
67
|
+
isDefault: boolean;
|
|
68
|
+
}
|
|
69
|
+
declare enum ContainerFallbackStrategy {
|
|
70
|
+
Await = "await",
|
|
71
|
+
Min = "min",
|
|
72
|
+
Max = "max",
|
|
73
|
+
Random = "random",
|
|
74
|
+
WeightlessRandom = "weightlessRandom",
|
|
75
|
+
Default = "default"
|
|
76
|
+
}
|
|
77
|
+
interface ChapterContainer$3 {
|
|
78
|
+
id: string;
|
|
79
|
+
startTime: number;
|
|
80
|
+
fallbackStrategy: ContainerFallbackStrategy | null;
|
|
81
|
+
controls: Control$3[];
|
|
82
|
+
layout: {
|
|
83
|
+
type: "Relative";
|
|
84
|
+
};
|
|
85
|
+
type: "Choice" | "TextInput";
|
|
86
|
+
}
|
|
87
|
+
interface Chapter$3 {
|
|
88
|
+
id: string;
|
|
89
|
+
videoId?: string;
|
|
90
|
+
containers: ChapterContainer$3[];
|
|
91
|
+
branches: ChapterBranch$3[];
|
|
92
|
+
label: string;
|
|
93
|
+
x: number;
|
|
94
|
+
y: number;
|
|
95
|
+
order: "start" | "end" | "simple";
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
interface ManifestVideoVariant$3 {
|
|
99
|
+
type: string;
|
|
100
|
+
url: string;
|
|
101
|
+
size?: number;
|
|
102
|
+
standard?: string;
|
|
103
|
+
resolution?: string;
|
|
104
|
+
bitrate?: number;
|
|
105
|
+
cover?: string;
|
|
106
|
+
preview?: string;
|
|
107
|
+
}
|
|
108
|
+
interface ManifestVideo$3 {
|
|
109
|
+
id: string;
|
|
110
|
+
duration?: number;
|
|
111
|
+
shortlink?: string;
|
|
112
|
+
variants: ManifestVideoVariant$3[];
|
|
113
|
+
title?: string;
|
|
114
|
+
}
|
|
115
|
+
type DraftMediaMetadata$1 = {
|
|
116
|
+
videos: ManifestVideo$3[];
|
|
117
|
+
};
|
|
118
|
+
type MediaMetadata$1 = string | DraftMediaMetadata$1;
|
|
119
|
+
interface Metadata$3 {
|
|
120
|
+
id: string;
|
|
121
|
+
version: string;
|
|
122
|
+
build: number;
|
|
123
|
+
initChapterId: string;
|
|
124
|
+
created: string;
|
|
125
|
+
updated: string;
|
|
126
|
+
media: MediaMetadata$1;
|
|
127
|
+
}
|
|
128
|
+
interface Manifest_3_0 {
|
|
129
|
+
metadata: Metadata$3;
|
|
130
|
+
chapters: Chapter$3[];
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
type ControlType$2 = "Text" | "Button" | "Area";
|
|
134
|
+
type ControlEventType$2 = "onClick";
|
|
135
|
+
type ControlActionType$2 = "setNextBranch" | "continuePlayback";
|
|
136
|
+
interface ControlEvent$2 {
|
|
137
|
+
type: ControlEventType$2;
|
|
138
|
+
action: {
|
|
139
|
+
type: ControlActionType$2;
|
|
140
|
+
args: {
|
|
141
|
+
branchId?: string;
|
|
142
|
+
shouldOpenNow: boolean;
|
|
143
|
+
isDetachContainer?: boolean;
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
interface ControlLayoutParams$2 {
|
|
148
|
+
x: number;
|
|
149
|
+
y: number;
|
|
150
|
+
width: number;
|
|
151
|
+
height: number;
|
|
152
|
+
angle: number;
|
|
153
|
+
innerSizesDependOn?: "video" | "self";
|
|
154
|
+
}
|
|
155
|
+
interface ControlProps$2 {
|
|
156
|
+
text?: {
|
|
157
|
+
value: string;
|
|
158
|
+
gravityHorizontal: "start" | "end" | "center";
|
|
159
|
+
gravityVertical: "top" | "bottom" | "center";
|
|
160
|
+
color: string;
|
|
161
|
+
alpha: number;
|
|
162
|
+
size: number;
|
|
163
|
+
paddings?: {
|
|
164
|
+
top: number;
|
|
165
|
+
right: number;
|
|
166
|
+
bottom: number;
|
|
167
|
+
left: number;
|
|
168
|
+
};
|
|
169
|
+
};
|
|
170
|
+
background: {
|
|
171
|
+
type: "color";
|
|
172
|
+
color: string;
|
|
173
|
+
alpha: number;
|
|
174
|
+
src?: string;
|
|
175
|
+
};
|
|
176
|
+
shape: {
|
|
177
|
+
type: "rectangle";
|
|
178
|
+
roundCorners: number;
|
|
179
|
+
border: {
|
|
180
|
+
width: number;
|
|
181
|
+
color: string;
|
|
182
|
+
alpha: number;
|
|
183
|
+
};
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
interface Control$2 {
|
|
187
|
+
id: string;
|
|
188
|
+
type: "Button" | "Area";
|
|
189
|
+
label: string;
|
|
190
|
+
subtype: ControlType$2;
|
|
191
|
+
layoutParams: ControlLayoutParams$2;
|
|
192
|
+
props: ControlProps$2;
|
|
193
|
+
events?: ControlEvent$2[];
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
type ChapterEventType$2 = "onSuspense";
|
|
197
|
+
type ContainerEventType$2 = "onSuspense";
|
|
198
|
+
type ChapterSuspenseActionType$2 = "setNextBranch" | "setRandomBranch";
|
|
199
|
+
type ContainerSuspenseActionType$2 = "setNextBranch" | "continuePlayback";
|
|
200
|
+
interface ChapterEvent$2 {
|
|
201
|
+
type: ChapterEventType$2;
|
|
202
|
+
action: {
|
|
203
|
+
type: ChapterSuspenseActionType$2;
|
|
204
|
+
args: {
|
|
205
|
+
branchId?: string;
|
|
206
|
+
shouldOpenNow: boolean;
|
|
207
|
+
isDetachContainer?: boolean;
|
|
208
|
+
};
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
interface ChapterBranch$2 {
|
|
212
|
+
id: string;
|
|
213
|
+
chapterId: string;
|
|
214
|
+
weight?: number;
|
|
215
|
+
manifestUrl?: string;
|
|
216
|
+
}
|
|
217
|
+
interface ContainerEvent$2 {
|
|
218
|
+
type: ContainerEventType$2;
|
|
219
|
+
action: {
|
|
220
|
+
type: ContainerSuspenseActionType$2;
|
|
221
|
+
args: {
|
|
222
|
+
branchId?: string;
|
|
223
|
+
shouldOpenNow: boolean;
|
|
224
|
+
isDetachContainer?: boolean;
|
|
225
|
+
};
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
interface ChapterContainer$2 {
|
|
229
|
+
id: string;
|
|
230
|
+
startTime: number;
|
|
231
|
+
endTime?: number | null;
|
|
232
|
+
controls: Control$2[];
|
|
233
|
+
layout: {
|
|
234
|
+
type: "Relative";
|
|
235
|
+
};
|
|
236
|
+
type: "Choice" | "TextInput";
|
|
237
|
+
events?: ContainerEvent$2[];
|
|
238
|
+
}
|
|
239
|
+
interface Chapter$2 {
|
|
240
|
+
id: string;
|
|
241
|
+
videoId?: string;
|
|
242
|
+
containers: ChapterContainer$2[];
|
|
243
|
+
branches: ChapterBranch$2[];
|
|
244
|
+
events?: ChapterEvent$2[];
|
|
245
|
+
label: string;
|
|
246
|
+
x: number;
|
|
247
|
+
y: number;
|
|
248
|
+
order: "start" | "end" | "simple";
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
interface ManifestVideoVariant$2 {
|
|
252
|
+
type: string;
|
|
253
|
+
url: string;
|
|
254
|
+
size?: number;
|
|
255
|
+
standard?: string;
|
|
256
|
+
resolution?: string;
|
|
257
|
+
bitrate?: number;
|
|
258
|
+
cover?: string;
|
|
259
|
+
preview?: string;
|
|
260
|
+
}
|
|
261
|
+
interface ManifestVideo$2 {
|
|
262
|
+
id: string;
|
|
263
|
+
duration?: number;
|
|
264
|
+
shortlink?: string;
|
|
265
|
+
variants: ManifestVideoVariant$2[];
|
|
266
|
+
title?: string;
|
|
267
|
+
}
|
|
268
|
+
type DraftMediaMetadata = {
|
|
269
|
+
videos: ManifestVideo$2[];
|
|
270
|
+
};
|
|
271
|
+
type MediaMetadata = string | DraftMediaMetadata;
|
|
272
|
+
interface Metadata$2 {
|
|
273
|
+
id: string;
|
|
274
|
+
version: string;
|
|
275
|
+
build: number;
|
|
276
|
+
initChapterId?: string;
|
|
277
|
+
created: string;
|
|
278
|
+
updated: string;
|
|
279
|
+
media: MediaMetadata;
|
|
280
|
+
}
|
|
281
|
+
interface Manifest_3_1 {
|
|
282
|
+
metadata: Metadata$2;
|
|
283
|
+
chapters: Chapter$2[];
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
type ControlType$1 = "Text" | "Button" | "Area";
|
|
287
|
+
type ControlEventType$1 = "onClick";
|
|
288
|
+
type ControlActionType$1 = "setNextBranch" | "continuePlayback";
|
|
289
|
+
interface ControlEvent$1 {
|
|
290
|
+
type: ControlEventType$1;
|
|
291
|
+
action: {
|
|
292
|
+
type: ControlActionType$1;
|
|
293
|
+
args: {
|
|
294
|
+
branchId?: string;
|
|
295
|
+
shouldOpenNow: boolean;
|
|
296
|
+
isDetachContainer?: boolean;
|
|
297
|
+
};
|
|
298
|
+
};
|
|
299
|
+
}
|
|
300
|
+
interface ControlLayoutParams$1 {
|
|
301
|
+
x: number;
|
|
302
|
+
y: number;
|
|
303
|
+
width: number;
|
|
304
|
+
height: number;
|
|
305
|
+
angle: number;
|
|
306
|
+
innerSizesDependOn?: "video" | "self";
|
|
307
|
+
}
|
|
308
|
+
interface ControlProps$1 {
|
|
309
|
+
text?: {
|
|
310
|
+
value: string;
|
|
311
|
+
gravityHorizontal: "start" | "end" | "center";
|
|
312
|
+
gravityVertical: "top" | "bottom" | "center";
|
|
313
|
+
color: string;
|
|
314
|
+
alpha: number;
|
|
315
|
+
size: number;
|
|
316
|
+
paddings?: {
|
|
317
|
+
top: number;
|
|
318
|
+
right: number;
|
|
319
|
+
bottom: number;
|
|
320
|
+
left: number;
|
|
321
|
+
};
|
|
322
|
+
};
|
|
323
|
+
background: {
|
|
324
|
+
type: "color";
|
|
325
|
+
color: string;
|
|
326
|
+
alpha: number;
|
|
327
|
+
src?: string;
|
|
328
|
+
};
|
|
329
|
+
shape: {
|
|
330
|
+
type: "rectangle";
|
|
331
|
+
roundCorners: number;
|
|
332
|
+
border: {
|
|
333
|
+
width: number;
|
|
334
|
+
color: string;
|
|
335
|
+
alpha: number;
|
|
336
|
+
};
|
|
337
|
+
};
|
|
338
|
+
}
|
|
339
|
+
interface Control$1 {
|
|
340
|
+
id: string;
|
|
341
|
+
type: "Button" | "Area";
|
|
342
|
+
label: string;
|
|
343
|
+
subtype: ControlType$1;
|
|
344
|
+
layoutParams: ControlLayoutParams$1;
|
|
345
|
+
props: ControlProps$1;
|
|
346
|
+
events?: ControlEvent$1[];
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
type ChapterEventType$1 = "onSuspense";
|
|
350
|
+
type ContainerEventType$1 = "onSuspense";
|
|
351
|
+
type ChapterSuspenseActionType$1 = "setNextBranch" | "setRandomBranch";
|
|
352
|
+
type ContainerSuspenseActionType$1 = "setNextBranch" | "continuePlayback";
|
|
353
|
+
interface ChapterEvent$1 {
|
|
354
|
+
type: ChapterEventType$1;
|
|
355
|
+
action: {
|
|
356
|
+
type: ChapterSuspenseActionType$1;
|
|
357
|
+
args: {
|
|
358
|
+
branchId?: string;
|
|
359
|
+
shouldOpenNow: boolean;
|
|
360
|
+
isDetachContainer?: boolean;
|
|
361
|
+
};
|
|
362
|
+
};
|
|
363
|
+
}
|
|
364
|
+
interface ChapterBranch$1 {
|
|
365
|
+
id: string;
|
|
366
|
+
chapterId: string;
|
|
367
|
+
weight?: number;
|
|
368
|
+
manifestUrl?: string;
|
|
369
|
+
}
|
|
370
|
+
interface ContainerEvent$1 {
|
|
371
|
+
type: ContainerEventType$1;
|
|
372
|
+
action: {
|
|
373
|
+
type: ContainerSuspenseActionType$1;
|
|
374
|
+
args: {
|
|
375
|
+
branchId?: string;
|
|
376
|
+
shouldOpenNow: boolean;
|
|
377
|
+
isDetachContainer?: boolean;
|
|
378
|
+
};
|
|
379
|
+
};
|
|
380
|
+
}
|
|
381
|
+
interface ChapterContainer$1 {
|
|
382
|
+
id: string;
|
|
383
|
+
startTime: number;
|
|
384
|
+
endTime?: number | null;
|
|
385
|
+
controls: Control$1[];
|
|
386
|
+
layout: {
|
|
387
|
+
type: "Relative";
|
|
388
|
+
};
|
|
389
|
+
type: "Choice" | "TextInput";
|
|
390
|
+
events?: ContainerEvent$1[];
|
|
391
|
+
}
|
|
392
|
+
interface Chapter$1 {
|
|
393
|
+
id: string;
|
|
394
|
+
videoId?: string;
|
|
395
|
+
containers: ChapterContainer$1[];
|
|
396
|
+
branches: ChapterBranch$1[];
|
|
397
|
+
events?: ChapterEvent$1[];
|
|
398
|
+
label: string;
|
|
399
|
+
x: number;
|
|
400
|
+
y: number;
|
|
401
|
+
order: "start" | "end" | "simple";
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
interface ManifestVideoVariant$1 {
|
|
405
|
+
type: string;
|
|
406
|
+
url: string;
|
|
407
|
+
size?: number;
|
|
408
|
+
standard?: string;
|
|
409
|
+
resolution?: string;
|
|
410
|
+
bitrate?: number;
|
|
411
|
+
cover?: string;
|
|
412
|
+
preview?: string;
|
|
413
|
+
payload?: {
|
|
414
|
+
type: string;
|
|
415
|
+
id: string;
|
|
416
|
+
};
|
|
417
|
+
}
|
|
418
|
+
interface ManifestVideo$1 {
|
|
419
|
+
id: string;
|
|
420
|
+
duration?: number;
|
|
421
|
+
shortlink?: string;
|
|
422
|
+
variants: ManifestVideoVariant$1[];
|
|
423
|
+
title?: string;
|
|
424
|
+
}
|
|
425
|
+
type Media$1 = {
|
|
426
|
+
videos: ManifestVideo$1[];
|
|
427
|
+
};
|
|
428
|
+
interface Metadata$1 {
|
|
429
|
+
id: string;
|
|
430
|
+
version: string;
|
|
431
|
+
build: number;
|
|
432
|
+
initChapterId?: string;
|
|
433
|
+
created: string;
|
|
434
|
+
updated: string;
|
|
435
|
+
types?: string[];
|
|
436
|
+
media?: Media$1;
|
|
437
|
+
}
|
|
438
|
+
interface Manifest_3_2 {
|
|
439
|
+
metadata: Metadata$1;
|
|
440
|
+
media: Media$1;
|
|
441
|
+
chapters: Chapter$1[];
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
interface GraphBackground {
|
|
445
|
+
color?: string;
|
|
446
|
+
grid?: {
|
|
447
|
+
enabled?: boolean;
|
|
448
|
+
color?: string;
|
|
449
|
+
};
|
|
450
|
+
}
|
|
451
|
+
interface GraphCustomChapter {
|
|
452
|
+
id: string;
|
|
453
|
+
x: number;
|
|
454
|
+
y: number;
|
|
455
|
+
}
|
|
456
|
+
interface GraphEditDefaultChapter {
|
|
457
|
+
flipTo?: {
|
|
458
|
+
enabled?: boolean;
|
|
459
|
+
backgroundColor?: string;
|
|
460
|
+
textColor?: string;
|
|
461
|
+
};
|
|
462
|
+
controls?: {
|
|
463
|
+
enabled?: boolean;
|
|
464
|
+
backgroundColor?: string;
|
|
465
|
+
textColor?: string;
|
|
466
|
+
};
|
|
467
|
+
hover?: {
|
|
468
|
+
enabled?: boolean;
|
|
469
|
+
borderColor?: string;
|
|
470
|
+
shadowColor?: string;
|
|
471
|
+
};
|
|
472
|
+
}
|
|
473
|
+
type GraphEditChapter = GraphCustomChapter & GraphEditDefaultChapter;
|
|
474
|
+
interface GraphViewDefaultChapter extends GraphEditDefaultChapter {
|
|
475
|
+
header?: {
|
|
476
|
+
enabled?: boolean;
|
|
477
|
+
backgroundColor?: string;
|
|
478
|
+
textColor?: string;
|
|
479
|
+
};
|
|
480
|
+
watchAgain?: {
|
|
481
|
+
enabled?: boolean;
|
|
482
|
+
backgroundColor?: string;
|
|
483
|
+
textColor?: string;
|
|
484
|
+
};
|
|
485
|
+
preview?: {
|
|
486
|
+
visible?: boolean;
|
|
487
|
+
backgroundColor?: string;
|
|
488
|
+
textColor?: string;
|
|
489
|
+
};
|
|
490
|
+
goBlind?: boolean;
|
|
491
|
+
}
|
|
492
|
+
type GraphViewChapter = Pick<GraphCustomChapter, "id"> & Partial<Pick<GraphCustomChapter, "x" | "y">> & GraphViewDefaultChapter;
|
|
493
|
+
interface GraphDefaultBranch {
|
|
494
|
+
display?: boolean;
|
|
495
|
+
color?: string;
|
|
496
|
+
connectionColor?: string;
|
|
497
|
+
actionConnectionColor?: string;
|
|
498
|
+
actionIconColor?: string;
|
|
499
|
+
inactionConnectionColor?: string;
|
|
500
|
+
inactionIconColor?: string;
|
|
501
|
+
displayActionConnections?: boolean;
|
|
502
|
+
}
|
|
503
|
+
interface GraphBranch extends GraphDefaultBranch {
|
|
504
|
+
id: string;
|
|
505
|
+
}
|
|
506
|
+
interface GraphEditModeDesign {
|
|
507
|
+
background?: GraphBackground;
|
|
508
|
+
defaultChapter?: GraphEditDefaultChapter;
|
|
509
|
+
chapters: GraphEditChapter[];
|
|
510
|
+
defaultBranch?: GraphDefaultBranch;
|
|
511
|
+
branches?: GraphBranch[];
|
|
512
|
+
}
|
|
513
|
+
interface GraphViewModeDesign {
|
|
514
|
+
background?: GraphBackground;
|
|
515
|
+
defaultChapter?: GraphViewDefaultChapter;
|
|
516
|
+
chapters?: GraphViewChapter[];
|
|
517
|
+
defaultBranch?: GraphDefaultBranch;
|
|
518
|
+
branches?: GraphBranch[];
|
|
519
|
+
}
|
|
520
|
+
interface GraphDesign {
|
|
521
|
+
edit: GraphEditModeDesign;
|
|
522
|
+
view: GraphViewModeDesign;
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
declare const DEFAULT_MANIFEST_VERSION = "3.3";
|
|
526
|
+
declare const TEST_VERSION_REGEX: RegExp;
|
|
527
|
+
type ManifestVideoVariantType = "custom" | "mp4" | "hls" | "dash" | "mpeg";
|
|
528
|
+
type Extension = Exclude<ManifestVideoVariantType, "custom">;
|
|
529
|
+
type Standard = "144p" | "240p" | "360p" | "480p" | "720p" | "1080p" | "1440p" | "2160p" | "4320p";
|
|
530
|
+
interface CustomManifestVideoVariant {
|
|
531
|
+
type: Extract<ManifestVideoVariantType, "custom">;
|
|
532
|
+
payload: {
|
|
533
|
+
type: string;
|
|
534
|
+
id: string;
|
|
535
|
+
};
|
|
536
|
+
}
|
|
537
|
+
interface DefaultManifestVideoVariant {
|
|
538
|
+
type: Extension;
|
|
539
|
+
url: string;
|
|
540
|
+
size?: Nullable<number>;
|
|
541
|
+
standard?: Nullable<Standard>;
|
|
542
|
+
resolution?: Nullable<string>;
|
|
543
|
+
bitrate?: Nullable<number>;
|
|
544
|
+
cover?: Nullable<string>;
|
|
545
|
+
preview?: Nullable<string>;
|
|
546
|
+
}
|
|
547
|
+
type ManifestVideoVariant = Omit<DefaultManifestVideoVariant, "type"> & {
|
|
548
|
+
type: ManifestVideoVariantType;
|
|
549
|
+
payload?: Nullable<CustomManifestVideoVariant["payload"]>;
|
|
550
|
+
};
|
|
551
|
+
interface ManifestVideo {
|
|
552
|
+
id: string;
|
|
553
|
+
duration?: Nullable<number>;
|
|
554
|
+
shortlink?: Nullable<string>;
|
|
555
|
+
variants: ManifestVideoVariant[];
|
|
556
|
+
title?: string;
|
|
557
|
+
}
|
|
558
|
+
type Media = {
|
|
559
|
+
videos: ManifestVideo[];
|
|
560
|
+
};
|
|
561
|
+
type MediaLink = string;
|
|
562
|
+
interface Metadata {
|
|
563
|
+
id: string;
|
|
564
|
+
version: typeof DEFAULT_MANIFEST_VERSION;
|
|
565
|
+
build: number;
|
|
566
|
+
initChapterId?: string;
|
|
567
|
+
created: string;
|
|
568
|
+
updated: string;
|
|
569
|
+
types?: Nullable<string[]>;
|
|
570
|
+
media?: Media | MediaLink;
|
|
571
|
+
}
|
|
572
|
+
interface Manifest_3_3 {
|
|
573
|
+
metadata: Metadata;
|
|
574
|
+
media: Media;
|
|
575
|
+
chapters: Chapter[];
|
|
576
|
+
graph: GraphDesign;
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
declare enum ContainerTypes {
|
|
580
|
+
Choice = "Choice",
|
|
581
|
+
TextInput = "TextInput"
|
|
582
|
+
}
|
|
583
|
+
declare enum ControlTypes {
|
|
584
|
+
Button = "Button",
|
|
585
|
+
Area = "Area",
|
|
586
|
+
Text = "Text"
|
|
587
|
+
}
|
|
588
|
+
declare enum EventTypes {
|
|
589
|
+
onClick = "onClick",
|
|
590
|
+
onSuspense = "onSuspense"
|
|
591
|
+
}
|
|
592
|
+
declare enum EventActionTypes {
|
|
593
|
+
openURI = "openURI",
|
|
594
|
+
setNextBranch = "setNextBranch",
|
|
595
|
+
setWeightlessRandomBranch = "setWeightlessRandomBranch",
|
|
596
|
+
setRandomBranch = "setRandomBranch",
|
|
597
|
+
setMaxWeightBranch = "setMaxWeightBranch",
|
|
598
|
+
setMinWeightBranch = "setMinWeightBranch",
|
|
599
|
+
setDefaultBranch = "setDefaultBranch",
|
|
600
|
+
continuePlayback = "continuePlayback",
|
|
601
|
+
expect = "expect"
|
|
602
|
+
}
|
|
603
|
+
type VideoId = number | string;
|
|
604
|
+
type AnyManifest = Manifest_3_0 | Manifest_3_1 | Manifest_3_2 | Manifest_3_3;
|
|
605
|
+
type AnyChapter = AnyManifest["chapters"][0];
|
|
606
|
+
type AnyContainer = AnyChapter["containers"][0];
|
|
607
|
+
type AnyControl = AnyContainer["controls"][0];
|
|
608
|
+
type Nullable<T> = T | null;
|
|
609
|
+
|
|
610
|
+
type ControlType = "Text" | "Button" | "Area";
|
|
611
|
+
type ControlEventType = "onClick";
|
|
612
|
+
type ControlActionType = "setNextBranch" | "continuePlayback" | "openURI";
|
|
613
|
+
interface ControlEvent {
|
|
614
|
+
type: ControlEventType;
|
|
615
|
+
action: {
|
|
616
|
+
type: ControlActionType;
|
|
617
|
+
args: {
|
|
618
|
+
branchId?: Nullable<string>;
|
|
619
|
+
shouldOpenNow: boolean;
|
|
620
|
+
isDetachContainer?: boolean;
|
|
621
|
+
uri?: Nullable<string>;
|
|
622
|
+
};
|
|
623
|
+
};
|
|
624
|
+
}
|
|
625
|
+
interface Font {
|
|
626
|
+
family: string;
|
|
627
|
+
style: "normal" | "italic";
|
|
628
|
+
weight: "normal" | "bold" | "lighter" | "bolder";
|
|
629
|
+
}
|
|
630
|
+
interface ControlLayoutParams {
|
|
631
|
+
x: number;
|
|
632
|
+
y: number;
|
|
633
|
+
width: number;
|
|
634
|
+
height: number;
|
|
635
|
+
angle: number;
|
|
636
|
+
innerSizesDependOn?: "video" | "self";
|
|
637
|
+
alignment?: Nullable<"left" | "right" | "center">;
|
|
638
|
+
font?: Nullable<Font>;
|
|
639
|
+
}
|
|
640
|
+
interface ControlProps {
|
|
641
|
+
text?: {
|
|
642
|
+
value: string;
|
|
643
|
+
gravityHorizontal: "start" | "end" | "center";
|
|
644
|
+
gravityVertical: "top" | "bottom" | "center";
|
|
645
|
+
color: string;
|
|
646
|
+
alpha: number;
|
|
647
|
+
size: number;
|
|
648
|
+
paddings?: {
|
|
649
|
+
top: number;
|
|
650
|
+
right: number;
|
|
651
|
+
bottom: number;
|
|
652
|
+
left: number;
|
|
653
|
+
};
|
|
654
|
+
};
|
|
655
|
+
background: {
|
|
656
|
+
type: "color";
|
|
657
|
+
color: string;
|
|
658
|
+
alpha: number;
|
|
659
|
+
src?: string;
|
|
660
|
+
};
|
|
661
|
+
shape: {
|
|
662
|
+
type: "rectangle";
|
|
663
|
+
roundCorners: number;
|
|
664
|
+
border: {
|
|
665
|
+
width: number;
|
|
666
|
+
color: string;
|
|
667
|
+
alpha: number;
|
|
668
|
+
};
|
|
669
|
+
};
|
|
670
|
+
}
|
|
671
|
+
interface Control {
|
|
672
|
+
id: string;
|
|
673
|
+
type: ControlType;
|
|
674
|
+
label: string;
|
|
675
|
+
layoutParams: ControlLayoutParams;
|
|
676
|
+
props: ControlProps;
|
|
677
|
+
events: ControlEvent[];
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
type ChapterEventType = "onSuspense";
|
|
681
|
+
type ContainerEventType = "onSuspense";
|
|
682
|
+
type ChapterSuspenseActionType = "setNextBranch" | "setRandomBranch" | "openURI";
|
|
683
|
+
type ContainerSuspenseActionType = "setNextBranch" | "continuePlayback" | "expect" | "openURI";
|
|
684
|
+
interface ChapterEvent {
|
|
685
|
+
type: ChapterEventType;
|
|
686
|
+
action: {
|
|
687
|
+
type: ChapterSuspenseActionType;
|
|
688
|
+
args: {
|
|
689
|
+
branchId?: Nullable<string>;
|
|
690
|
+
shouldOpenNow: boolean;
|
|
691
|
+
isDetachContainer?: boolean;
|
|
692
|
+
uri?: Nullable<string>;
|
|
693
|
+
};
|
|
694
|
+
};
|
|
695
|
+
}
|
|
696
|
+
interface ChapterBranch {
|
|
697
|
+
id: string;
|
|
698
|
+
chapterId: string;
|
|
699
|
+
weight?: number;
|
|
700
|
+
manifestUrl?: string;
|
|
701
|
+
isDefault?: boolean;
|
|
702
|
+
}
|
|
703
|
+
interface ContainerEvent {
|
|
704
|
+
type: ContainerEventType;
|
|
705
|
+
action: {
|
|
706
|
+
type: ContainerSuspenseActionType;
|
|
707
|
+
args: {
|
|
708
|
+
branchId?: Nullable<string>;
|
|
709
|
+
shouldOpenNow: boolean;
|
|
710
|
+
isDetachContainer?: boolean;
|
|
711
|
+
uri?: Nullable<string>;
|
|
712
|
+
};
|
|
713
|
+
};
|
|
714
|
+
}
|
|
715
|
+
interface ChapterContainer {
|
|
716
|
+
id: string;
|
|
717
|
+
startTime: number;
|
|
718
|
+
endTime?: number | null;
|
|
719
|
+
controls: Control[];
|
|
720
|
+
layout: {
|
|
721
|
+
type: "Relative";
|
|
722
|
+
};
|
|
723
|
+
type: "Choice" | "TextInput";
|
|
724
|
+
events: ContainerEvent[];
|
|
725
|
+
}
|
|
726
|
+
interface Chapter {
|
|
727
|
+
id: string;
|
|
728
|
+
videoId?: string;
|
|
729
|
+
containers: ChapterContainer[];
|
|
730
|
+
branches: ChapterBranch[];
|
|
731
|
+
events: ChapterEvent[];
|
|
732
|
+
label: string;
|
|
733
|
+
order: "start" | "end" | "simple";
|
|
734
|
+
}
|
|
735
|
+
declare enum ChapterError {
|
|
736
|
+
NoVideo = 0,
|
|
737
|
+
NoEOV = 1,
|
|
738
|
+
NoBranches = 2
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
export { type Manifest_3_1 as $, type AnyManifest as A, type GraphDefaultBranch as B, type Chapter as C, type GraphBranch as D, DEFAULT_MANIFEST_VERSION as E, type Font as F, type GraphCustomChapter as G, type ManifestVideoVariantType as H, type Extension as I, type CustomManifestVideoVariant as J, type DefaultManifestVideoVariant as K, type ManifestVideoVariant as L, type Manifest_3_3 as M, type ManifestVideo as N, type MediaLink as O, ContainerTypes as P, ControlTypes as Q, EventTypes as R, type Standard as S, TEST_VERSION_REGEX as T, EventActionTypes as U, type VideoId as V, type AnyChapter as W, type AnyContainer as X, type AnyControl as Y, type Nullable as Z, type Manifest_3_0 as _, ChapterError as a, type Manifest_3_2 as a0, type ChapterBranch as b, type ContainerSuspenseActionType as c, type ContainerEvent as d, type Control as e, type ChapterSuspenseActionType as f, type ChapterContainer as g, type ControlType as h, type ControlEventType as i, type ControlActionType as j, type ControlEvent as k, type GraphDesign as l, type Metadata as m, type Media as n, type GraphEditModeDesign as o, type GraphEditChapter as p, type GraphViewModeDesign as q, type GraphViewChapter as r, type ChapterEventType as s, type ContainerEventType as t, type ChapterEvent as u, type ControlLayoutParams as v, type ControlProps as w, type GraphBackground as x, type GraphEditDefaultChapter as y, type GraphViewDefaultChapter as z };
|