TroyFernandes / MusicBeeChromecast

Adds Cast functionality to MusicBee
36 stars 3 forks source link

Connection works, but no sound / HTTP 503 Service unavailable #11

Closed raihei closed 3 years ago

raihei commented 3 years ago

Hi Troy,

thank you for making this plugin available! I installed the two files, set the port and ran the firewall configuration. When I click the Chromecast button in MusicBee, it shows my Chromecast devices, and when I select one, this device plays the connection sound but I can't hear music. "Check status" says, Chromecast ist connected and the server is running.

When I open the url http://localhost:8080 on the PC running MusicBee, I only get a HTTP 503 error. If I close MusicBee, I get a timeout when opening the url. (as expected, because the server will be shut down, too)

I already tried another port (8282), same problem, only a HTTP 503 error.

OS is Windows 10 x64 1909

Edit: I try to stream to a Google Home Mini. I set up MusicBee on another PC and its the same problem. Do I need to select somewhere in MusicBee, that I don't want to play to the local sound card but to the Chromecast device? Because if I press play, it is playing through my PC speakers as usual.

TroyFernandes commented 3 years ago

I think its a problem with the netsh command.

Try running this command in command prompt (as admin): netsh http show urlacl You should see your url reservation with the port you chose show up. e.g:

    Reserved URL            : http://*:8080/
        User: \Everyone
            Listen: Yes
            Delegate: No
            SDDL: D:(A;;GX;;;WD)

If you don't see that you can try running this command again: netsh http add urlacl url=http://*:[PORT]/ user=Everyone. Make sure to replace [PORT] with the port you chose

Also, you dont need to change any sound outputs or anything. The chromecast plugin doesn't send the audio directly, instead it acts as a controller hosting the music files locally and telling the chromecast where it can find the songs on the network.

Check this out, mainly the "example setup vid" and this is how it should work; https://github.com/TroyFernandes/MusicBeeChromecast/issues/9#issuecomment-723839441

raihei commented 3 years ago

Thank you for your feedback. I accidentally added a second rule for http://+:8080/ in addition to the rule for http://*:8080 which caused the 503 error. After deleting the second rule, everything is working. Sorry for the confusion!

I have another small question:

I sucessfully compiled the "mb_Chromecast.dll" via VisualStudio. But when I compile it, it only generates a small (81kb) "mb_Chromecast.dll" The compiled file works, because all referenced files are copied to the "Plugins" folder aswell. To me it looks like, your compiled "mb_Chromecast.dll" with 3270kB contains all required references. How can I tell Visual Studio to "pack" the files in the "mb_Chromecast.dll" so that I don't have 150 additional files in the "Plugins" folder?

TroyFernandes commented 3 years ago

I merge the dll's using ilmerge.

raihei commented 3 years ago

Thank you, I will try that!