Skip to content

FIX: with two concurrent audio streams in ui_audio first one cannot be stopped.#858

Open
anttiryt wants to merge 2 commits into
node-red:masterfrom
anttiryt:master
Open

FIX: with two concurrent audio streams in ui_audio first one cannot be stopped.#858
anttiryt wants to merge 2 commits into
node-red:masterfrom
anttiryt:master

Conversation

@anttiryt

@anttiryt anttiryt commented Jul 9, 2026

Copy link
Copy Markdown

Fixed the nasty bug where if you have background music playing and another sound effect on top like exclamation mark the background music could no longer be stopped.

@linux-foundation-easycla

linux-foundation-easycla Bot commented Jul 9, 2026

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

@anttiryt anttiryt marked this pull request as draft July 9, 2026 09:02
@anttiryt anttiryt marked this pull request as ready for review July 9, 2026 09:02
@dceejay dceejay self-requested a review July 10, 2026 07:34

@dceejay dceejay 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.

Hi @anttiryt - looks good. Rather than console.log we use node.log to log things in a slightly more formatted way - so please use that if you need to leave in those logging statements.

Also not sure if this is worth doing - but I guess you could also check for msg.reset being a number and only kill that instance if you wanted to enhance it further.

Comment thread src/main.js

events.on('ui-audio', function(msg) {
if (msg.reset) {
console.log("Audio Reset triggered. Current active stream count: " + audioSources.length);

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.

Please use node.log

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