play file (1 Viewer)

hbe02

Portal Member
April 1, 2008
26
1
Home Country
hi all,
can someone please give me code to play a playlist or music file in media portal. I have an idea for a plugin that plays music on voice commands. The voice part is good. now once my plugin recognizes that the user say "play music.mp3" how can i play the file or playlist "music.mp3"
thanks.
 

uggabugga

MP Donator
  • Premium Supporter
  • February 21, 2007
    115
    11
    QXQgaG9tZSA7LSk=
    Home Country
    Hi hbe02 and welcome,
    I think there already is a plug in that does this, take a look: myVoice
    You could always help with development if you got skills in that department :)
     

    hbe02

    Portal Member
    April 1, 2008
    26
    1
    Home Country
    thanks for the feedback uggabugga.. unfortuntely the link to the myVoice plugin seems to have died.
    In regards to my plugin, i am trying to combine the myVoice with the X10 plugin into 1 where u can say something like. "Set mood to romantic" and my plugin will send the appropriate x10 signals to dim the lights and play some nice music and so on...
    question is, how can i play music?
     

    jburnette

    Portal Pro
    August 24, 2006
    758
    116
    Kentucky
    Home Country
    United States of America United States of America
    You can use g_player like this:

    MediaPortal.Player.g_Player.Play(whatever.mp3, MediaPortal.Player.g_Player.MediaType.Music)

    That should work for you. I'm not really sure if there's a better way, but that's what I use for the Music Trivia plugin and it seems to work fine.
     

    Users who are viewing this thread

    Top Bottom