HTML <video> tag is not working on perl -


i trying play video <video> tag cgi script.

here code

#!/usr/bin/perl use warnings; use strict; use cgi;  $cgi = cgi->new;  print $cgi->header(         -type=> "text/html" );  print <<eof; <video width="320" height="240" controls> <source src="/home/ubuntu_workspace/c/video.mp4" type="video/mp4"> </video>  eof 

when keep file in server can play it.but if keep video file in other directory wont play video instead give error.

after doing research came know should in path server can access directory.so cases /var/www/ path.but should when video files in different paths.i mean able play file whichever path may be.

please suggest me on going wrong.

thanks in advance.

you correct, must inside webserver's root directory. that's because it's not as cgi program playing video, it's you user of website playing it.

the user's browser needs download video while playing it. that's called streaming. in order download it, needs accessible.

where webserver's directory websites depends on web server, operating system , configuration. since seem able run perl script, put video next script file.


Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -