View Full Version : Is the format of visable tag allowed?
hades_666
2005-07-22, 07:10
is the format of visable tag allowed? i have tried it and it obviously doesnt work. what i am doing is i got an image on the bg which is overlayed with the music and video osd when the player has control. now it works with one of the 2. however when i use the or neither work.
any ideas?
example:
<control>
<type>image</type>
<id>15</id>
<posx>30</posx>
<posy>300</posy>
<height>180</height>
<width>180</width>
<texture>home-music-icon.png</texture>
<visible>!player.hasaudio | !player.hasvideo</visible>
</control>
jmarshall
2005-07-22, 11:18
the <visible> tag in it's current state means:
show the control if it's not playing music or it's not playing video.
thus, in it's current state, it is in fact equivalent to:
show the control if it's not playing music and video at the same time. this is because !a | !b = !(a + b). as it is impossible to play music + video at the same time, this will always be true. i.e.
<visible>true</visible>
the control will always be shown.
perhaps you could detail what you are trying to achieve?
hades_666
2005-07-22, 17:44
thanks for definition.
what i am attempting to do is fill the void of where my overlays appear. when there is no music or videos playing and the overlays are off. i have logos in the bottom left corner.
however, when either overlay turns on it appears ontop on the logo.
what i want to achieve is to have the logo only visable when neither player's overlay is active. hence, the logo appears when the music or videos are not playing.
Nuka1195
2005-07-22, 17:51
isn't there a player.hasmedia?
hades_666
2005-07-22, 17:54
if there is. that is what i would need. :)
jmarshall
2005-07-22, 18:22
so you only want it to appear when neither audio or video is playing.
thus, you'd do:
<visible>!(player.hasaudio | player.hasvideo)</visible>
which is the same as:
<visible>!player.hasaudio + !player.hasvideo</visible>
or:
<visible>!player.hasmedia</visible>
take your pick.
hades_666
2005-07-22, 18:27
beautiful, thanks boss. i tried the !player.hasmedia and it worked like a charm.