Try to fix playing sticker animation sound on iOS

This commit is contained in:
Eduard Kuzmenko 2022-01-24 13:02:34 +04:00
parent 0a08c77ffe
commit 6cb38fb1cc
2 changed files with 4 additions and 5 deletions

4
.env
View File

@ -1,5 +1,5 @@
API_ID=1025907
API_HASH=452b0359b988148995f22ff0f4229750
VERSION=1.0.4
VERSION_FULL=1.0.4 (75)
BUILD=75
VERSION_FULL=1.0.4 (76)
BUILD=76

View File

@ -1353,13 +1353,12 @@ export function wrapSticker({doc, div, middleware, lazyLoadQueue, group, play, o
const cacheContext = appDownloadManager.getCacheContext(doc);
audio.src = cacheContext.url;
await onMediaLoad(audio);
audio.play();
await onMediaLoad(audio, undefined, true);
audio.addEventListener('ended', () => {
audio.src = '';
}, {once: true});
audio.play();
} catch(err) {
}