Repository navigation
fix: video scrubbing on playback - #47703
Conversation
|
hello, what's blocking the merge? Audio/video seeking is broken in Electron 37, 38, 39 (works in 36) when serving media resources via registerStreamProtocol / protocol.handle, we're currently considering a rollback to v36 but we would obviously prefer to release our app with a more current Electron / Chromium revision. Thank you :) |
|
The only failing check seems to be a timeout? |
|
@danielweck there is feedback that needs to be incorporated. I'll try to update it today. |
b9ac1c4 to
2048ae8
Compare
|
MacOS AppleSilicon arm64 tests fail after 6h CI runtime between:
...is that blocking this PR merge? |
2048ae8 to
8b868b0
Compare
8b868b0 to
c0408a4
Compare
|
Release Notes Persisted
|
|
I was unable to backport this PR to "37-x-y" cleanly; |
|
I have automatically backported this PR to "38-x-y", please check out #47965 |
thank you to whoever is going to do this :) |
* fix: fix video scrubbing on playback * chore: address review feedback --------- Co-authored-by: Shelley Vohr <[email protected]>
|
@VerteDinde has manually backported this PR to "37-x-y", please check out #47971 |
fix: video scrubbing on playback (#47703) * fix: fix video scrubbing on playback * chore: address review feedback --------- Co-authored-by: Shelley Vohr <[email protected]>
* fix: fix video scrubbing on playback * chore: address review feedback --------- Co-authored-by: Shelley Vohr <[email protected]>
… existing layer stack Phase 5, steps 4 to 7. The library now reaches the screen. A renderer never receives a filesystem path and never supplies one. It asks for `app-media://<assetId>` and main resolves that id against the database. Serving `file:` instead would widen img-src and media-src to the whole disk and put `C:\Users\<name>\...` into the DOM of a window that renders imported content. An id is checked against a row; a path can only be checked against a guess. The scheme name was already named in security/policy.ts's CSP and is now real. Resolution goes id -> row -> path on every request, which is not incidental. Stored filenames contain the content hash, so deleting an asset and importing the same bytes again reuses the path. A window still holding a deleted asset's URL must get 404, not its replacement. The Range header is forwarded to the file fetch. Without it every request returns the whole file with status 200, Chromium reports `seekable` as 0-0, and setting currentTime snaps back to zero — a worship video that can only ever play from the beginning. Electron had its own regression here between 37.0.0 and the fix in electron/electron#47703 (backported to 37-x-y on 2025-08-06, first released in 37.2.6), so the pin is raised from ^37.0.0 to ^37.3.0. Backgrounds go through the layer stack that already exists rather than a second rendering path. `ThemeSpec.background` gains `mediaAssetId` and `fit`; the z2 MEDIA layer in SlideCanvas — the one renderer used by the audience output, both operator panes, the confidence monitor and the theme gallery — paints an <img> or a <video> from the protocol URL. Camera-over-lyrics and Scripture-over-camera are untouched: a background has one kind, so choosing media cannot displace a camera. Two details in that layer are load-bearing. It is keyed on the ASSET, not the cue, or advancing a lyric would restart and re-buffer the background video underneath it. And it is HIDDEN rather than unmounted during a black-out, for the same reason the camera layer is: coming back from black must resume the loop, not restart it. Media service items are presentable now, so image and video leave the NOT IMPLEMENTED set. They become ordinary cues carrying an asset id — the audience window may not read the library, so one broadcast stays one complete truth. An item with no file chosen, or whose file was deleted, reports `missing-media` rather than `not-implemented`: media works, and this is something the operator can fix on Thursday instead of discovering on Sunday. Video poster frames are NOT IMPLEMENTED and are labelled as such: nativeImage has no video decoder, so a video gets no thumbnail. Background video is silent and looping by design — muted is what makes autoplay work at all, and a loop with its own audio would talk over the worship leader. The thumbnail tests caught a real bug: the guard used canBeBackground(), which excludes logos, so every logo silently lost its preview. Split into isStillImage(). Unverified: nothing in this commit has run in Electron. There is no Electron binary in the build sandbox, so protocol registration, actual playback and seeking all need a local run.
Description of Change
Fixes #47661
This PR slightly modifies an existing patch to MultibufferDataSource to correctly set the supported range on scrub.
Note: There is currently upstream work around MultiBufferNeverDefer v2 which changed this code (see this crbug: https://issues.chromium.org/issues/41161335); future upstream CLs may result in the patch needing to change again in the near future.
Checklist
npm testpassesRelease Notes
Notes: Fixed an issue where video scrubbing would not correctly hold the new position on playback.