morethanwords/tweb/master • d232274 • 1 files, +10/-12 Fix voice waveform dropped for non-standard (

Telegram github commits and releases

Telegram github commits and releases

@tgappsupdates

Broadcast from the most important Telegram clients' repositories

4,538 مشتركًا
فتح في تيليجرام
morethanwords/tweb/masterd2322741 files, +10/-12
Fix voice waveform dropped for non-standard (62-byte) waveforms

decodeWaveform read each 5-bit sample via DataView.getUint16, which
over-reads one byte past the needed one. For a 62-byte / 99-sample
waveform the last sample's read landed out of bounds, threw a
RangeError, and the catch returned an empty array — so the whole
waveform silently failed to render (flat line). Standard 63-byte
waveforms have a spare trailing byte and happened to work.

Read the two bytes manually with a bounds-guarded high byte instead;
output is bit-identical for 63-byte waveforms and now correct for
shorter ones. Also fixes the latent byteOffset bug in the old
new DataView(waveform.buffer) on view-backed arrays.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

morethanwords/tweb/master29ce0b65 files, +106/-16
Pause video avatars when not visible (incl. right sidebar closed)

Video avatars kept animating while off-screen and, notably, while sitting in
the right sidebar after it was slid closed — the column is hidden with a
transform but stays mounted, so an IntersectionObserver never reports it as
hidden.

- avatarNew: register avatar <video>s with animationIntersector instead of an
ad-hoc IntersectionObserver (pauses on off-screen / blur / idle / lite-mode,
resumes when visible, survives Document-PiP). Covers both the chat-list /
topbar overlay and the profile-carousel / service-bubble path, which had no
visibility gating at all.
- animationIntersector: add toggleVideosUnder(element, paused) to pause+lock
(or resume) every registered video inside a container.
- sidebarRight: pause/resume the column's avatar videos on hide()/show(), since
the transform-based hide is invisible to the observer.
- peerProfileAvatars: self-suspend the tab-progress rAF loop when the active
video isn't advancing (restart on a captured 'play' / carousel nav), and free
the carousel's registered videos on cleanup so a video locked while the
sidebar was closed can't leak when the profile is torn down.
- createLoopingMutedVideo: set autoplay only after the start-frame seek so the
clip isn't briefly flashed from frame 0.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

morethanwords/tweb/master388a8b432 files, +1260/-777
Merge branch 'master' of https://github.com/morethanwords/tweb

#webk
فتح المنشور في تيليجرام