I have an offline HTML page that contains a link to a MP4
video, I would like that when I load this link, I would open the Media Player or other software that I have installed and predefined on my computer to play the video, ?
I have an offline HTML page that contains a link to a MP4
video, I would like that when I load this link, I would open the Media Player or other software that I have installed and predefined on my computer to play the video, ?
You need to use file:///
(yes, it's three bars), if you want to connect to local files.
<a href="file:///C:\Programas\meu_arquivo.mw"> Link 1 </a>
<a href="file:///C:\Videos\meuo_utro_arquivo.mp4"> Link 2 </a>
Links will not open files in your local applications automatically.
This happens for security reasons. If it is opened, it will only open in the browser. If your browser can display the file, it will. If the browser fails, it will probably ask if you want to download it. Some browsers, like modern versions of Chrome, may even refuse to switch from the http protocol to the file protocol.
Files will continue to open in your browser, and that's good!
Your browser will respond to these files the same way it will respond to files anywhere on the internet. These files will not open in your default application (for example, Word, WMP or other browser), and you will not do anything like ask Windows Explorer to open the location of the file.
It's one of the most important things about safe web browsing.
Sites in your browser can not interact with your system very well. If your site could tell you my_video.mp4 open in wmplayer.exe, a malicious website too could tell to open virus.bat in cmd.exe. Or you can simply tell your PC to run some uninstall.exe files, or to open file explorer a million times.
Maybe this is not convenient for you, but HTML and browser security were not really designed for what you're trying to do. If you really want to do this process, consider writing a desktop application.
I hope to have clarified, good luck.