ugcinc 4.5.34 → 4.5.35
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.
|
@@ -26,8 +26,8 @@ export interface BaseSegment {
|
|
|
26
26
|
endTrim?: number;
|
|
27
27
|
/** Override segment duration (auto-calculated if omitted) */
|
|
28
28
|
duration?: TimeValue;
|
|
29
|
-
/** ID of the parent segment this overlays (
|
|
30
|
-
parentId?: string;
|
|
29
|
+
/** ID of the parent segment this overlays (string = per-segment overlay, null = global overlay, undefined = base segment) */
|
|
30
|
+
parentId?: string | null;
|
|
31
31
|
/** Start time as fraction of parent duration (0-1, default: 0). Only used when parentId is set. */
|
|
32
32
|
relativeStart?: number;
|
|
33
33
|
/** End time as fraction of parent duration (0-1, default: 1). Only used when parentId is set. */
|
|
@@ -40,8 +40,8 @@ export interface VideoEditorBaseSegment {
|
|
|
40
40
|
timeMode?: TimeMode;
|
|
41
41
|
/** UI-only: whether this segment's input is required (defaults to true if not specified) */
|
|
42
42
|
required?: boolean;
|
|
43
|
-
/** Parent segment ID for overlays */
|
|
44
|
-
parentId?: string;
|
|
43
|
+
/** Parent segment ID for overlays (string = per-segment overlay, null = global overlay, undefined = base segment) */
|
|
44
|
+
parentId?: string | null;
|
|
45
45
|
/** Relative start (0-1) within parent for overlays */
|
|
46
46
|
relativeStart?: number;
|
|
47
47
|
/** Relative end (0-1) within parent for overlays */
|
|
@@ -37,7 +37,10 @@ function getBaseSegments(channel) {
|
|
|
37
37
|
* Get overlays for a specific parent segment (or global overlays if parentId is null)
|
|
38
38
|
*/
|
|
39
39
|
function getOverlays(channel, parentId) {
|
|
40
|
-
|
|
40
|
+
if (parentId === null) {
|
|
41
|
+
return channel.segments.filter(s => s.parentId === null);
|
|
42
|
+
}
|
|
43
|
+
return channel.segments.filter(s => s.parentId === parentId);
|
|
41
44
|
}
|
|
42
45
|
/**
|
|
43
46
|
* Calculate segment position on timeline
|