event to trigger playing a sound?
#1
Hi I am trying to see if there is a way to send an ir command to trigger playing an mp3 from any state? The exact requirement is when I turn on the projector I would like to play a 16 second intro whilst the screen lowers and the projector warms up.

I have girder on the same system which I had hoped could do this but it cant as xbmc is "using" the sound card.

Any suggestions?
Reply
#2
OK have been trawling to see if I can find an answer and I believe it may be possible to do this using JSON-RPC?!?!

could someone tell me if there is a command I can have Grider output using http to play an mp3?
Reply
#3
You can play a movie or music file when xbmc starts. http://forum.xbmc.org/showthread.php?tid=124124
Reply
#4
hi thanks, but as my xbmc is on 100% of the time this wont work. I wonder if I could use a similar event and instead of:

<onload condition="Window.Previous(startup)">XBMC.PlayMedia(special://skin/introMovie.mov)</onload>

I could have something like

<onload condition="key press "greenbutton">XBMC.PlayMedia(special://test.mp3)</onload>

or similar?
Reply
#5
I don't know if it will work however you can try editing the keyboard.xml file for the green button code with XBMC.PlayMedia(special://test.mp3)
Reply
#6
that worked!!!

in case anyone wants to know the answer is to put it into the Global section of the Keyboard.xml (you need to create one in the keymaps folder)

the line I added was

<z>XBMC.PlayMedia(//HTPC/Users/Jonathan/Videos/Pearl.mp3)</z>

thanks and now works perfectly.
Reply

Logout Mark Read Team Forum Stats Members Help
event to trigger playing a sound?0