Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Safari doesn't display an object with MIME type video/mp4

So, I've got a little hiccup here. I put together a CV in html with samples you can click to bring up. Now, I don't make any claims to professional geekdom, but I try to be fairly html savvy, and since I'm sending this to the college IT guys, I want to do it right. So I'd like this thing to use valid w3c compliant html. Not too tough, fix some missing quotes and learn how to use the object tag instead of embed. Done.

Well, here's the problem. I loaded it into Safari for testing, and a Quicktime file won't play. Now, it runs fine on Firefox. The obtuse and awkwardly lumped in IE version of the object works fine (tested in IE6, Win2K virtual machine). And the same file ran fine when I had it using an embed tag. Now it just brings up the Quicktime emblem, takes up the specified amount of space, and doesn't do anything.

What did I do wrong? I've got the latest Quicktime and Safari, and I know it's standards compliant. Do I have to feed it some more specific type for an h.264 encoded mp4?

Here's the code I used. The embed tag is the one that works, the object tag is the compliant one that doesn't. I'm guessing I'm missing a parameter or something. Any advice?

<embed scale="1" src="files/Sabres.mp4" pluginspage="http://www.apple.com/quicktime/download/" autoplay="FALSE" volume="100" cache="TRUE" height="496" width="640">



<object type="video/mp4" data="files/Sabres.mp4" height="496" width="640">
<param name="controller" value="true">
<param name="autoplay" value="false">
Your browser cannot display this content. Click here to download it.
</object>

Mac Pro 2.66 GHz quad, Mac OS X (10.4.11), Bootcamped, 2 gb extra RAM, 1.1 tb storage

Posted on Apr 10, 2008 11:38 PM

Reply
6 replies

Apr 11, 2008 8:56 AM in response to The Spine

Tom and Kirk, thanks for your time. That would work, but since <embed> is a non-standard tag, I want to avoid it.

Andy, I actually stopped by that site last night, and I did use it for the object code.

My problem is that for some reason, what looks like a legitimate implementation of <object> isn't displaying in Safari. I know Firefox is a bit more forgiving of sloppy code, so I don't blame Safari for that one. I know Safari can display the file because it displayed it properly when I called it with embed. I'm just not sure what's wrong with the code that's making Safari not bring up the video. It knows it's Quicktime and loads the file, I know that, because it brings up the emblem and starts hoarding RAM when I bring it up in Safari, but it just holds there. I've tried a couple MIME types, including video/quicktime and video/mp4, both worked in Firefox, and video/h264 just as a shot in the dark, and both Safari and Firefox showed the alternate content.

By the way, here's the full code I used to display the object, using Castro's cloaking technique for IE compatibility. I omitted it earlier because when I isolated the non-IE section alone in the body of the document it behaved the same as it did with the cloaking (working in FF, broken in Safari).

<!--[if IE]>
<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="496" width="640">
<param name="src" value="files/Sabres.mp4" >
<param name="controller" value="true">
<param name="autoplay" value="false">
</object>
<![endif]-->

<!--[if !IE]> <!-->
<object type="video/mp4" data="files/Sabres.mp4" height="496" width="640">
<param name="controller" value="true">
<param name="autoplay" value="false">
Your browser cannot display this content. Click here to download it.
</object>
<!--<![endif]-->

Message was edited by: The Spine

Apr 11, 2008 1:40 PM in response to The Spine

So cool a solution. I figured this one out with a bit of poking around. Turns out Safari picks up the source in a different way than FF (in a param, not the object tag itself) the same way you have to do with an application/x-shockwave-flash object. By pure chance I happened to try that second and it kicked in. So, thanks to everyone for your advice. In case anyone else runs across this thread with the same issue, here's a copy of the fixed code, with the added line in bold.


<!--[if IE]>
<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="496" width="640">
<param name="src" value="files/Sabres.mp4" >
<param name="controller" value="true">
<param name="autoplay" value="false">
</object>
<![endif]-->
<!--[if !IE]> <!-->
<object type="video/mp4" data="files/Sabres.mp4" height="496" width="640">
<param name="src" value="files/Sabres.mp4">
<param name="controller" value="true">
<param name="autoplay" value="false">
Your browser cannot display this content. Click here to download it.
</object>
<!--<![endif]-->

Safari doesn't display an object with MIME type video/mp4

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.