|
|
|
@ -1341,12 +1341,15 @@ export function wrapSticker({doc, div, middleware, lazyLoadQueue, group, play, o
@@ -1341,12 +1341,15 @@ export function wrapSticker({doc, div, middleware, lazyLoadQueue, group, play, o
|
|
|
|
|
appStickersManager.preloadAnimatedEmojiStickerAnimation(emoji); |
|
|
|
|
|
|
|
|
|
attachClickEvent(div, async(e) => { |
|
|
|
|
cancelEvent(e); |
|
|
|
|
const animation = LottieLoader.getAnimation(div); |
|
|
|
|
|
|
|
|
|
if(animation.paused) { |
|
|
|
|
const doc = appStickersManager.getAnimatedEmojiSoundDocument(emoji); |
|
|
|
|
if(doc) { |
|
|
|
|
const audio = document.createElement('audio'); |
|
|
|
|
audio.style.display = 'none'; |
|
|
|
|
div.parentElement.append(audio); |
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
await appDocsManager.downloadDoc(doc); |
|
|
|
@ -1358,6 +1361,7 @@ export function wrapSticker({doc, div, middleware, lazyLoadQueue, group, play, o
@@ -1358,6 +1361,7 @@ export function wrapSticker({doc, div, middleware, lazyLoadQueue, group, play, o
|
|
|
|
|
|
|
|
|
|
audio.addEventListener('ended', () => { |
|
|
|
|
audio.src = ''; |
|
|
|
|
audio.remove(); |
|
|
|
|
}, {once: true}); |
|
|
|
|
} catch(err) { |
|
|
|
|
|
|
|
|
@ -1368,8 +1372,6 @@ export function wrapSticker({doc, div, middleware, lazyLoadQueue, group, play, o
@@ -1368,8 +1372,6 @@ export function wrapSticker({doc, div, middleware, lazyLoadQueue, group, play, o
|
|
|
|
|
animation.restart(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
cancelEvent(e); |
|
|
|
|
|
|
|
|
|
const doc = appStickersManager.getAnimatedEmojiSticker(emoji, true); |
|
|
|
|
if(!doc) { |
|
|
|
|
return; |
|
|
|
|