Want to play trailer which has assigned GUI buttons
#1
Hello

I have installed YOUTUBE addon and set private API then finally I can see my movie trailer.
BTW, I want to make GUI buttons to play movie trailer directly not thru context menu. Currently, I set view mode as poster/Big fanart, so I can move  left <-> right to each of my movies. So, my plan is I will place one small GUI buttons at somewhere in selected movie poster box.
To do that, what I need to do?

I just tried that below but it didn't work.

xml:
<control type="image">
     <left>200</left>
     <top>300</top>
     <width>100</width>
     <height>50</height>
     <texture>osd/trailer.png</texture>
     <onclick>PlayMedia($INFO[ListItem.Trailer],noresume)</onclick>
</control>



Please tell me what I need to more to play trailer to selected movie?
Thank you
Reply
#2
I have fixed it by myself.
This is my code

xml:

<control type="button" id="11">
                <description>Trailer Playback</description>
                <label>$LOCALIZE[31040]</label>
                <font>primal_13_Bold</font>
                <left>643</left>
                <top>60</top>
                <align>center</align>
                <onright>601</onright>
                <onleft>601</onleft>
                <onup>62594</onup>
                <ondown>601</ondown>
                <width>160</width>
                <height>80</height>
                <texturefocus colordiffuse="$VAR[BackColorButton]">flagging/video/flag.png</texturefocus>
                <texturenofocus colordiffuse="ff404040">flagging/video/flag.png</texturenofocus>
                <onclick>PlayMedia($INFO[ListItem.Trailer],noresume)</onclick>
                <visible>!IsEmpty(ListItem.Trailer) + !Skin.HasSetting(WindowedTrailer)</visible>
                <visible>Container.Content(movies)</visible>
                <visible>!ListItem.IsParentFolder</visible>
                <visible>Control.IsVisible(601)</visible>
</control>



Reply

Logout Mark Read Team Forum Stats Members Help
Want to play trailer which has assigned GUI buttons0