Posts: 3
Joined: Oct 2006
Reputation:
0
I've been using an old Startup video script that plays videos in the background on xbmc. When I updated to the latest SVN build of XBMC, the script still works, but the videos are not played in the background. I tried using the AutoStartManager script but it is having the same problem. I can still make them play in the background by hitting the 'X' key, but I would like to be able to get the videos to automatically start playing in the background.
The script I use has this line of code for playing the video in the background:
xbmc.executebuiltin('xbmc.activatewindow(home)')
Any suggestions on how I can fix this?
Posts: 2,319
Joined: Sep 2006
Reputation:
309
try replacing home with: 10000
or try:
xbmc.executebuiltin("XBMC.ReplaceWindow("10000")")
Let me know how you go
Posts: 3
Joined: Oct 2006
Reputation:
0
using: xbmc.executebuiltin('xbmc.activatewindow(10000)')
had the same effect, the video did not move to the background.
when i used: xbmc.executebuiltin("XBMC.ReplaceWindow("10000")")
the video did not start at all (or was terminated)
Posts: 3,909
Joined: Dec 2004
Reputation:
20
Nuka1195
Skilled Python Coder
Posts: 3,909
xbmc.executebuiltin( "XBMC.ActivateWindow(0)" )
You can look in the xml files for the window you want to activate.
Posts: 3,909
Joined: Dec 2004
Reputation:
20
Nuka1195
Skilled Python Coder
Posts: 3,909
your problem is the video isn't starting fast enough, you'll need a sleep between the play() and the activatewindow. Just experiment.
Posts: 2,319
Joined: Sep 2006
Reputation:
309
try this:
xbmc.executebuiltin("XBMC.ReplaceWindow("10000")")
time.sleep(0.1)
//YOUR PLAY VIDEO CODE HERE
make sure you import time as well :-D