mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-25 08:32:45 +00:00
fix(studio): a preview clip's track is taken only as a whole number (#8447)
* fix(studio): a preview clip's track, start and length enter the timeline only as numbers * fix(studio): a preview clip's track is taken only as a whole number, as the runtime writes it
This commit is contained in:
@@ -986,6 +986,6 @@ describe("createTimelineElementFromManifestClip — received clip numbers", () =
|
||||
expect([honest.track, honest.authoredTrack, honest.start, honest.duration]).toEqual([
|
||||
3, 3, 1.5, 2,
|
||||
]);
|
||||
expect(clip(Number.NaN).track).toBe(0);
|
||||
expect([clip(Number.NaN).track, clip(1.5).track, clip(-1).track]).toEqual([0, 0, -1]);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -82,7 +82,7 @@ export function createTimelineElementFromManifestClip(params: {
|
||||
hostEl?: Element | null;
|
||||
}): TimelineElement {
|
||||
const { clip, fallbackIndex, doc } = params;
|
||||
const numericTrack = finiteNumber(clip.track) ?? 0;
|
||||
const numericTrack = Number.isSafeInteger(clip.track) ? clip.track : 0;
|
||||
let hostEl = params.hostEl ?? null;
|
||||
const transitionLabels = doc
|
||||
? transitionLabelsForDocument(doc, (doc.defaultView as IframeWindow | null)?.__timelines)
|
||||
|
||||
Reference in New Issue
Block a user