home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
Development
General Development (no feature request here!)
How to play radio from code
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="JDWestoby" data-source="post: 686910" data-attributes="member: 72093"><p>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.</p><p></p><p>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.</p><p></p><p>Stealing the code from MediaPortal I've tried (in VB.NET for no particular reason) -</p><p></p><p> Dim m As GUIMessage = New GUIMessage()</p><p> m.Message = GUIMessage.MessageType.GUI_MSG_RECORDER_TUNE_RADIO</p><p> m.Label = "BBC Radio 2"</p><p> 'TVHome.OnGlobalMessage(m)</p><p></p><p>or </p><p></p><p> Dim n As ChannelNavigator = New ChannelNavigator()</p><p> Dim c As TvDatabase.Channel = n.GetChannel("BBC TWO")</p><p> TVHome.ViewChannel(c)</p><p></p><p>or</p><p></p><p> 'Dim b As Boolean = TVHome.ViewChannelAndCheck(c)</p><p></p><p></p><p>But none of these seems to work. (It did play TV for half a second but even that seems to have stopped.)</p><p></p><p>Please could anyone help in telling me how I can play (preferably a radio station) using code?</p><p></p><p></p><p>Pretty please...<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" /></p><p></p><p></p><p>(Sorry this went in MP2 - can this be moved please.)</p></blockquote><p></p>
[QUOTE="JDWestoby, post: 686910, member: 72093"] 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.) [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Development
General Development (no feature request here!)
How to play radio from code
Contact us
RSS
Top
Bottom