@vidispine/vdt-js 23.4.0-pre.2 → 23.4.0-pre.3
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/dist/index.d.ts +72 -6
- package/dist/index.js +717 -634
- package/dist/index.umd.cjs +3 -3
- package/package.json +19 -18
package/dist/index.d.ts
CHANGED
|
@@ -253,6 +253,12 @@ export declare interface FormatTimeCodeSecondsOptions extends TimeCodeInputOptio
|
|
|
253
253
|
* e.g. `1.04 => 104@100 => 26@25` (if no explicit `timeBase` is set)
|
|
254
254
|
*/
|
|
255
255
|
useGCD?: boolean;
|
|
256
|
+
/**
|
|
257
|
+
* Select if it should floor, round or ceil if conforming seconds to the supplied timebase
|
|
258
|
+
*
|
|
259
|
+
* @default `'floor'`
|
|
260
|
+
*/
|
|
261
|
+
roundingMode?: 'floor' | 'ceil' | 'round';
|
|
256
262
|
}
|
|
257
263
|
|
|
258
264
|
/**
|
|
@@ -303,6 +309,27 @@ export declare interface FormatTimeCodeTextOptions extends TimeCodeInputOptions
|
|
|
303
309
|
*/
|
|
304
310
|
export declare const formatTimeCodeType: (timeCode: TimeCodeInput, options?: TimeCodeInputOptions) => TimeCode;
|
|
305
311
|
|
|
312
|
+
/**
|
|
313
|
+
* Filter a shape type list to get shapes that are playable in a browser
|
|
314
|
+
*
|
|
315
|
+
* The mime types "video/quicktime" & "video/x-m4v" are considered "video/mp4" if:
|
|
316
|
+
* 1. container format is "MPEG-4" or "mov"
|
|
317
|
+
* 2. video codec is "h264"
|
|
318
|
+
*
|
|
319
|
+
* @param itemType
|
|
320
|
+
* @param options
|
|
321
|
+
* @returns
|
|
322
|
+
*
|
|
323
|
+
* @category Shape
|
|
324
|
+
*/
|
|
325
|
+
export declare const getPlayerSources: (itemType: ItemType, options?: GetPlayerSourcesOptions) => PlayerSource[];
|
|
326
|
+
|
|
327
|
+
export declare type GetPlayerSourcesOptions = {
|
|
328
|
+
allowedMimeTypes?: string[];
|
|
329
|
+
allowedMethods?: string[];
|
|
330
|
+
streamingServers?: string[];
|
|
331
|
+
};
|
|
332
|
+
|
|
306
333
|
/**
|
|
307
334
|
* Return a const for the document type of a shape (looks at mimeType)
|
|
308
335
|
*
|
|
@@ -1014,7 +1041,21 @@ export declare type ParseSearchResultEventsOptions = {
|
|
|
1014
1041
|
*
|
|
1015
1042
|
* @category Shape
|
|
1016
1043
|
*/
|
|
1017
|
-
export declare const parseShapeType: (shapeType?: ShapeType) => ParsedShapeType;
|
|
1044
|
+
export declare const parseShapeType: (shapeType?: ShapeType, options?: ParseShapeTypeOptions) => ParsedShapeType;
|
|
1045
|
+
|
|
1046
|
+
declare type ParseShapeTypeOptions = {
|
|
1047
|
+
/**
|
|
1048
|
+
* Which component type to prioritize when merging and duplicate keys in components
|
|
1049
|
+
*
|
|
1050
|
+
* Default priority:
|
|
1051
|
+
* 1. 'container'
|
|
1052
|
+
* 2. 'video'
|
|
1053
|
+
* 3. 'audio'
|
|
1054
|
+
* 4. 'binary'
|
|
1055
|
+
*
|
|
1056
|
+
*/
|
|
1057
|
+
priority?: ('container' | 'video' | 'audio' | 'binary')[];
|
|
1058
|
+
};
|
|
1018
1059
|
|
|
1019
1060
|
/**
|
|
1020
1061
|
* Parse simple (key/value) metadata
|
|
@@ -1114,6 +1155,13 @@ export declare type ParseValueOptions = {
|
|
|
1114
1155
|
*/
|
|
1115
1156
|
export declare const parseVideoComponent: (videoComponentType?: VideoComponentType) => ParsedVideoComponentType;
|
|
1116
1157
|
|
|
1158
|
+
export declare type PlayerSource = {
|
|
1159
|
+
src: string;
|
|
1160
|
+
type: string;
|
|
1161
|
+
label: string;
|
|
1162
|
+
timeBase: string;
|
|
1163
|
+
};
|
|
1164
|
+
|
|
1117
1165
|
/**
|
|
1118
1166
|
* Const object with VidiCore role names
|
|
1119
1167
|
*
|
|
@@ -1404,14 +1452,15 @@ export declare class TimeCode {
|
|
|
1404
1452
|
* Creates a new TimeCode instance with specified timeBase and samples adjusted to that.
|
|
1405
1453
|
*
|
|
1406
1454
|
* @remarks
|
|
1407
|
-
*
|
|
1455
|
+
* It floors samples when conforming to a less granular time base (can be changed with `options.mode`)
|
|
1456
|
+
*
|
|
1408
1457
|
* - e.g. "51@50".conformTo("PAL") => "25@PAL" (not "26@PAL")
|
|
1409
1458
|
*
|
|
1410
1459
|
* @param timeBase The TimeBase it should conform the TimeCode to
|
|
1411
|
-
* @param options Explicitly set
|
|
1460
|
+
* @param options Explicitly set conform options, by default these are derived from `timeBase`
|
|
1412
1461
|
* @returns A new TimeCode instance with the conformTo timeBase applied
|
|
1413
1462
|
*/
|
|
1414
|
-
conformTimeBase(timeBase: TimeCodeInput['timeBase'], options?:
|
|
1463
|
+
conformTimeBase(timeBase: TimeCodeInput['timeBase'], options?: TimeCodeConformOptions): TimeCode;
|
|
1415
1464
|
/**
|
|
1416
1465
|
* Get TimeCode as a text representation
|
|
1417
1466
|
*
|
|
@@ -1464,7 +1513,7 @@ export declare class TimeCode {
|
|
|
1464
1513
|
*
|
|
1465
1514
|
* @returns Total seconds for the time code
|
|
1466
1515
|
*/
|
|
1467
|
-
toSeconds(): number;
|
|
1516
|
+
toSeconds(options?: TimeCodeToSecondsOptions): number;
|
|
1468
1517
|
/**
|
|
1469
1518
|
* Get TimeCode in a duration representation
|
|
1470
1519
|
*
|
|
@@ -1514,11 +1563,19 @@ export declare class TimeCode {
|
|
|
1514
1563
|
};
|
|
1515
1564
|
}
|
|
1516
1565
|
|
|
1566
|
+
export declare interface TimeCodeConformOptions extends TimeCodeInputOptions {
|
|
1567
|
+
/**
|
|
1568
|
+
* Set if conforming should floor, round or ceil samples when converting to a less granular timebase
|
|
1569
|
+
* @default `'floor'`
|
|
1570
|
+
*/
|
|
1571
|
+
roundingMode?: 'floor' | 'ceil' | 'round';
|
|
1572
|
+
}
|
|
1573
|
+
|
|
1517
1574
|
export declare type TimeCodeInput = {
|
|
1518
1575
|
/** Amount of samples for the time code */
|
|
1519
1576
|
samples?: number | string;
|
|
1520
1577
|
/** The time base for the time code */
|
|
1521
|
-
timeBase?: string | TimeBaseInput | TimeBase;
|
|
1578
|
+
timeBase?: string | number | TimeBaseInput | TimeBase;
|
|
1522
1579
|
};
|
|
1523
1580
|
|
|
1524
1581
|
export declare type TimeCodeInputOptions = {
|
|
@@ -1528,4 +1585,13 @@ export declare type TimeCodeInputOptions = {
|
|
|
1528
1585
|
frameSeparator?: string;
|
|
1529
1586
|
};
|
|
1530
1587
|
|
|
1588
|
+
declare type TimeCodeToSecondsOptions = {
|
|
1589
|
+
/**
|
|
1590
|
+
* Set true if seconds should be rounded with millisecond precision
|
|
1591
|
+
*
|
|
1592
|
+
* @default false
|
|
1593
|
+
*/
|
|
1594
|
+
round?: boolean;
|
|
1595
|
+
};
|
|
1596
|
+
|
|
1531
1597
|
export { }
|