From bd98524f9d9414a771cce4c1e649ff16fb2bb2aa Mon Sep 17 00:00:00 2001 From: Howard Wu Date: Fri, 28 Apr 2023 23:12:20 +0800 Subject: [PATCH] Fix StarAnim didn't stop --- .../components/video/player/intersection-actions/index.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/registry/lib/components/video/player/intersection-actions/index.ts b/registry/lib/components/video/player/intersection-actions/index.ts index 2589d7a052..c11bcf7446 100644 --- a/registry/lib/components/video/player/intersection-actions/index.ts +++ b/registry/lib/components/video/player/intersection-actions/index.ts @@ -4,6 +4,7 @@ import { lightOff, lightOn } from '@/components/video/player-light' import { videoChange } from '@/core/observer' import { addComponentListener, getComponentSettings } from '@/core/settings' import { allVideoUrls } from '@/core/utils/urls' +import { StarAnim } from './animation' enum IntersectionMode { Top = '视频顶部', @@ -79,6 +80,9 @@ export const component = defineComponentMetadata({ !videoEl.paused ) { lightOff() + if (settings.options.starAnimation) { + StarAnim(true) + } } } @@ -92,6 +96,7 @@ export const component = defineComponentMetadata({ } if (settings.light && getComponentSettings('playerAutoLight').enabled && !settings.pause) { lightOn() + StarAnim(false) } }