Repository navigation
Fix video clips failing to play with KDE Plasma Integration (#2) - #3
Merged
Merged
Conversation
Clips are played by a <video> element that was never added to the page. The KDE Plasma Integration browser extension, installed by default on many Linux desktops through a system policy, wraps document.createElement and new Audio(): when a detached media element starts playing, it inserts it into the page and removes it again. Chromium pauses a media element that is removed from the page, so play() rejected with "The play() request was interrupted because the media was removed from the document" and the clip never went on air. That also explains why deleting streamFree's browser profile helped: the policy installs the extension into a fresh profile in the background, so only the first launch of a new profile ran without it. Media elements used only for their sound or frames (the clip player and the element Chrome needs to deliver a WebRTC guest's audio to Web Audio) now live in an invisible container in the page before play() is called, so the extension leaves them alone. The new browser test reproduces the extension's behaviour with a small page script; it fails without this change. Fixes #2 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Closed
iamvinbas
added a commit
that referenced
this pull request
Nov 4, 2026
On browsers without MediaStreamTrackProcessor (Safari, Firefox) the relay reads the camera through a <video> element. Like the clip player fixed in #3, a detached element can be paused by extensions such as KDE Plasma Integration, which Firefox users on Linux often have too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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 #2.
Cause
Video clips are played by a
<video>element that was never added to the page. The KDE Plasma Integration browser extension (installed by default on many Linux desktops through a system-wide browser policy, Brave and Chrome alike) wrapsdocument.createElementandnew Audio(). When a detached media element starts playing, the extension inserts it into the page and immediately removes it again, so it can pick it up for its media controls (page-script.js, "addPlayerToDomEvadingAutoPlayBlocking"). Chromium pauses a media element that is removed from the page, soplay()rejected with:…and the clip never went on air. This also explains the reporter's workaround: the policy installs the extension into a fresh profile in the background, so only the first launch of a new
~/.local/share/streamFree/browserprofile ran without it.Reproduced in Chrome by injecting the extension's real page script at document start: the exact error,
goo.gllink included, appears without this change and disappears with it.Fix
keepInPage()(inutil.js) puts media elements that are used only for their sound or frames into an invisible 1 px container in the page beforeplay(). The extension leaves elements that are already in the page alone. Used for:playMedia), removed from the page when the clip stops;<audio>element that Chrome needs to deliver a WebRTC guest's audio to Web Audio. The extension paused and restarted it, which could cause a brief audio drop.Tests
a video clip plays even with an extension that moves detached media. It mimics the extension's behaviour with a small page script of our own (the extension's code is GPL). It fails without this change (the clip never goes on air) and passes with it.Not tested
🤖 Generated with Claude Code