preload videos before playing it
#1
Hi! I wonder if I can preload videos through python addon.

I have some videos and images to show (like a slideshow). So I created a window that receives a image when it's to show the image and when it's to show the video, I close the window (self.close()) and play the video (self.myplayer.play(item)).

The problem is: the xbmc shows a black screen when the xbmc player change from one video to another. It's possible that in this change the black screen doesn't appear?

thanks
Reply
#2
Create a custom window XML, then toggle an image labels visibility between video's
Image Lunatixz - Kodi / Beta repository
Image PseudoTV - Forum | Website | Youtube | Help?
Reply
#3
Let me show some code..

Code:
screen = xbmcgui.WindowXML('customImage.xml', os.getcwd())

while (not xbmc.abortRequested):
    for slide in slides:
        if slide.type == 1:
            screen.show()
            showImage(slide,  screen)
            continue
        if slide.type == 2:
            screen.close()
            showVideo(slide, player)
            continue

In showImage:
Code:
def showImage(slide, screen):
    screen.setImage(slide.image)
    time.sleep(slide.duration)

Code:
def showVideo(slide, player):
    player.play(slide.video)
    time.sleep(slide.duration)

How can I toggle between images and videos in one custom window xml? Thanks!
Reply

Logout Mark Read Team Forum Stats Members Help
preload videos before playing it0