BrainicHQ / CastVolumeControl

MIT License
3 stars 1 forks source link

Connecting to device drops other connection which is playing the music #1

Open rodpestell opened 7 months ago

rodpestell commented 7 months ago

Hi BrainicHQ,

Great to see that someone has managed to create this little app. However, one snag is that when you connect to the chromecast device to control the volume it disconnects the existing source, eg. Another chrome tab or VLC. I've always been looking for something like this, especially for windows VLC. It would be great to port the Google Home app from the phone to a PC. Perhaps it can be done using Bluestack but that is over the top i feel (and I'm not entirely sure if it would work to be honest).

Hope there is a solution to this issue.

Thanks

Rodp

s1lviu commented 7 months ago

Hello @rodpestell,

Thank you for your feedback. Based on your specific use case with VLC, I have a couple of additional suggestions that might help resolve the issue:

Selecting “Other” from the App List: If you are using VLC or any application not explicitly listed in our app's dropdown menu, try selecting the “Other” option. This is designed to provide a more generic connection to your Chromecast device that might not interrupt your current stream. Give it a try and see if it allows you to control the volume without disconnecting your existing source.

Matching App Selection: Our app is designed so that if the app currently playing on your Chromecast matches the app you select from our dropdown list, it should not interrupt the ongoing playback. This is because the app aims to attach to the existing session rather than starting a new one. So, if you're casting from an app that's already listed, and you select the same app in our control interface, it should ideally take over control without disrupting the stream.

Please try these suggestions and let us know if they work for you. If the issue persists, or if you encounter any other problems, don't hesitate to reach out. We are committed to continuously improving our app, and your feedback is crucial in this process.

Thanks again for your support and for using our Chromecast Volume Control app.

Best regards,

The Brainic Team

rodpestell commented 7 months ago

Hi @s1lviu,

Thanks for the reply. I've tested a few other scenarios but the same issue is also occurring on the presets supplied. For instance:

-Load up youtube tab in a chrome browser -start playing some music -cast it to my Chromecast Audio device -In a different tab goto page https://castvolumecontrol.pages.dev -Select YoutTube music from the present list -click connect -Choose the chromecast device from the list that then appears (top right of window)

When you select a device, at that point the youtube tab is then disconnected from the chromecast device (audio stops and you hear a ping as the castbolumecontrol page connects to the device) and in the https://castvolumecontrol.pages.dev tab, it displays the message 'No active media session found. Please start playing media on your Chromecast device and try again.'

The Youtube tab continues to play but just from my PC speakers and not my chromecast.

If you get the youtube tab playing again to the chromecast audio device and try 'Other' or 'Youtube' or any others in fact as a preset, the same issue occurs.

I then tried vlc from my android phone and tried 'Other' present from the PC's chrome tab. I select the chromecast device as usual (it know's it's being streamed from teh android - the music title is there) but it doesn't disconnect on this occasion but just displays the same error message this mtime. So I then closed the https://castvolumecontrol.pages.dev/ page down and loaded it back up. Upon loading up it then connected and I could control the volume! :)

I tried this observation for a chrome tab but no luck. It still disconnects.

I went back and tried BubbleUPNP on my android but no luck. It just works with VLC. Yo ucan click dosconnect and then connect to your hearts content and it will operate the volume as expected.

The debugger's original message: (index):203 Error starting Cast session: cancel (This occurs at the point of clicking connect and then choosing a device) (anonymous) @ (index):203 Promise.then (async) (anonymous) @ (index):201 (index):225 Session started or resumed (index):235 No active media session found

Can you replicate the issue(s) at your end? Could this purely be a app selection code issue that is not covered by your presets?

Thanks

Rod Pestell PS I also tried the website on my android phone (VLC misses out on being able to use the hardware volume keys and you have to use the google home app to manage it's volume. BubbleUPNP on the other hand has this feature and so I swap between the two for that reason! VLC can handle MP2 files whilst Bubble can't.) Your website works on my phone and allows me to control the volume of VLC using my volume keys which is great... so it's not all bad news! :)

s1lviu commented 7 months ago

Hi @rodpestell,

Thanks heaps for the thorough testing and feedback on our Chromecast Volume Control app. It's super valuable to have your perspective as we work on making improvements.

I wanted to touch base on the issue you're encountering, where connecting to your Chromecast through our app seems to interrupt what's already playing (like YouTube or VLC). We definitely didn't intend for that to happen, and it's great that you pointed it out.

A quick note on selecting the right app and managing sessions:

Our aim is for the app to seamlessly connect to an ongoing Chromecast session, rather than starting a new one. But it seems we're hitting a snag in maintaining this continuity, especially when switching between different sources like YouTube and VLC.

Just a quick note about this project – it's a community-driven effort, developed under the MIT license, and it's completely non-commercial. We're doing this in our free time, so we really value your input and plan to keep improving the app as we go. If you like what we're doing, feel free to star us on GitHub. Every bit of support helps!

Cheers

rodpestell commented 7 months ago

Hi @s1lviu,

Thanks for that - I've had another go with a youtube tab but still have the same problem. I thought I'd take a sort video to help explain the problem to be sure I've explained it properly. I'll attach the link here:

https://github.com/BrainicHQ/CastVolumeControl/assets/11728861/da5dc05f-e599-4d67-874c-2cd78fd34639

...but will then then remove the link once you've reviewed it (to be sure I'm not going against any github policies!)

Thanks

Rod

s1lviu commented 7 months ago

Hi @rodpestell,

Thank you for sharing the video to clarify the issue with casting a YouTube tab. It’s always helpful to have a visual representation of the problem. I’ve reviewed the video, and it gives a better understanding of what you're experiencing.

Regarding the removal of the video, it's actually okay to leave it up for further investigation by the community. Having the video available can be beneficial as it allows others to see exactly what you’re encountering and potentially offer more informed solutions or insights. Community-driven troubleshooting often benefits from as much detail as possible, including videos like yours.

In the meantime, I'm looking into the specifics of why your app might be experiencing difficulties when interacting with a Chromecast session initiated by a YouTube tab. It's important to consider that a browser tab that has been mirrored (which is origin and tab scoped) can have more limitations compared to a standalone app that plays back on the device (which is typically origin scoped). This difference in session scoping might be why our app appears to be overtaking the session initiated by the YouTube tab.

Best regards, @s1lviu

rodpestell commented 3 months ago

Hi @s1lviu , Just wondered if you had got any further on this. The app still stops the You tube tab streaming from chrome (windows 10 PC) when you select a device (I've tried all devices) and click connect. Hope you can fix this soon. Thanks.

s1lviu commented 3 months ago

Hi, @rodpestell Unfortunately, no. You can try with the newly added Chrome options in the list, but I'm not sure if it will work for you.

rodpestell commented 3 months ago

Hi @s1lviu, afraid not, chrome mirroring and audio mirroring options still take the focus away from the current chrome tab (was playing music from youtube FYI), when using the app from either windows PC or my phone (android 8). So currently the only working solution for me is VLC on my phone and using the default media receiver option. If there is anything I can check at my end, eg debug or logs in the chrome browser let me know. Thanks.