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
MediaPortal 1 Plugins
Audio Renderer Changer
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="Anthrax" data-source="post: 767806" data-attributes="member: 46494"><p><strong>AW: Audio Renderer Changer</strong></p><p></p><p>Hello Thor2605 and everybody,</p><p></p><p>first off my chest: nice plugin, simple, clean, focussed on a single purpose and just works as advertised ;-) <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite8" alt=":D" title="Big Grin :D" loading="lazy" data-shortname=":D" /></p><p></p><p>One thing I'd like to suggest though would be the use of configurable MediaPortal Actions... (I'd even contribute on the code if your time is limited)</p><p>This would make it easier for everyone with a (MCE) Remote to assign a button for your plugin.</p><p></p><p>Just a few things would be needed in order to incorporate this functionality:</p><p></p><p>1. override OnAction() and check for the user configured Action:</p><p>[CODE] </p><p>[pseudo code]</p><p>public override void OnAction(MediaPortal.GUI.Library.Action action){</p><p> if (action == Settings.ConfiguredAction){</p><p> SwitchAudioRenderer(); //your switching magic here ;-)</p><p> }else{</p><p> base.OnAction(action);</p><p> }</p><p>}[/CODE]</p><p></p><p>2. Just add a ComboBox containing the values from the MediaPortal.GUI.Library.Action enumeration and let the user pick one</p><p></p><p>3. we are done ;-)</p><p></p><p>The Action enumeration can be found here: <a href="http://sources.team-mediaportal.com/websvn/filedetails.php?repname=MediaPortal&path=%2Ftrunk%2Fmediaportal%2FCore%2Fguilib%2FAction.cs&sc=1" target="_blank">WebSVN - MediaPortal - Rev 28022 - /trunk/mediaportal/Core/guilib/Action.cs</a></p><p></p><p>There are a lot of actions in there and everybody should be able to pick one which wouldn't be used otherwise like:</p><p style="margin-left: 20px">ACTION_TOGGLE_MUSIC_GAP = 9886</p><p>which I use for the MySleepTimer...</p><p></p><p>please let me know if you even consider thinking about it and if I could help you out with anything.</p><p></p><p>cheers mates,</p><p>Anthrax</p><p></p><p>PS: I've done the same in the MySleepTimer plugin if you you want to have look: <a href="http://mp-plugins.svn.sourceforge.net/viewvc/mp-plugins/trunk/plugins/MySleepTimer/MySleepTimer/" target="_blank">http://mp-plugins.svn.sourceforge.net/viewvc/mp-plugins/trunk/plugins/MySleepTimer/MySleepTimer/</a> </p><p>(but remember this was my first plugin so don't expect any best practices in there!!!) ;-)</p></blockquote><p></p>
[QUOTE="Anthrax, post: 767806, member: 46494"] [b]AW: Audio Renderer Changer[/b] Hello Thor2605 and everybody, first off my chest: nice plugin, simple, clean, focussed on a single purpose and just works as advertised ;-) :thx: One thing I'd like to suggest though would be the use of configurable MediaPortal Actions... (I'd even contribute on the code if your time is limited) This would make it easier for everyone with a (MCE) Remote to assign a button for your plugin. Just a few things would be needed in order to incorporate this functionality: 1. override OnAction() and check for the user configured Action: [CODE] [pseudo code] public override void OnAction(MediaPortal.GUI.Library.Action action){ if (action == Settings.ConfiguredAction){ SwitchAudioRenderer(); //your switching magic here ;-) }else{ base.OnAction(action); } }[/CODE] 2. Just add a ComboBox containing the values from the MediaPortal.GUI.Library.Action enumeration and let the user pick one 3. we are done ;-) The Action enumeration can be found here: [url=http://sources.team-mediaportal.com/websvn/filedetails.php?repname=MediaPortal&path=%2Ftrunk%2Fmediaportal%2FCore%2Fguilib%2FAction.cs&sc=1]WebSVN - MediaPortal - Rev 28022 - /trunk/mediaportal/Core/guilib/Action.cs[/url] There are a lot of actions in there and everybody should be able to pick one which wouldn't be used otherwise like: [INDENT]ACTION_TOGGLE_MUSIC_GAP = 9886[/INDENT] which I use for the MySleepTimer... please let me know if you even consider thinking about it and if I could help you out with anything. cheers mates, Anthrax PS: I've done the same in the MySleepTimer plugin if you you want to have look: [url]http://mp-plugins.svn.sourceforge.net/viewvc/mp-plugins/trunk/plugins/MySleepTimer/MySleepTimer/[/url] (but remember this was my first plugin so don't expect any best practices in there!!!) ;-) [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
MediaPortal 1 Plugins
Audio Renderer Changer
Contact us
RSS
Top
Bottom