Skip to content

Commit

Permalink
Fix StarAnim didn't stop
Browse files Browse the repository at this point in the history
  • Loading branch information
Howard20181 committed Apr 28, 2023
1 parent bd8b114 commit bd98524
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '视频顶部',
Expand Down Expand Up @@ -79,6 +80,9 @@ export const component = defineComponentMetadata({
!videoEl.paused
) {
lightOff()
if (settings.options.starAnimation) {
StarAnim(true)
}
}
}

Expand All @@ -92,6 +96,7 @@ export const component = defineComponentMetadata({
}
if (settings.light && getComponentSettings('playerAutoLight').enabled && !settings.pause) {
lightOn()
StarAnim(false)
}
}

Expand Down

0 comments on commit bd98524

Please sign in to comment.