Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6762743
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:23:37+00:00 2026-05-26T14:23:37+00:00

I’ve got a problem controlling a quicktime movie from javascript. I am embedding a

  • 0

I’ve got a problem controlling a quicktime movie from javascript. I am embedding a video in my HTML page using <video> HTML5 element – with fallback to quicktime if the browser doesn’t support it (e.g. IE 8) (I have a specific requirement of “no flash”, but quicktime is allowed). The video is displayed in a popup; when the popup is being closed, I want to stop video playback. I can do this successfully in HTML5, but the quicktime control is not working.

My html looks like this:

<video width="360" height="298" autobuffer="autobuffer" controls="controls" id="video" tabindex="0">
    <source type="video/mp4; codecs=&quot;avc1.42E01E, mp4a.40.2&quot;" src="/data/mmg-demo.mp4"></source>
    <source type="video/ogg" src="/data/mmg-demo.ogv"></source>
    <object width="360" height="298" id="videoem" codebase="http://www.apple.com/qtactivex/qtplugin.cab" classid="clsid:02bf25d5-8c17-4b23-bc80-d3488abddc6b">
        <param value="/data/mmg-demo.mp4" name="src">
        <param value="false" name="autoplay">
        <param value="true" name="controller">
        <embed width="360" height="298" name="videoem" pluginspage="http://www.apple.com/quicktime/download/" loop="false" controller="true" autoplay="false" src="../files/380/380523/video.mp4">
    </object>
</video>

The pop-up close javascript function looks like this:

function closePopup {
    //stop html5 playback if it's there
    if(typeof document.getElementById('video').pause == 'function') {
        document.getElementById('video').pause();
    }
    //stop playback of quicktime embed if it's there
    if(document.getElementById('videoem')) {
        document.getElementById('videoem').SetRate(0.0);
    }
    $('#demo-video').fadeOut();
}

I’ve tested this exact same quicktime code in firefox – and it works fine. Moreover, examples in other forums that claim to work, do not work in IE 8 (e.g. see http://lists.apple.com/archives/quicktime-api/2008/Mar/msg00187.html – does not work in IE 8).

Line document.getElementById('videoem').SetRate(0.0) causes Object does not support this property or method error.

I’m not sure where else to look. Any help is greatly appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T14:23:38+00:00Added an answer on May 26, 2026 at 2:23 pm

    Ok, I think I figured it out. The trick is to use the ID from the <embed> element and not the <object> element. So the final (working) code I got is this.

    HTML:

    <div id="mkt-video" style="position:fixed;width:360px;background-color:black;padding:10px;border:solid 2px white;display:none;z-index:100003">
        <video id="video" width="360" height="298" controls="controls" autobuffer="autobuffer">
            <source src="/data/mmg-demo.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"' />
            <source src="/data/mmg-demo.ogv" type="video/ogg" />
            <object classid='clsid:02bf25d5-8c17-4b23-bc80-d3488abddc6b' width="360" height="298" codebase='http://www.apple.com/qtactivex/qtplugin.cab' id="videoem-object">
                <param name='src' value="/data/mmg-demo.mp4" />
                <param name='autoplay' value="false" />
                <param name='controller' value="true" />
                <param name="enablejavascript" value="true" />
                <embed src="../files/380/380523/video.mp4" width="360" height="298" autoplay="false" controller="true" loop="false" pluginspage='http://www.apple.com/quicktime/download/' name="videoem" id="videoem"></embed>
            </object>
        </video>
    </div>
    

    And Javascript:

    function closeVideo() {
        if(typeof document.getElementById('video').pause == 'function') {
            document.getElementById('video').pause();
        }
        try {
            document.getElementById('videoem-object').SetRate(0.0);
        }
        catch (err) {}
        $('#mkt-video').fadeOut();
    }
    

    The “try-catch” is required, because IE9 still creates the embed object but of some strange type and throws errors of some strange content. Anyway, it works fine now.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently running into a problem where an element is coming back from
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I'm making a simple page using Google Maps API 3. My first. One marker
i got an object with contents of html markup in it, for example: string
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
Is it possible to replace javascript w/ HTML if JavaScript is not enabled on
I have thousands of HTML files to process using Groovy/Java and I need to
For some reason, after submitting a string like this Jack’s Spindle from a text

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.