Put links to video files in web pages - want option 'Open with' when the viewer clicks on the links.

If I go to a video file that is stored in my computer, for example xyz.mp4 and right click on it, one of the options is 'Open with' and several options for example QuickTime player, RealPlayer are presented for me to choose. But when I add the file to a web page and create a link to it for example http://sillyvideos.com/xyz.mp4 and then I right click on this link (on the web page) in my Firefox browser, I don't get the option 'open with '. My question is: is it possible to put a link to a video in a web page, so I or other viewers can click right on it and benefit from the option 'open with' (so we can choose the drive to open it, without having to download first in our computers)?

Normally what happens, is that the server sends the content with one or more headers that dictate what Firefox did with the video.

For example, if the content is sent with a header that Firefox can play internally, then Firefox can open the video in a tab and use a built-in player. You can see with MP3s when the server says that it is "audio/mpeg" content. However, if the server sends a content type that a capable of handling plugin, Firefox can attempt this plugin.

Normally Firefox will assume that the content is meant to be displayed in the browser, unless it is an unknown type or has a content-disposition header set to "attachment". In these cases, Firefox usually has open/save/Cancel dialog box.

I don't know what kinds of choices you want to offer visitors to your site, but if you thought giving them a choice of the players external , sending to content-disposition: attachment to make appear the probably the most logical open/save/Cancel dialog box. With smaller files such as JPEG and PDF, I did it with a script on the server side (for example, a PHP script). I don't know if the script would work with multimedia files.

If you want to provide more choices, you might need the buttons or links in the page.

This example applies to a PDF file, but the same idea applies to the image files and it can work with files more mainstream media. (In this case, you change the script to specify the correct content type.)

Implementation of the PHP approach, you follow these steps. This assumes that your server supports PHP (most do so) and that your Web host allows you to download PHP files.

(1) save the following as getpdf.php file

http://www.jeffersonscher.com/RES/getpdf.php.txt

(2) using a FTP software or your server download function, copy getpdf.php into the same folder as your PDF file

(3) test with your link. In the address bar, or in an e-mail, insert the following text before the name of the PDF file:

getpdf.php?f=

Thus, for example, this direct link to the PDF:

http://www.jeffersonscher.com/RES/Mixed_Content_Blocking.PDF

would become this link to the PHP file:

http://www.jeffersonscher.com/RES/getpdf.php? f =Mixed_Content_Blocking.pdf

Tags: Firefox

Similar Questions

Maybe you are looking for

  • Why are my download speeds so slow with flag and windows 7. My dell inspiron becomes 10-13 mb

    Pavilion dm1 REF ly133av [Redacted] SN Windows 7 operating system This Pavilion is brand new and only get like . 2 Mbps of speedtest.net. The download speed is normal, but the dwnload speed is terrible. Now, I still have my old computer sitting here

  • How to stop the pop up message: do you want to add the _ directory to your search path?

    After you install LabVIEW 8.6.1f1 on a new PC, every time I choose one of my screws via her select a VI... palette, I get a pop up message saying: ' you want to add the "P:\CWalker\COREYs LabVIEW subs projects\Phoenix" directory to your search path?

  • Try World of Warcraft to play on my laptop Windows 7 64 bit.

    I recently updated my laptop to Windows 7 64 bit window Vista and now my world of warcraft will not play due to this error.But I get a "" unable to find a suitable display device. "" Now leaving the program. »I went on HP website and downloaded the d

  • Desktop HP pavilion 500

    I have a HP pavilion desktop computer will turn off randomly and the light flashes when I cut the power or hold the button down it will reboot after but if I wait not long before restarting it used to stay on long. Is this a power supply problem? Wha

  • BlackBerry smartphone App exposed - plugin Eclipse

    Hello I'm new to BlackBerry app development and develop an application using the Eclipse plugin, BlackBerry and I have a question about the presentation of the app. I don't know how to combine the presentation files. Right now in the results file, I