Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preventing chime sound when starting new media #79

Closed
psy0rz opened this issue Dec 7, 2021 · 7 comments
Closed

Preventing chime sound when starting new media #79

psy0rz opened this issue Dec 7, 2021 · 7 comments

Comments

@psy0rz
Copy link

psy0rz commented Dec 7, 2021

Whenever I send a media-request to some of my chromecast, i get the annoying "chime sound" before it starts playing.

I'm trying to use my chromecast speakers for short notiifcation sounds, so i dont want the other sound.

As a workaround for google speakers: it seems you wont get the sound if you start a playback of a silence sound and you pause that. That way the status will stay "joined", so you wont get a new chime.

However this doesnt help with my JBL speaker: It always gives me the chime, even when its already joined.

A QUEUE_INSERT would be a nice workaround (in combination with PAUSE), but that doesnt seem to be implemented in this module?

@psy0rz
Copy link
Author

psy0rz commented Dec 7, 2021

After some debugging: It seems node.receiver.APP_ID does never exist. I JSON stringified it but there doesnt seem to be an Appid in that whole object.

On this line: https://github.com/i8beef/node-red-contrib-castv2/blob/master/castv2-sender.js#L529

I commented out that last comparison with that object and now it reuses the session correctly. (but if there is a different session/app it offcourse returns and error, which is fine for my application)

So it seems a bug?

(Tested on JBL portable google home speaker)

@i8beef
Copy link
Owner

i8beef commented Dec 8, 2021

The chime is a built in Google thing whenever a new app launches (like the cast target). I don't believe there is a way to disable it.

That check is to ensure that if another app is currently running (say YouTube, or Spotify, or whatever) that it closes it and launches the correct receiver app before attempting to send commands which may not apply to the current running app. That is necessary, but the check could be wrong actually...

Try changing node.receiver.APP_ID !== castV2App.APP_ID to !(node.receiver instanceof castV2App) and see if that works for you.

@psy0rz
Copy link
Author

psy0rz commented Dec 9, 2021

The chime is a built in Google thing whenever a new app launches (like the cast target). I don't believe there is a way to disable it.

Ok i expected that.

That check is to ensure that if another app is currently running (say YouTube, or Spotify, or whatever) that it closes it and launches the correct receiver app before attempting to send commands which may not apply to the current running app. That is necessary, but the check could be wrong actually...

Yes i believe this is the case.

Try changing node.receiver.APP_ID !== castV2App.APP_ID to !(node.receiver instanceof castV2App) and see if that works for you.

Ok i'll try later.

@i8beef
Copy link
Owner

i8beef commented Jan 5, 2022

Did you ever get a chance to try this out?

@i8beef
Copy link
Owner

i8beef commented Feb 15, 2022

Try 4.1.3.

@psy0rz
Copy link
Author

psy0rz commented Feb 15, 2022

thanks i will

@i8beef
Copy link
Owner

i8beef commented May 24, 2022

Closed as stale.

@i8beef i8beef closed this as completed May 24, 2022
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

No branches or pull requests

2 participants