Can I add background music to XBMC?
#16
First, seek in PM3 HD the function. So you have an example.

How to:

Go in xbmc to the location were the start playlist button is.
do look in your(debug/log) which skin file _.xml was loaded.

18:47:02 T:236 M:930066432 INFO: Loading skin file: custom_SkinSetting_1111.xml

Go to that .xml file: XBMC/skin/PM3 HD/720P/custom_SkinSetting_1111.xml

Find the button.
PHP Code:
                <control type="radiobutton" id="107">
                    <
width>950</width>
                    <
height>35</height>
                    <
font>font12</font>
                    <
label>21398</label>
                    <
textcolor>grey2</textcolor>
                    <
focusedcolor>white</focusedcolor>
                    <
texturefocus border="7">list-focus.png</texturefocus>
                    <
texturenofocus>-</texturenofocus>
                    <
textureradiofocus>radiobutton-focus-2.png</textureradiofocus>
                    <
onclick>Skin.ToggleSetting(Use_Startup_Playlist)</onclick>
                    <
selected>Skin.HasSetting(Use_Startup_Playlist)</selected>
                </
control>
                <
control type="button" id="108">
                    <
description>Startup Playlist Path</description>
                    <
width>950</width>
                    <
textcolor>grey2</textcolor>
                    <
focusedcolor>white</focusedcolor>
                    <
label>15311</label>
                    <
label2>$INFO[Skin.String(Startup_Playlist_Path)]</label2>
                    <
onclick>Skin.SetFile(Startup_Playlist_Path,.m3u,t:\playlists\music\)</onclick>
                    <
texturefocus border="7">list-focus.png</texturefocus>
                    <
texturenofocus>-</texturenofocus>
                    <
enable>Skin.HasSetting(Use_Startup_Playlist)</enable>
                </
control

So now you know how it's done in PMIII HD.

What you need to do is look for a location were you want to create a button in MARK III, copie/paste an existing button in the .xml file and make the changes.
And use <onclick>Playmedia(media)</onclick>
Reply
#17
Thanks a million for taking the time to write a reply. I'm sure i can use it for my little project...!!
Reply
#18
sorry, i somehow lost this thread.

what i was pointing to was actually scripts/autoexec.py.
this script is started no matter which skin you use.

Code:
.... snip....
import xbmc
xbmc.executescript('q:\\scripts\\medusa\\start_medusa.py')
.... snip ...

this is a snip of the template script. you want to do
Code:
xbmc.executebuiltin('playmedia(playlist)')
or
Code:
xbmc.executebuiltin('playercontrol(partymode)')
Reply
#19
I nice solution to this would be:

-Background music starts playing at 40% (set in system settings) volume when XBMC starts up
-Background music fades out / pauses when video / music starts
-Background music resumes / fades in when video / music stops
-Background music will continue to play over pictures / slideshows

This is more of a feature than hacking with playing media Smile I think it deserves to make B3!
Reply
#20
Waffa Wrote:
PHP Code:
                <control type="radiobutton" id="107">
                    <
width>950</width>
                    <
height>35</height>
                    <
font>font12</font>
                    <
label>21398</label>
                    <
textcolor>grey2</textcolor>
                    <
focusedcolor>white</focusedcolor>
                    <
texturefocus border="7">list-focus.png</texturefocus>
                    <
texturenofocus>-</texturenofocus>
                    <
textureradiofocus>radiobutton-focus-2.png</textureradiofocus>
                    <
onclick>Skin.ToggleSetting(Use_Startup_Playlist)</onclick>
                    <
selected>Skin.HasSetting(Use_Startup_Playlist)</selected>
                </
control>
                <
control type="button" id="108">
                    <
description>Startup Playlist Path</description>
                    <
width>950</width>
                    <
textcolor>grey2</textcolor>
                    <
focusedcolor>white</focusedcolor>
                    <
label>15311</label>
                    <
label2>$INFO[Skin.String(Startup_Playlist_Path)]</label2>
                    <
onclick>Skin.SetFile(Startup_Playlist_Path,.m3u,t:\playlists\music\)</onclick>
                    <
texturefocus border="7">list-focus.png</texturefocus>
                    <
texturenofocus>-</texturenofocus>
                    <
enable>Skin.HasSetting(Use_Startup_Playlist)</enable>
                </
control

I've looked at transferring this functionality over to MC360 before, but there's another part that needs transferring too and I never worked it out.

This is in the PM3 PAL\Startup.xml:
PHP Code:
        <control type="button" id="10">
            <
description>trigger</description>
            <
onfocus>ReplaceWindow(Home)</onfocus>
            <
texturenofocus>-</texturenofocus>
            <
texturefocus>-</texturefocus>
            <
animation effect="fade" start="0" end="0">Focus</animation>
            <
visible>!Skin.HasSetting(Use_Startup_Playlist)</visible>
        </
control>
        <
control type="button" id="10">
            <
description>trigger with startup Playlist</description>
            <
onfocus>XBMC.PlayMedia($INFO[Skin.String(Startup_Playlist_Path)])</onfocus>
            <
onfocus>ReplaceWindow(Home)</onfocus>
            <
texturenofocus>-</texturenofocus>
            <
texturefocus>-</texturefocus>
            <
animation effect="fade" start="0" end="0">Focus</animation>
            <
visible>Skin.HasSetting(Use_Startup_Playlist)</visible>
        </
control

I've given it a real decent attempt but never got anywhere. I'm guessing the MC360 Startup.xml is structured and thus read differently to PM3.
Reply
#21
This should really be a feature in the GUI because someone may want to change the background music on the fly instead of going into windows just to alter lines in the .xml file.
Reply
#22
It's a GUI feature in PM3 (HD).
In other skins the skinners didn't implement it.

And that's why you have to alter lines in the .xml file.
Reply
#23
the only thing you can do in the gui in pm3 hd is have a playlist start at startup. It doesnt take into affect when you resume from suspend but only at startup. That is the issue.
Reply
#24
This option is also available in PMIII under Skin settings.

But I for one do not understand why this should be skin specific, rather than part of the normal settings.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#25
because its silly to do code for it when it can be done in xml
Reply
#26
spiff Wrote:because its silly to do code for it when it can be done in xml

would someone be willing to work with me in creating a XML file?

its kinda off my skills....

i simply want to listen to a background ambient music

while surfing XBMC....

when a movie plays, music stops,

when the movie ends, music starts again,,,


thanks!!
Reply

Logout Mark Read Team Forum Stats Members Help
Can I add background music to XBMC?0