XBIAN - Display a little video window in Home.xml
#1
Hello,

I want to display a little video window in Home.xml, which play a trailer of a film that you are currently focusing.

At the beginning, i've tried to put <onload> at the top of Home.xml, but it makes a black screen at starting, but if i comment it, restart then uncomment and refresh (with keymaps) it works. But i dont know how to do this working with alls films and at starting.

xml:
<?xml version="1.0" encoding="UTF-8"?>
<window id="1700">
    <!-- <onload>PlayMedia("/media/Elements/Trailers/Avengers.2012.mkv",1,noresume)</onload> -->
    <defaultcontrol>9000</defaultcontrol>
    <backgroundcolor>0xff333333</backgroundcolor>
    <controls>
        <control type="button" id="20000">
            <include>HiddenObject</include>
            <animation effect="fade" time="300" start="100" end="0">Focus</animation>
            <onfocus>SetFocus(2000)</onfocus>
            <onclick>noop</onclick>
            <visible allowhiddenfocus="true">Control.HasFocus(20000)</visible>
        </control>
xml:
                       
                        <control type="videowindow" id="2">
                                <left>200</left>
                                <top>100</top>
                                <width>620</width>
                                <height>310</height>
                                <visible>true</visible>
                                <aspectratio scalediffuse="false">scale</aspectratio>
                        </control>

If you could help me, i will be very grateful.

Thank you !
Reply
#2
UP
Reply
#3
In my opinion there are currently 2 methods to play trailers automatically after X seconds. Either via AlarmClock() or with System.IdleTime(). There will be no ready code for this, because it is very complex... Maybe you should have a look at how this was done in other skins?
Reply
#4
(2021-11-07, 20:08)beatmasterrs Wrote: In my opinion there are currently 2 methods to play trailers automatically after X seconds. Either via AlarmClock() or with System.IdleTime(). There will be no ready code for this, because it is very complex... Maybe you should have a look at how this was done in other skins?

Hello, 
Thanks for the answer !

What kind of skins ?
Reply

Logout Mark Read Team Forum Stats Members Help
XBIAN - Display a little video window in Home.xml0