Kodi Community Forum

Full Version: How to play trailer on small window slide view mode?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello

I want to know to how to make trailer playing on small window selected movie.
In transparent skin, with slide view, there is film reel icon on the right top. It looks working with <onclick>.

I found that one in the code.

xml:

<control type="button" id="7008">
                <left>1720</left>
                <top>90</top>
                <width>72</width>
                <height>72</height>
                <label></label>
                <font></font>
                <texturefocus>trailer-focus.png</texturefocus>
                <texturenofocus>trailer-nofocus.png</texturenofocus>
                <onup>9000</onup>
                <ondown>596</ondown>
                <onleft>9000</onleft>
                <onright>9000</onright>
                <onclick condition="Skin.HasSetting(Fullscreen_Trailer)">PlayMedia("$INFO[ListItem.Trailer]")</onclick>
                <onclick condition="!Skin.HasSetting(Fullscreen_Trailer)">PlayMedia("$INFO[ListItem.Trailer]",1)</onclick>
                <visible>!Skin.HasSetting(Hide_Trailer_Icon) + !String.IsEmpty(Listitem.Trailer)</visible>
            </control>

My plan is.. it will perform via <onfocus> not <onclick>

Which means for example

xml:

<control type="button" id="7008">
                <left>1720</left>
                <top>90</top>
                <width>72</width>
                <height>72</height>
                <label></label>
                <font></font>
                <texturefocus>trailer-focus.png</texturefocus>
                <texturenofocus>trailer-nofocus.png</texturenofocus>
                <onup>9000</onup>
                <ondown>596</ondown>
                <onleft>9000</onleft>
                <onright>9000</onright>
                <onfocus condition="Control.HasFocus(596)">PlayMedia("$INFO[ListItem.Trailer]")</onfocus>
                <onfocus condition="!Control.HasFocus(596)">PlayMedia("$INFO[ListItem.Trailer]",1)</onfocus>

                <visible>!Skin.HasSetting(Hide_Trailer_Icon) + !String.IsEmpty(Listitem.Trailer)</visible>
</control>

Not sure it is working or not because I have no idea how to create small window displaying trailer via You Tube addon.

Please help me out?
Fixed my self.

Need to Video Window. This is my video window I am using for my custom skin.

xml:

<control type="videowindow" id="2">
                <description>Trailer Video Window</description>
                <left>177</left>
                <top>560</top>
                <width>712</width>
                <height>401</height>
                <visible>set your condition to view this window</visible>
</control>