Fix stickers loop

This commit is contained in:
Eduard Kuzmenko 2023-03-05 16:49:36 +04:00
parent 56ee21584a
commit d02fe722de
1 changed files with 4 additions and 2 deletions

View File

@ -344,7 +344,7 @@ export class AnimationIntersector {
if(animationItem.liteModeKey === liteModeKey) {
changed = true;
animation.autoplay = play ? !!+animationItem.el.dataset.stickerPlay : false;
animation.loop = play ? !!+animationItem.el.dataset.stickerLoop : false;
animation.loop = play ? !!+animationItem.el.dataset.stickerLoop && rootScope.settings.stickers.loop : false;
}
});
@ -354,7 +354,9 @@ export class AnimationIntersector {
public setLoop(loop: boolean) {
let changed = false;
this.byPlayer.forEach((animationItem, animation) => {
if(!!+animationItem.el.dataset.stickerLoop && animation.loop !== loop) {
if(!!+animationItem.el.dataset.stickerLoop &&
animation.loop !== loop &&
(animation instanceof RLottiePlayer || animation instanceof HTMLVideoElement)) {
changed = true;
animation.loop = loop;