locked
Audio playback inside the server when using WHS Console RRS feed

  • General discussion

  • Hello everybody,

    I have a situation where I am looking for help. I am using my server running Windows Home Server as the audio player for my home. I have sound card and play music and internet radio directly on the server. I have wires connected to the home sound system. I got this to work pretty well when log on directly to the server or Remote Desktop as administrator. I am asking for help in setting up the sound to remain on the server when using the WHS Console instead of Remote Desktop. The reason I want to do this is because I like the Webradio add-in, and I would also get easy control over internet, without having to set up web Remote Desktop connections, etc.

    I have 4 situations, 1 and 2 are ok, and they work fine. 3 and 4 would be the ones to solve:

     

    1) Log on directly to Windows on the server - everything works fine. I have a homemade server with video and sound card, so this option is available.

     

    2) Connect to the server from inside the home network using Remote Desktop. I have set up the connection as "/admin" for Vista and left the sound on server, following the instructions from Microsoft 827483. Once I remotely connect to the server, I can open any media player software or the WHS Console on the server (WebRadio) and it works fine. Again, this is happening on the server through Remote Desktop, inside LAN.

     

    Now the following 2 options are the ones with issues.

     

    3) Open the WHS Console on the Client PC, not on the server. The client PC is inside the home network. When the console opens, the sound is by default brought from the server to the Client PC. Here's where I would like to leave it on the server. There is no option for that when you open the console, just a settings file that gets loaded automatically, and where we could change the parameters. Nothing to do with Remote Desktop, it's all about WHS Console opened on Client PC.

     

     

    4) Similar to 3, only open the WHS Console outside my home network, over the web. I can connect to the server via IP address, no problem, but the sound is coming to my client PC by default. I guess that if we could solve number 3, then 4 would be easy to fix.

     

    When you use Remote Desktop, there's a file ("default.rdp") in My Documents which has all settings info for Remote Desktop connection.

     

    For WHS Console the file is rdpload.aspx, located on the server at C:\Inetpub\remote.

    It could be more than one, but this in particular is important. 

     

    As I see, these are the code lines setting the sound:

     

    if(MsRdpClient.AdvancedSettings5 != undefined && MsRdpClient.AdvancedSettings5.AudioRedirectionMode != undefined)
                {  
                    MsRdpClient.AdvancedSettings5.AudioRedirectionMode = <%= AllowSound %>;
                }
                else
                { 
                    if (MsRdpClient.SecuredSettingsEnabled)
                    {
                        MsRdpClient.SecuredSettings.AudioRedirectionMode = <%= AllowSound %>;
                    }
                    else
                    {   // 0 means redirect sound
                        if (<%= AllowSound %> == 0)
                        {
                            alert('<%= AddServerToTrustedSitesWarningForSound %>');
                        }
                    }
                }

     

    I think that by default, the property AudioRedirectMode is 0, which means that the sound is brought to the client PC. Probably this should be set to 1, to be left on the server. I don't know how to write that code though. 

     

    This property change may not be enough. The console connection uses the same Remote Desktop functions built in Server 2003. Maybe we need to replicate somehow what we do when adding "/admin" for Vista or "/console" for XP to the command line (%systemroot%\system32\mstsc.exe /admin).

     

    Please have a look at the file and maybe you want to check a couple of other .aspx files in the same folder.

     

    For servers without a sound card for testing: actually you can partially test it. If you play anything using Webradio today, you have the sound coming to your client pc. Also, when open on the server Control Panel/Sounds And Audio Devices you will see the driver being RDP Driver. If you find and make the right changes to the code, you should not have sound on client pc anymore. Also, when open on the server Control Panel/Sounds And Audio Devices, you should not see RDP Driver anymore. I guess that without soundcard you have no drivers installed, so maybe nothing will show up, but definitely RDP Driver is only when the audio comes to the client pc.

     

    Thank you very much in advance,

    Alin

    Thursday, July 23, 2009 11:40 AM

All replies

  • I'll note that Windows Home Server is not designed by Microsoft to be a media player. It's designed to serve media to media players. So to an extent, anything you get to work is gravy, and if you can't get everything you want to work, well...

    You will not succeed in your scenario 3, and probably not in your scenario 4. When you run the Windows Home Server console "on a client PC" you are actually running an application on your server. That application runs in a custom "full screen" Remote Desktop session which has had all chrome removed. You don't have the required control over that remote desktop session, so scenario 3 is not going to happen. And I don't believe the ActiveX control used to connect to the console through the Remote Access web site allows a connection using /Admin or /console. Without that, you are not connecting to the console session on your server, and anything you do will not affect the sound your server is actually playing in any useful way... 

    I'm not on the WHS team, I just post a lot. :)
    Thursday, July 23, 2009 3:11 PM
    Moderator
  • Hi Ken,

    I stopped trying anymore to work this issue through the console, you are right very difficult if not impossible.

    However I found ways around it. Inside my network, I have no problems controlling sound on server using Remote Desktop /admin. To do it over the web, I have installed OpenVPN, and once my laptop gets connected to the server I am inside the home network and Remote Desktop works properly.

    I wouldn't access my server from a public place anyway for security reasons, so the VPN on laptop is just fine.

    It's over a month since I got the audio to work properly on the server, so I'm all good now :-)

    Thanks,
    Alin 

    Wednesday, August 26, 2009 8:55 PM