As part of trying to make a radio alarm clock (£200 netbook so much better than a £15 from Philips or whoever) I want to be able to turn on the Radio (or TV) from a client PC.
I have (several) client PCs that I can listen to radio/watch TV fine just by going into the Radio or TV windows and pressing buttons. But I've not managed to do this programatically.
Stealing the code from MediaPortal I've tried (in VB.NET for no particular reason) -
Dim m As GUIMessage = New GUIMessage()
m.Message = GUIMessage.MessageType.GUI_MSG_RECORDER_TUNE_RADIO
m.Label = "BBC Radio 2"
'TVHome.OnGlobalMessage(m)
or
Dim n As ChannelNavigator = New ChannelNavigator()
Dim c As TvDatabase.Channel = n.GetChannel("BBC TWO")
TVHome.ViewChannel(c)
or
'Dim b As Boolean = TVHome.ViewChannelAndCheck(c)
But none of these seems to work. (It did play TV for half a second but even that seems to have stopped.)
Please could anyone help in telling me how I can play (preferably a radio station) using code?
Pretty please...
(Sorry this went in MP2 - can this be moved please.)
I have (several) client PCs that I can listen to radio/watch TV fine just by going into the Radio or TV windows and pressing buttons. But I've not managed to do this programatically.
Stealing the code from MediaPortal I've tried (in VB.NET for no particular reason) -
Dim m As GUIMessage = New GUIMessage()
m.Message = GUIMessage.MessageType.GUI_MSG_RECORDER_TUNE_RADIO
m.Label = "BBC Radio 2"
'TVHome.OnGlobalMessage(m)
or
Dim n As ChannelNavigator = New ChannelNavigator()
Dim c As TvDatabase.Channel = n.GetChannel("BBC TWO")
TVHome.ViewChannel(c)
or
'Dim b As Boolean = TVHome.ViewChannelAndCheck(c)
But none of these seems to work. (It did play TV for half a second but even that seems to have stopped.)
Please could anyone help in telling me how I can play (preferably a radio station) using code?
Pretty please...
(Sorry this went in MP2 - can this be moved please.)