diff --git a/packages/core/src/runtime/adapters/lottie.test.ts b/packages/core/src/runtime/adapters/lottie.test.ts index 11fadb2ba6..a8e5eb4a53 100644 --- a/packages/core/src/runtime/adapters/lottie.test.ts +++ b/packages/core/src/runtime/adapters/lottie.test.ts @@ -141,16 +141,6 @@ describe("lottie adapter", () => { }); }); - describe("play", () => { - it("plays lottie-web animation", () => { - const anim = createLottieWebAnim(); - lottieWindow.__hfLottie = [anim]; - const adapter = createLottieAdapter(); - adapter.play!(); - expect(anim.play).toHaveBeenCalled(); - }); - }); - describe("revert", () => { it("does not throw", () => { const adapter = createLottieAdapter(); diff --git a/packages/core/src/runtime/adapters/lottie.ts b/packages/core/src/runtime/adapters/lottie.ts index cbfb4e2c96..9860192bf1 100644 --- a/packages/core/src/runtime/adapters/lottie.ts +++ b/packages/core/src/runtime/adapters/lottie.ts @@ -129,23 +129,6 @@ export function createLottieAdapter(): RuntimeDeterministicAdapter { } }, - play: () => { - const instances = (window as LottieWindow).__hfLottie; - if (!instances || instances.length === 0) return; - - for (const anim of instances) { - try { - if (isLottieWebAnimation(anim)) { - anim.play(); - } else if (isDotLottiePlayer(anim)) { - anim.play(); - } - } catch { - // ignore - } - } - }, - revert: () => { // Don't clear __hfLottie — the animation objects are owned by the composition. // Just let them be garbage collected naturally. diff --git a/packages/core/src/runtime/init.ts b/packages/core/src/runtime/init.ts index 278553e7f2..97b19296e8 100644 --- a/packages/core/src/runtime/init.ts +++ b/packages/core/src/runtime/init.ts @@ -1389,9 +1389,9 @@ export function initSandboxRuntimeModular(): void { resolveStartSeconds: (element) => resolveStartForElement(element, 0), }), createWaapiAdapter(), - createGsapAdapter({ getTimeline: () => state.capturedTimeline }), - createThreeAdapter(), createLottieAdapter(), + createThreeAdapter(), + createGsapAdapter({ getTimeline: () => state.capturedTimeline }), ] as RuntimeDeterministicAdapter[]; installRuntimeErrorDiagnostics(); runAdapters("discover");