PDA

View Full Version : Making QuickTime work


racket
11-08-2009, 06:27 AM
Hold on tight.
Put code on my page so that when link is clicked, QT opens in a box in the middle of the screen and plays a movie (mpg). Once I had done that DW (cs3) piped in and said that due to changes made in IE my code may not work in IE. I agreed to let dreamweaver write code to make it browser friendly in this regard. Vid played in FF, IE and NS 9 on my PC.
So far so good.
Put the files on the web. Would not play in any browser. Tech guy from my host, took out the DW contribution and it now works on all browsers on the web. As soon as DW saw the code without it's contribution it asked me again and this time I said no.

Ok, in 2006 IE made changes that had devs writing separate js files to get around the changes.
http://developer.apple.com/internet/ieembedprep.html
I believe this is what DW was doing. But in 2008 IE apparently changed things ("back?") again so we no longer need that code.

My question:
As I said taking the code out made it work. But what about people looking at the video with a 2006 IE browser. Surely the code needed ("IF ie vers 6" or whatever) to make that browser work could be done in such a way so that any IE browser outside of that one will ignore the workaround. [Apparently without the workaround users have to click through a couple of boxes before the vid will play]

The code that works:
<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="256" width="320">

<param name="src" value="http://69.89.31.240/~chrysal7/test01/video_files/Business-Prestns-MPG.mpg">
<param name="autoplay" value="false">
<param name="type" value="video/quicktime" height="260" width="340">

<embed src="http://69.89.31.240/~chrysal7/test01/video_files/Business-Prestns-MPG.mpg" height="260" width="340" autoplay="false" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/"></embed>

</object>


The code that DW adds if you say yes (in bold) making it not work in any browser:

<script type="text/javascript">
AC_AX_RunContent( 'classid','clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B','codebase','http://www.apple.com/qtactivex/qtplugin.cab','height','256','width','320','src',' http://69.89.31.240/~chrysal7/test01/video_files/Business-Prestns-MPG.mpg','autoplay','false','type','video/quicktime','pluginspage','http://www.apple.com/quicktime/download/' ); //end AC code
</script><noscript><object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="256" width="320">

<param name="src" value="http://69.89.31.240/~chrysal7/test01/video_files/Business-Prestns-MPG.mpg">
<param name="autoplay" value="false">
<param name="type" value="video/quicktime" height="260" width="340">
<embed src="http://69.89.31.240/~chrysal7/test01/video_files/Business-Prestns-MPG.mpg" height="260" width="340" autoplay="false" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/"></embed>

</object></noscript>


Any takers..?
[Would also like to know if the movie plays in Safari on a Mac?
http://69.89.31.240/~chrysal7/test01/html/video/video_3.htm (http://69.89.31.240/%7Echrysal7/test01/html/video/video_3.htm) ]

domedia
11-08-2009, 03:57 PM
The 2006 issue was that IE wanted you to 'click to active' an object. To get around this we started having JS write the code out instead. In addition to the code above you also need to reference a JS file in the HEAD area of your code.

but.. what do you need takers for? 8)

racket
11-09-2009, 01:03 AM
Takers? To take on the challenge...
Anyone who can give me details as to what can be added to my working code to cater to those who still have the affected browser, but that will not stop the movie from playing in other browsers.

I just discovered a folder called Scripts obviously created by DW containing two files: AC_ActiveX.js and AC_RunActiveContent.js
No doubt I was supposed to put these on the server to be called up by that additional code but I would not have thought the absence of these would cause the movie to no longer play on other browsers.

Even though the extra code has been removed I just found the reference(s) you spoke of still in the HEAD area:-
<script src="../../Scripts/AC_ActiveX.js" type="text/javascript"></script>
<script src="../../Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
Input is appreciated.

racket
11-09-2009, 01:28 AM
Hold the phone!
I just put those two files on the server,
with the code (in bold) on the web page that DW added,
with the file references in the HEAD and it plays on all browsers.
( I find it weird that the absence of the extra files makes it not play on all browsers when their presence is only to affect a workaround for one older browser...
Just not a code person. )

Very interested to know if there is a browser that it does not play on...
http://69.89.31.240/~chrysal7/test01/html/video/video_3.htm (http://69.89.31.240/%7Echrysal7/test01/html/video/video_3.htm)

2006 IE ?
Safari?
Thanks anyone..

gentleone
11-09-2009, 08:22 AM
Mac 10.5.8.
Safari Version 4.0.3: works like a charm
Firefox Version 3.0.14: works like a charm

racket
11-09-2009, 01:03 PM
thx g one : O )

domedia
11-09-2009, 03:35 PM
( I find it weird that the absence of the extra files makes it not play on all browsers when their presence is only to affect a workaround for one older browser...
No, they're there to make sure it works in all modern browsers. It's the core of the video embed script.

racket
11-09-2009, 08:45 PM
You may have missed it..
The code I had above, "the code that worked" made it work in all modern browsers.

The extra code in bold plus some code in the HEAD to call up two specialy created jscript files (AC_ActiveX.js and AC_RunActiveContent.js) are only there so that those who still have IE 2006 don't have to click things to get the movie to play.

The "code that worked" had all browsers working.

Add the code in bold plus the bit in the HEAD
plus the two files to the server and we make the user experience a bit more convenient for IE 2006 users.

Adding the bold stuff but omitting to put those two files on the server meant that the "code that worked" was now prevented from working, on any browser. That it was I found weird.

I would have saved a lot of time had I not been concerned about folks who might not have updated their IE browser.
Thanks to all.

domedia
11-09-2009, 08:56 PM
No I saw what you wrote :) I remember when IE rolled out their update and we all freaked out because of the way our Flash content was acting in the browser.

Nowadays it's considered good practice to dynamically write the object/embed codes. I'm sure someone smarter than me can explain it. This is why swfobject and most other modern scripts you see today basically only need a unique ID on the page and then they let JS write the rest.
NOSCRIPT applies to people without Javascript enabled, and is not shown to people with Javascript enabled, so that explains a little what you've been experiencing before you called the two js files from the HEAD area of your website.