[Solved] Playing MP4 video on my website?

For everything that's not in any way related to PureBasic. General chat etc...
Dude
Addict
Addict
Posts: 1907
Joined: Mon Feb 16, 2015 2:49 pm

[Solved] Playing MP4 video on my website?

Post by Dude »

[Edit] Solved - just had to embed the video inside the <HTML> tags, so the browser doesn't try to offer it for download.

Hi, wondering if anyone can help with this... I've got some MP4 videos that I made for my website, and I've got a clean install of Windows 7, plus a clean install of Firefox and Chrome, and this is my HTML code to open an MP4 video on a link click:

Code: Select all

<a href="videos/tutorial.mp4" target="_blank">Watch</a>
If I click this link from my local hard drive (where the website is stored offline), the video plays fine in both browser windows (Firefox and Chrome), as expected. Great!

BUT! From the website itself where the HTML page and videos are stored, Firefox throws up a prompt to open or download the video file, and Chrome just downloads the video file; instead of both of them just playing it in the browser like they do from my local offline version. :( Obviously I don't want to ask my visitors to change their browser settings, so how can I get the video to play direct from both browsers from my website?

Note: I don't want to use YouTube or a third-party solution; it all has to be served from my website alone.

Thanks dudes! 8)
Last edited by Dude on Sat Dec 01, 2018 9:49 am, edited 1 time in total.
RASHAD
PureBasic Expert
PureBasic Expert
Posts: 4661
Joined: Sun Apr 12, 2009 6:27 am

Re: Playing MP4 video on my website?

Post by RASHAD »

Hi Dude
Where you been fellow ? :P
Search for MP4 Player and more by JHPJHP
Egypt my love
Post Reply