PDA

View Full Version : onPlayBackEnded() ?


bakman
2005-11-29, 09:59
i am getting stuck on a script which plays videos. these videos are series but they have been cut in 3 pieces, thus i want to play them after each other automagically ;)

the docs describe the onplaybackended method, but i don't understand how to apply in it in my script. i did a search and found a post (http://www.xboxmediaplayer.de/cgi-bin/forums/ikonboard.pl?act=st;f=21;t=6557;hl=onplaybackended ) from darkie which doesn't make it any more clear to me.

currently i add the video parts into a playlist and want to playnext once the video has ended. is there a 'simple' way to apply this feature ?

Asteron
2005-11-29, 17:30
in the same way you extend your custom window class from xbmcgui.window derive a class from xbmc.player. in this new class override the onplaybackended method and use the new class to play your files.

solexalex
2005-11-29, 19:03
thank you asteron, this is usefull to know how this work !

as for your problem bakman, you can simply create a playlist object, then you add those 3 parts to this playlist, and simply play it.
it will play your 3 parts as a single one (just a little pause between each video to fill the cache)

bakman
2005-11-30, 11:00
thanx for your response.

i currently have this code


* * * * * * * *pls = xbmc.playlist(2)
* * * * * * * *pls.clear()
* * * * * * * *
* * * * * * * *for clip in clipdata:
* * * * * * * * * *tmpclip = "mms://str" + str(clip[0]) + ".talpa.tv" + str(clip[1])
* * * * * * * * * *print ("adding: " + tmpclip)
* * * * * * * * * *pls.add(tmpclip)
* *
* * * * * * * *xbmc.player().play(pls)


this, however, does not seem to work ? do i first have to load it or something ?
i am so confused with this stuff.

*edit*

argggg hours of fiddeling around just because of a missing /


tmpclip = "mms://str" + str(clip[0]) + ".talpa.tv/" + str(clip[1])
it works..... thanx !

:kickass: