Forum Moderators: open

Message Too Old, No Replies

Embedding an MP4 file

         

andrewsmd

6:46 pm on Dec 30, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have movie called test.mp4 that I want to embed in test.html. However when I load the page it just displays the quicktime logo and never plays here is my code.
<html>

<embed src="test.mp4" width="320" height="240"
autoplay="true" controller="true"
pluginspage="http://www.apple.com/quicktime/download/">
</embed>

</html>

test.mp4 is in the same folder as test.html. Any suggestions. Thanks,

Samizdata

7:10 pm on Dec 30, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



First you will probably need to set the MIME-Type on your server. On Apache:

AddType video/mp4v-es .mp4

Then you need to use OBJECT tags as well as EMBED tags to ensure browser compatibility.

...

andrewsmd

7:39 pm on Jan 6, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



How do I do that. I was looking through my php.ini file and I see default_mimetype = "text/html" do I have to add another type?

Samizdata

7:58 pm on Jan 6, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



If you are on an Apache server you use an .htaccess file.

If you don't know what that is, take a look at our Apache forum.

...

dreamcatcher

7:42 am on Jan 7, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Is it internet explorer it fails in? IE doesn`t support the <embed> tags, so you also need <object> tags.

dc

andrewsmd

2:18 pm on Jan 7, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Actually it is in Fireforx but it would need to be IE compatible (because 70% of the population are still idiots) so that is a good piece of info. Anything else.