HTTP streaming and seekTime with Player
#1
Hi,

I'm trying to develop a xbmc player for http streaming. To do this, the player download the file until x percent (a cache size), then play the movie.

My player is inherited from "xbmc.Player" class and works well for the moment. Now I would like to seek at any position. Si, I override the "onPlayBackSeek"method and do some stuff :

Code:
If we have downloaded enough to seek at the new position          
                We seek at the position with the inherited method.
          Else
                Depends on the host :
                    -If we can use 'Accept-Range' in the http header, use it to download at the expected position (We stop the current download and start a new download from the expected position, and start to play the video when the cache size is downloaded)
                    -else if we can add parameter in the http request, use it to download at the expected position (We stop the current download and start a new download from the expected position, and start to play the video when the cache size is downloaded)
                    -else we wait until we have download enough to seek at the new position. (Long solution)

All of this case works for seeking. But for the first and the second solution, I start a new movie at the position 0, so I can't go to a previous position. Confused

I would like to have all the time bar in the player and have the cursor at the expected position. Do you have any solution to seek at a position for a streaming via http ? And some code examples ?

Thanks a lot.
Reply

Logout Mark Read Team Forum Stats Members Help
HTTP streaming and seekTime with Player0