Start action on playing media
#1
Hi @ all,

i wan't to mod a skin and need an option to start a special action when starting for example a misic track.
How can i add an trigger which works everywhere without press a button or use onload etc. ?

Thx
Reply
#2
Skin helper service :

Splash screen / skin intro

Can be used to easily provide a splash/intro option to your skin. Supports all media files: music, video or photo.

First, set the setting somewhere in your skin settings, for example with this code:

Code:
control type="radiobutton">
    <label>Enable splash screen (photo, video or music)</label>
    <onclick condition="!Skin.String(SplashScreen)">Skin.SetFile(SplashScreen)</onclick>
    <onclick condition="Skin.String(SplashScreen)">Skin.Reset(SplashScreen)</onclick>
    <selected>Skin.String(SplashScreen)</selected>
</control>

Secondly you have to adjust your Startup.xml from your skin to support the splash intro:

Code:
<onload condition="Skin.String(SplashScreen)">RunScript(script.skin.helper.service,action=splashscreen,file=$INFO[Skin.String(SplashScreen)],duration=5)</onload>
<onload condition="!Skin.String(SplashScreen)">ReplaceWindow($INFO[System.StartupWindow])</onload>


and you need to add both a videowindow and image control to your startup.xml:

Code:
<!-- video control for splash -->
<control type="videowindow">
    <width>100%</width>
    <height>100%</height>
</control>
<!-- image control for splash -->
<control type="image">
    <width>100%</width>
    <height>100%</height>
    <aspectratio>keep</aspectratio>
    <texture background="true">$INFO[Window(Home).Property(SkinHelper.SplashScreen)]</texture>
</control>

Offcourse make sure to remove any other references which replaces the window... The duration parameter is optional, this will set the amount of seconds that an image will be shown as splash, defaults to 5 seconds if ommitted. Music and video files always default to play to the end before closing the splash screen.
 Estuary MOD V2 
Reply
#3
Thx for reply but i think you didn't understand me correctly :-( For example: if music track is started window xy will be loaded or setting xy is set.

Gesendet von meinem Xperia Z1 mit Tapatalk
Reply
#4
Use skin strings or properties. Compare playing song to last played. When it changes store the new name ans do ypur action. Somerhing like that. Probably better toinvolve some python. I think..
Reply

Logout Mark Read Team Forum Stats Members Help
Start action on playing media0