python - wsgi: video in response does not play -
i have simple wsgi module:
def application(environ, start_response): start_response('200 ok', [('content-type', 'text/html')]) return ["here video: <video controls autoplay><source src='path-to-video/video.mp4' type='video/mp4' /></video>"]
i have video on machine , fine: if open in browser plays. wsgi, not. video there (from inspect elements), except it's black box , not play.
screenshot attached:
what's wrong?
i'm thinking path incorrect.
when opening html file, browser knows open local file. path in html treated local path on computer. guess path should /home/username/myvideo/1.mp4
. broswer finds file , play it.
when using wsgi, sending request server (localhost, assume). in case, path used against server root path (localhost://). browser attempt file on localhost://home/username/myvideo/1.mp4
, will, of course, fail. that's why video won't play.
Comments
Post a Comment