2015-09-06, 20:30
Running Kodi Jarvis here and trying to add player controls to the sidebar. The player controls are in a grouplist positioned below the sidebar menu grouplist. They work as intended, but I'm having a problem achieving the navigation that I would like. I'll try to explain using code snippets, you can find the full code at https://github.com/bryanbrazil/skin.mimic
In MyVideoNav.xml, etc, I'm using something like this, where my sidebar menu is 9050 with a portion of it in the MediaMenuTop include. The player controls are in a second grouplist include.
MediaMenuTop contains, among other things, the following (the player controls grouplist has id 6050):
The Player.HasMedia condition isn't being evaluated, though, I'm assuming because includes are only evaluated when they are first loaded? If I refresh the skin after playing media, then it works as intended. Otherwise it will just cycle through 9050.
I've tried several different configurations, but no luck. I took a look at reFocus, which correctly implements player controls in the sidebar using includes. Not sure why it works there but not here.
I know it's not currently possible, but would using a variable in this case solve this problem? Something like <onup>$VAR[foo]</onup> so that it is evaluated on the fly?
Thanks for taking a look, I welcome all suggestions.
In MyVideoNav.xml, etc, I'm using something like this, where my sidebar menu is 9050 with a portion of it in the MediaMenuTop include. The player controls are in a second grouplist include.
Code:
<control type="grouplist" id="9050">
<include>MediaMenuTop</include>
...additional controls
</control>
<include>MenuPlayerControls</include>
MediaMenuTop contains, among other things, the following (the player controls grouplist has id 6050):
Code:
<onup condition="Player.HasMedia">6050</onup>
<onup>9050</onup>
<ondown condition="Player.HasMedia">6050</ondown>
<ondown>9050</ondown>
The Player.HasMedia condition isn't being evaluated, though, I'm assuming because includes are only evaluated when they are first loaded? If I refresh the skin after playing media, then it works as intended. Otherwise it will just cycle through 9050.
I've tried several different configurations, but no luck. I took a look at reFocus, which correctly implements player controls in the sidebar using includes. Not sure why it works there but not here.
I know it's not currently possible, but would using a variable in this case solve this problem? Something like <onup>$VAR[foo]</onup> so that it is evaluated on the fly?
Thanks for taking a look, I welcome all suggestions.