I'm developing a plug-in for a web application where I have to run audios from a particular server, but these audios will run on the user's player (because it has proprietary format audios). The idea was to create a new URL protocol in regedit that calls the Windows Media Player executable and would send, as a parameter, the audio path. Here are the steps I took:
1st In regedit > HKEY_CURRENT_USER > Software > Class created a key called 'alert'. In the key 'alert' a String Value was created called 'URL protocol' and in 'Value' was placed in the Value Data "URL: alert Protocol";
Within the 'alert' subkyes were created shell > open > command and in the '(Default)' of the 'command'inseri the following Value Data: "C: \ Program Files \ Windows Media Player \ wmplayer.exe ""% 1 ", where I say which executable to run with 1 argument (which would be the audio path);
3rd On the front end I have the following code:
<a href="alert://C:\Users\meuUser\teste.wav">Click to trigger</a>
By clicking the link above, it simply opens Windows Media Player, but does not load the audio. I would like help solving this problem.
NOTE: I try to run directly from explorer too and the error saying that the audio can not be played, however if I go in the key and change the% 1 by the way it runs the audio in issue.