Browse Source

Try to fix playing sticker animation sound on iOS

master
Eduard Kuzmenko 3 years ago
parent
commit
6cb38fb1cc
  1. 4
      .env
  2. 5
      src/components/wrappers.ts

4
.env

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

5
src/components/wrappers.ts

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

Loading…
Cancel
Save