Kodi Community Forum

Full Version: adding local trailers to a view
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hello

i am messing around with the titan skin and making a gaming front end in combination with advanced emulator launcher

and i am trying to add the gameplay preview (trailers) to the view View_515_LowList but no luck so far

i managed to show the boxfront and cartridge en boxback and i would like to add a gameplay video that plays automatic when the game is selected

Image

anyone that can point me in the right direction if i open the videoinfo dialog the gameplay video is playing
Hi marco before the <controls>you have to put something like this

PHP Code:
<onload condition"!IsEmpty(ListItem.trailer)">PlayMedia($INFO[ListItem.trailer],1)</onload

and you need to make a video window were you want
PHP Code:
<control type="videowindow">
                            
                <
height>330</height>
                <
width>440</width>
                <
width>100%</width>
                <
height>100%</height>
                <
aspectratio scalediffuse="false">scale</aspectratio>
                <
visible> !IsEmpty(ListItem.trailer)</visible>
        </
control


EDIT- its a view.. you need to use itemlayouts and focusedlayout. in that case you can see how it works on the AEL DEBUG view, and almost copy paste the code. The code that I put here is for an infopage
i just tryed that

but i dont have <controls> only have <includes> and if i put the onload line in the xml it wont let me selct the low list anymore and it will jump back to the normal list view
yes I know, look at my EDIT

Quote:you need to use itemlayouts and focusedlayout. in that case you can see how it works on the AEL DEBUG view, and almost copy paste the code. The code that I put here is for an infopage
almost there

now the trailer plays in the videowindow and on the background ...
(2017-02-13, 01:12)marcoooo Wrote: [ -> ]almost there

now the trailer plays in the videowindow and on the background ...

You just need to put the ,1 to play only on the videowindow that you made - PlayMedia($INFO[ListItem.trailer],1)

If this doesn't work it's because you have a setting on the skin that enables the video on the background. you need to disable it or force it to disable only in that view with something like this inside the wraplist or list (were all the containers are defined)

PHP Code:
<onfocus condition="Skin.HasSetting(global.showvideo)">Skin.ToggleSetting(global.showvideo)</onfocus>
<
onunfocus condition="Player.HasVideo">PlayerControl(Stop)</onunfocus>
<
onunfocus condition="!Skin.HasSetting(global.showvideo)">Skin.ToggleSetting(global.showvideo)</onunfocus

On the skinsettings xml you need to see the exact name of the setting

example on the skin that I use
you need to put that after this
PHP Code:
<include name="View_57_ExtraInfo">
        <
description>List View (id=57)</description>
        <
control type="group">
            <include>
Animation.Common</include>
            <
visible>Control.IsVisible(57)</visible>
            <
control type="group">
                <
control type="list" id="57"
thnx the ,1 was already there

i had to switch it off in the skin settings it self

but al OK now
(2017-02-13, 01:14)KODser Wrote: [ -> ]
(2017-02-13, 01:12)marcoooo Wrote: [ -> ]almost there

now the trailer plays in the videowindow and on the background ...

You just need to put the ,1 to play only on the videowindow that you made - PlayMedia($INFO[ListItem.trailer],1)

If this doesn't work it's because you have a setting on the skin that enables the video on the background. you need to disable it or force it to disable only in that view with something like this inside the wraplist or list (were all the containers are defined)
PHP Code:
<onfocus condition="Skin.HasSetting(global.showvideo)">Skin.ToggleSetting(global.showvideo)</onfocus>
<
onunfocus condition="Player.HasVideo">PlayerControl(Stop)</onunfocus>
<
onunfocus condition="!Skin.HasSetting(global.showvideo)">Skin.ToggleSetting(global.showvideo)</onunfocus

On the skinsettings xml you need to see the exact name of the setting

example on the skin that I use
you need to put that after this
PHP Code:
<include name="View_57_ExtraInfo">
<
description>List View (id=57)</description>
<
control type="group">
<include>
Animation.Common</include>
<
visible>Control.IsVisible(57)</visible>
<
control type="group">
<
control type="list" id="57"
Hello, I am not sure you are still here.

Above your code, I tried but it still plays trailer window and background both.

Here is my code.



<include name="View_601_Poster_Movies">
        <control type="group">
            <control type="list" id="601">
...
<itemlayout height="291" width="212">
...
</itemlayout>
<focusedlayout height="291" width="212">
...
</focusedlayout>
<control type="group">
...
<control type="videowindow" id="2">
                <description>Trailer Video Window</description>
                <left>860</left>
                <top>125</top>
                <width>1000</width>
                <height>520</height>
                <visible>Player.HasVideo +!ListItem.IsParentFolder | Control.HasFocus(601) | Control.HasFocus(11) | Control.HasFocus(77)</visible>
            </control>

<control type="button" id="11">
                <description>Trailer Playback</description>
                <label>$LOCALIZE[31040]</label>
                <font>primal_13_Bold</font>
                <left>490</left>
                <top>60</top>
                <align>center</align>
                <onright>77</onright>
                <onleft>601</onleft>
                <onup>601</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>
                <onload condition="Skin.HasSetting(global.showvideo)">Skin.ToggleSetting(global.showvideo)</onload>
                <onclick>PlayMedia($INFO[ListItem.Trailer],1)</onclick>
                <onunload condition="!Skin.HasSetting(global.showvideo)">Skin.ToggleSetting(global.showvideo)</onunload>
                <visible>!IsEmpty(ListItem.Trailer) + !Skin.HasSetting(WindowedTrailer) |Container.Content(movies)|!ListItem.IsParentFolder| Control.IsVisible(601) </visible>
</control>




Please tell me what I have missing?

thank you