temporarily disable player controls while a notification is visible?
#1
Is there any way of temporarily disabling the player controls while a notification is being displayed & enabling them after the notification closes?

Thanks
Reply
#2
Code:
<visible>!Window.IsVisible(infodialog)</visible>

should do the trick i'd say.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#3
In addition to that I have an extra button with the same id as the default control in my PlayerControls.xml which closes the dialog after 10ms (tried with 0 but that doesn't work). The user won't notice anything and pressing 'm' does basically nothing. If you don't do that and the user presses 'm', a hidden dialog would have focus which could cause confusion.

Example:
Code:
<defaultcontrol always="true">9100</defaultcontrol>
[...]
<control type="button" id="9100">
    <visible>Window.IsVisible(infodialog)</visible>
    <onfocus>close</onfocus>
    <animation effect="fade" start="0" end="100" delay="10">Focus</animation>
</control>
<control type="group">
    <visible>!Window.IsVisible(infodialog)</visible>
    [...]
</control>
Image
Reply
#4
thanks for the replies, sorry It's my fault for not describing it properly. I was on about the keyboard player controls. ie... when the notification is visible the user cant do anything like pushing esc etc..

do we have access to remap the keys from a skin?

thanks
Reply
#5
Why do you want to block the interaction when a notification is visible?
Image
Reply
#6
because i'm writting a script (thanks to queeup) that sends a notification & pauses if playing any media to all other xbmc machines (3 of them) on my network from my main pc when i update the library.

Since my sever is connected just to a 4 port 100 Mbit/s router if 2 are playing music & someones watching a film & then i start updating mysql at the same time it wouldn't be nice.

Thats way i asked, the idea was they'd just have to suffer until i've updated stuff. Even though theres a message please wait on the screen & i remotely paused it. the mrs is gonna go for the remote and start pressing the play key again a million times!!
Reply
#7
Since the progress dialog is blocking the UI, you maybe could create one from your script, make everything hidden (at least the cancel button) in your DialogProgress.xml if the infodialog is visible and close the dialog after the notification is hidden.

Edit: Never mind, you can still abort with 'esc'.

Edit2: lock() and unlock() is what you want.
Image
Reply
#8
thanks `Black, I'll look in to that.
Reply

Logout Mark Read Team Forum Stats Members Help
temporarily disable player controls while a notification is visible?0