fix(webapp): recover shadow playback after recording gaps - #1916
Merged
irvingouj@Devolutions (irvingoujAtDevolution) merged 2 commits intoAug 7, 2026
Merged
Conversation
Run live-edge correction after SourceBuffer finishes appending, then use the latest buffered range. Seek slightly behind its end so playback can recover when a recording gap creates multiple ranges. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR introduces a centralized “catch up to live edge” behavior for ShadowPlayer by triggering a live-edge seek on each SourceBuffer updateend, instead of doing it inline during chunk handling.
Changes:
- Add live-edge threshold/safety-margin constants and a
catchUpToLiveEdge()helper inShadowPlayer. - Extend
ReactiveSourceBufferto accept an optionalonUpdateEndcallback invoked onupdateend. - Wire
ShadowPlayer.catchUpToLiveEdge()intoReactiveSourceBuffer’supdateendflow.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| webapp/packages/shadow-player/src/streamer.ts | Adds catchUpToLiveEdge() and hooks it into buffer update completion. |
| webapp/packages/shadow-player/src/sourceBuffer.ts | Adds optional onUpdateEnd callback and invokes it on updateend. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+11
to
+16
| constructor( | ||
| mediaSource: MediaSource, | ||
| codec: string, | ||
| next: () => void, | ||
| onUpdateEnd?: () => void | ||
| ) { |
Marc-André Moreau (mamoreau-devolutions)
approved these changes
Aug 6, 2026
Richard Markiewicz (thenextman)
approved these changes
Aug 6, 2026
Benoît Cortier (CBenoit)
approved these changes
Aug 7, 2026
Benoît Cortier (CBenoit)
left a comment
Member
There was a problem hiding this comment.
I adjusted PR title and body to match the repo’s conventions. Feel free to merge once you fixed the Copilot’s comments as appropriate.
Ensure the next buffered chunk is processed even if the live-edge callback throws. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
irvingouj@Devolutions (irvingoujAtDevolution)
enabled auto-merge (squash)
August 7, 2026 15:00
irvingouj@Devolutions (irvingoujAtDevolution)
merged commit Aug 7, 2026
ed74e60
into
master
117 of 126 checks passed
irvingouj@Devolutions (irvingoujAtDevolution)
deleted the
fix/shadow-player-live-edge
branch
August 7, 2026 17:32
irvingouj@Devolutions (irvingoujAtDevolution)
added a commit
that referenced
this pull request
Aug 7, 2026
Bumps `@devolutions/shadow-player` to `0.1.2` to publish the playback recovery fix from #1916. `multi-video-player` stays at `0.1.1`; its `^0.1.1` dependency already accepts this release. --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes ShadowPlayer playback getting stuck after a gap in a recording stream.
When screen updates resume, the viewer now continues playback from the latest available video instead of remaining on an earlier buffered segment.