xboxscene.org forums

Author Topic: Playing Video On Start Up  (Read 83 times)

JoKu

  • Archived User
  • Newbie
  • *
  • Posts: 7
Playing Video On Start Up
« on: May 06, 2005, 11:05:00 PM »

Alrighty so i'm kinda done with that whole music on startup jive. now i want whole video. With simple editing i was able to do it using the script "StartupMP3" here is the example:


import xbmc

# By alx5962
# version 1.0

file = 'q:\\scripts\\StartUpMP3\\startupvid.avi'
xbmc.Player().play(file)

Now that plays the specified video in that folder, but the problem is that once XBMC starts it really does play, but it plays in full screen. Now for the life of me i can't figure out how to get it to play in the little box on the main menu as if i had already pressed "X" when it was playing.

Using this same script to Startup an MP3 reacts the opposite. Once XBMC starts it plays in the active main menu window.

So what i'm asking is, what is that extra line of code i need? What can i add to make it play in the Project Mayhem 3 main menu window on startup?

This post has been edited by JoKu: May 7 2005, 06:05 AM
Logged

Tj78492

  • Archived User
  • Newbie
  • *
  • Posts: 3
Playing Video On Start Up
« Reply #1 on: May 11, 2005, 07:21:00 PM »

CODE
file = 'q:\\albums\\playlists\\startup.m3u'
pls = xbmc.PlayList(2)
pls.load(file)
pls.shuffle()
xbmc.Player().play(pls)
xbmc.executebuiltin('XBMC.ActivateWindow(0)')


works great for me
Logged

Tj78492

  • Archived User
  • Newbie
  • *
  • Posts: 3
Playing Video On Start Up
« Reply #2 on: May 11, 2005, 07:22:00 PM »

CODE
xbmc.executebuiltin('XBMC.ActivateWindow(0)')


thats the line of code you have to add to modify your script though
just set it to change windows to the main one  ;)

the one i posted at first is good though, becuase you can have a random video play from a playlist you name startup.  It works with networked videos too but it takes a little longer to start up so i would recommend putting anything you want to play on startup on the xbox

This post has been edited by Tj78492: May 12 2005, 02:25 AM
Logged

JoKu

  • Archived User
  • Newbie
  • *
  • Posts: 7
Playing Video On Start Up
« Reply #3 on: May 12, 2005, 05:22:00 PM »

Thank you very much, i appreciate your help.


Logged

JoKu

  • Archived User
  • Newbie
  • *
  • Posts: 7
Playing Video On Start Up
« Reply #4 on: May 13, 2005, 06:01:00 PM »

Using both codes make my XBMC freeze on startup.

In the code provided do i have to change that zero to some other number?

CODE
xbmc.executebuiltin('XBMC.ActivateWindow(0)')




Thank you for your time.
Logged

Golf-Onkel

  • Archived User
  • Newbie
  • *
  • Posts: 1
Playing Video On Start Up
« Reply #5 on: May 29, 2005, 01:29:00 PM »

I got the same problem now.
Sometimes it is working, sometimes not.

A solution could be to wait 1 or 2 seconds after the start and then execute the script.

Is there any code for this?
Logged

AbuseTheElderly

  • Archived User
  • Newbie
  • *
  • Posts: 25
Playing Video On Start Up
« Reply #6 on: May 29, 2005, 09:45:00 PM »

Great ive been looking for this too.  Only i wanted it to play a random video in a certain directory.  Is there any code for this?  Thanks for your help.
Logged