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!)
Override OnAction while video is playing
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="bmt" data-source="post: 631029" data-attributes="member: 102256"><p>Hi everyone,</p><p></p><p>I'm stuck with something. Hope you guys can help me.</p><p>This is what I want to do:</p><p>When a video is playing, i want to add an ActionListener with the key "l"</p><p></p><p>This is what I got:</p><p></p><p>[CODE]class 1</p><p>{</p><p> ...</p><p> if (control == Play)</p><p> {</p><p> g_Player.Play(file);</p><p> g_Player.ShowFullScreenWindow();</p><p> }</p><p></p><p> public override void OnAction(MediaPortal.GUI.Library.Action action)</p><p> {</p><p> switch (action.wID)</p><p> {</p><p></p><p> case MediaPortal.GUI.Library.Action.ActionType.ACTION_KEY_PRESSED:</p><p> {</p><p> if ((char)action.m_key.KeyChar == 'l')</p><p> {</p><p> doSomething();</p><p> }</p><p> }</p><p> break;</p><p> }</p><p> base.OnAction(action); </p><p> }</p><p> ...</p><p>}[/CODE]</p><p></p><p>This is what happens: While the video is playing, there is a new window that doesn't react to my input.</p><p>Can I add the OnAction to the current window that is playing the file?</p><p></p><p>Grateful for any hint!</p></blockquote><p></p>
[QUOTE="bmt, post: 631029, member: 102256"] Hi everyone, I'm stuck with something. Hope you guys can help me. This is what I want to do: When a video is playing, i want to add an ActionListener with the key "l" This is what I got: [CODE]class 1 { ... if (control == Play) { g_Player.Play(file); g_Player.ShowFullScreenWindow(); } public override void OnAction(MediaPortal.GUI.Library.Action action) { switch (action.wID) { case MediaPortal.GUI.Library.Action.ActionType.ACTION_KEY_PRESSED: { if ((char)action.m_key.KeyChar == 'l') { doSomething(); } } break; } base.OnAction(action); } ... }[/CODE] This is what happens: While the video is playing, there is a new window that doesn't react to my input. Can I add the OnAction to the current window that is playing the file? Grateful for any hint! [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Development
General Development (no feature request here!)
Override OnAction while video is playing
Contact us
RSS
Top
Bottom