views:

918

answers:

2

I have two quicktime movie files embedded in one web page. I have set autoplay="false" to prevent them both from playing at the same time, but they still load at the same time. Can I prevent them from loading until the user clicks the play button?

autohref="false" is supposed to do this but it does not seem to work.

Apple's documentation for the EMBED element

A: 

It depends on how you embed the QuickTime movies. But it should respect the autoplay flag. Just putting it in tagswill work, but I think it's not the correct way to do it. Have you done it like the code below?

<object width="160" height="144"
classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
codebase="http://www.apple.com/qtactivex/qtplugin.cab"&gt;
<param name="src" value="sample.mov">
<param name="autoplay" value="false">
<param name="controller" value="false">
<embed src="sample.mov" width="160" height="144"
autoplay="false" controller="false"
pluginspage="http://www.apple.com/quicktime/download/"&gt;
</embed>
</object>

Update

Or do you mean the movies do not play on page load, but both start playing when the user interacts with one of them? If the latter is the case it would probably be better to set a placeholder image which a user can click and then load the appropriate content, instead of loading both applets at the same time. Doing it like this takes less resources, because the end user machine would only have to load the QuickTime plugin once a user has activated a particular movie.

mensch
It is respecting the autoplay flag but not the autohref flag.
Liam
Your code above has 2 conflicting values for autoplay.
Liam
You're right, I've updated it. Is autohref also present and set two times in your object code?
mensch
+1  A: 

[BEGIN EDIT - 2010/03/30]

The problem here, I think, is that there is no control to modify buffering behavior. The AutoHREF parameter refers to preloading the value of an href parameter (or perhaps an HREF embedded in the video itself?), not to buffering the video.

I'm currently using a modification of this technique on some pages and Javascript with Modernizr to dynamically insert different video embeds depending on browser support.

I transcode my video to ogg/theora/vorbis like this with VLC (on a Mac; it's very similar for *nix) with 1024kbps bitrate for video and 128kbps bitrate for audio:

/Applications/VLC.app/Contents/MacOS/VLC \
  --rc-fake-tty -I dummy \
  ${original_video} \
  ':sout=#transcode{vcodec=theora,vb=1024,acodec=vorbis,ab=128,audio-sync}:standard{mux=ogg,dst=${ogg_file},access=file}' vlc://quit

And to transcode to MP4/H.264/AAC (same bitrates) (assuming VLC supports M4A/AAC audio):

/Applications/VLC.app/Contents/MacOS/VLC \
  --rc-fake-tty -I dummy \
  ${original_video} \
  ':sout=#transcode{vcodec=mp4v,vb=1024,acodec=mp4a,ab=128}:standard{mux=mp4,dst=${m4v_file},access=file}:sout-transcode-soverlay=0' vlc://quit

(Using the original, high-quality video would be best, but this should work for any format VLC can decode.)

Just for giggles, I also use the HTML5 audio element, when available, and here's how I transcode an mp3 to ogg/vorbis (using lame and vorbis-tools) at 128kbps (VBR) and high quality:

lame --decode ${mp3_file} - \
  | oggenc -r -b 128 -q 9 -o ${ogg_file} -

And mp3 to m4a/AAC (using lame and faac):

lame --decode ${mp3_file} - \
  | faac -w -s -o ${m4a_file} -

(Of course using the original raw PCM/WAV would be better.)

(IANAL, but:) It's important to note that both H.264 and AAC are under patent (and licensing is exorbitant). There are some fears that Theora may be subject to so-called submarine patents, but it and Vorbis appear to be unencumbered currently.

[END EDIT]

Did you find an answer to this? I'm seeing the same behavior. (I've been assuming that parameter/attribute names are not case-sensitive, as even the Apple docs inconsistently use various case schemes.)

In case there's any confusion, I think what the original questioner (and I) wants is for the Quicktime movie not to be downloaded at all until the user clicks the "play" button. I have several videos on the same page, and it's unlikely that the user will watch them all; I don't want them downloaded until they're explicitly requested. The "autohref" parameter is supposed to ensure this behavior when set to "false", but at least in Firefox 3.6 with Quicktime plugin 7.6.3 on Mac OS 10.6.2, it doesn't appear to work.

<object
    classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
    codebase="http://www.apple.com/qtactivex/qtplugin.cab"
    width="332"
    height="184"
    id="video-0"
>
    <param name="src"                    value="video/sony-ps3.mov" />
    <param name="AllowEmbedTagOverrides" value="True" />
    <param name="AutoPlay"               value="False" />
    <param name="AllowEmbedTagOverrides" value="True" />
    <param name="AutoPlay"               value="False" />
    <param name="AutoHREF"               value="False" />
    <param name="EnableHREF"             value="False" />
    <param name="EnableJavascript"       value="True" />
    <param name="ShowLogo"               value="False" />
    <param name="Volume"                 value="60" />
    <param name="wmode"                  value="transparent" />

    <embed
        width="332"
        height="184"
        src="video/sony-ps3.mov"
        type="video/quicktime"
        pluginspage="www.apple.com/quicktime/download"
        name="video-0"
        AllowEmbedTagOverrides="True"
        AutoPlay="False"
        AutoHREF="False"
        EnableHREF="False"
        EnableJavaScript="True"
        ShowLogo="False"
        Volume="60"
        wmode="transparent"
    ></embed>
</object>
Dean Hall
I found no answer to this yet, and your problem is the same as mine.
Liam