Skip to content

Fix LNA issues when using local audio - #2448

Merged
Kuuuube merged 12 commits into
yomidevs:masterfrom
Lolle2000la:fix-lna-issues-when-using-audio
Jul 29, 2026
Merged

Fix LNA issues when using local audio#2448
Kuuuube merged 12 commits into
yomidevs:masterfrom
Lolle2000la:fix-lna-issues-when-using-audio

Conversation

@Lolle2000la

@Lolle2000la Lolle2000la commented Jun 17, 2026

Copy link
Copy Markdown

Fixes #2310

Mimics the setup for TextToSpeechAudio when it encounters local target urls for the audio server. It offloads the fetching of the audio data to the background, which causes it to be recognized by the extension and allowed through. Only applies to local URLs, global URLs are still going through the flow as before.

By doing this it can circumvent the constant, very annoying LNA prompts. (see example below)

image

Note: to replicate this issue, go to about:config and set network.lna.blocking to true.

@Lolle2000la
Lolle2000la requested a review from a team as a code owner June 17, 2026 13:17

@Kuuuube Kuuuube left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm quite suspicious that theres a large amount of code duplication in this PR. I'll look at it more later. But just from a brief look here's some comments.

Comment thread ext/js/media/audio-system.js Outdated
Comment thread ext/js/media/web-audio-local-audio.js Outdated
@Kuuuube Kuuuube added kind/bug The issue or PR is regarding a bug area/audio The issue or PR is related to audio labels Jun 28, 2026
@Lolle2000la
Lolle2000la requested a review from Kuuuube June 28, 2026 09:45

@Kuuuube Kuuuube left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cleaned up/rearranged some parts that went heavily against Yomitan's architecture and deduplicated some.

Would've liked this to use blob object urls to eliminate the need for the whole WebAudioLocalAudio class but it looks like that isn't possible due to Firefox's content security policy (Chrome does allow it). Could've been a much cleaner solution but oh well...

Thank you for the contribution!

@Lolle2000la

Copy link
Copy Markdown
Author

Just in case someone notices this PR and thinks it's broken because the CI doesn't pass, there seems to be an unrelated problem with reporting, and all tests seem to pass(?).

@MarvNC MarvNC left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@Kuuuube
Kuuuube added this pull request to the merge queue Jul 29, 2026
Merged via the queue into yomidevs:master with commit 3bfc888 Jul 29, 2026
24 of 25 checks passed
@Lolle2000la
Lolle2000la deleted the fix-lna-issues-when-using-audio branch July 29, 2026 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/audio The issue or PR is related to audio kind/bug The issue or PR is regarding a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Firefox's new "local network permissions" rules interfere with local audio servers

3 participants