in reply to Re^5: playing video using vlc plugin
in thread playing video using vlc plugin

By default in Webmin it was downloading the file so as per my requirement i have to play the video file instead of downloading it.For debugging i am using the Mozilla Firefox browser and yeah it does support the vlc-plugin. So i am trying with the vlc-plugin to do that. But i dont know what is going wrong.

Replies are listed 'Best First'.
Re^7: playing video using vlc plugin
by Corion (Patriarch) on Dec 28, 2015 at 12:51 UTC

    Currently you send a Content-Disposition header which tells the browser to download the file instead of playing it back:

    print "Content-Disposition: attachment; filename=\"$name$ext\"\n";

    Maybe removing the header is all you need. Does downloading the file work and produce a file identical to the original?

    Also, I don't find any documentation for your choice of Content-Type: x-vlc-plugin. The only search results with that word are for example this Stackoverflow page, which talks about the client side HTML that is needed to embed the VLC plugin. Maybe using video/mp4 or audio/mp4 as the content type is the correct approach?

    I would try to divide the problem into three parts:

    1. Does the web server with your program send the file correctly?
    2. Does your HTML page play a static file sent from the web server correctly?
    3. If you have both parts above correctly, make your program send the same headers as the web server.
      Yeah downloading it works but the thing is that i cant able to play it.If it permits to you please can you have a look at webmin and install it on your machine. And you can have a look at file manager module after installing it. and webmin uses "frames" may be that's why it cant be able play it.

        No, I won't install webmin. Also, why are you certain that the problem is with webmin? Have you followed step 2 of my two-step program and written a stand-alone HTML page that embeds the plugin and uses a static mp4 file on your webserver? First try to eliminate Perl and webmin from the problem and then add them back one after another.