jonathan topf
jonathan topf

Reputation: 8367

serving video from appengine blobstore behaves differently to static file

I'm having trouble serving video from the app engine blobstore, to a html5 tag, video seems to hang on the last frame preventing the ended trigger being fired which i need to use. I am also unable to seek in the video or force the video to play with right click. If I upload the file as a static file then the file works as expected, triggers are fired and seeking is enabled.

Here's the file served from the blobstore:

http://jsfiddle.net/AvqUy/18/

And the same video served as a static file:

http://jsfiddle.net/AvqUy/19/

I's this a limitation of the blobstore or am i doing somethign wrong?

also heres my code for handling the video files:

class VideoFileHandler(webapp2.RequestHandler):
    def get(self):
        video = db.get(self.request.get('video_id'))
        if video.video_file:
            self.response.headers['Content-Type'] = 'video/mpeg'
            self.response.out.write(video.video_file)
        else:
            self.response.out.write('No video file')

Upvotes: 0

Views: 838

Answers (1)

Stuart Langley
Stuart Langley

Reputation: 7054

You should be using send_blob.

Here's an example I did that illustrates serving using send_blob and from google cloud storage using html audio & video tags..

Upvotes: 1

Related Questions