Skip to content

fix(client): add anti-echo guard for video syncing#166

Merged
rgarcia merged 2 commits intokernel:mainfrom
AbdulRashidReshamwala:fix-video-sync
Feb 27, 2026
Merged

fix(client): add anti-echo guard for video syncing#166
rgarcia merged 2 commits intokernel:mainfrom
AbdulRashidReshamwala:fix-video-sync

Conversation

@AbdulRashidReshamwala
Copy link
Copy Markdown
Contributor

@AbdulRashidReshamwala AbdulRashidReshamwala commented Feb 25, 2026

Added an anti-echo guard to prevent play/pause event spams.


Note

Medium Risk
Touches client-side video play/pause state synchronization; a small logic change could still cause playback state to get stuck or miss updates on some browsers (notably Safari).

Overview
Prevents play/pause “echo” loops between the Vuex playing watcher and the <video> element by introducing an isVideoSyncing guard.

When native playing/pause events fire, the component temporarily marks itself as syncing and defers clearing the flag to the next tick, avoiding Safari timing races where events can precede video.paused updates.

Written by Cursor Bugbot for commit ee912e3. This will update automatically on new commits. Configure here.

@rgarcia
Copy link
Copy Markdown
Contributor

rgarcia commented Feb 27, 2026

thanks @AbdulRashidReshamwala!

@rgarcia rgarcia merged commit 5bf9d70 into kernel:main Feb 27, 2026
3 of 5 checks passed
AbdulRashidReshamwala added a commit to reclaimprotocol/popcorn-images that referenced this pull request Mar 26, 2026
Added an anti-echo guard to prevent play/pause event spams.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Touches client-side video play/pause state synchronization; a small
logic change could still cause playback state to get stuck or miss
updates on some browsers (notably Safari).
>
> **Overview**
> Prevents play/pause “echo” loops between the Vuex `playing` watcher
and the `<video>` element by introducing an `isVideoSyncing` guard.
>
> When native `playing`/`pause` events fire, the component temporarily
marks itself as syncing and defers clearing the flag to the next tick,
avoiding Safari timing races where events can precede `video.paused`
updates.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
ee912e3. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

Co-authored-by: Rafael <raf@kernel.sh>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants