Quicktime and JS - what am I missing?

Discussion in 'Javascript' started by Binba, Jun 20, 2007.

  1. Binba

    Binba Guest

    I created the simplest embed QT movie page, and for starters, want to
    get the version. An HREF event works fine, but otherwise I get a
    fabulous "Unspecified error".
    I'm using MSIE6 WinXP SP2.

    <html>
    <body>
    <OBJECT
    classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
    codebase="http://www.apple.com/qtactivex/qtplugin.cab"
    width="320" height="256" id="movie1">
    <PARAM name="src" value="test.mov">
    <EMBED HEIGHT=256 WIDTH=320
    SRC="test.mov" TYPE="video/quicktime"
    PLUGINSPAGE="www.apple.com/quicktime/download"
    EnableJavaScript="true" NAME="movie1">
    </OBJECT>

    //works:
    <a href="javascript:alert
    (document.movie1.GetQuickTimeVersion());">version</a>

    //doesn't:
    <script language="JavaScript">
    <!--
    alert (document.movie1.GetQuickTimeVersion());
    // -->
    </script>

    </body>
    </html>

    Am I missing something really basic here?

    Thanks.
    Binba, Jun 20, 2007
    #1
    1. Advertising

  2. Binba

    RobG Guest

    On Jun 20, 12:28 pm, Binba <> wrote:
    > I created the simplest embed QT movie page, and for starters, want to
    > get the version. An HREF event works fine, but otherwise I get a
    > fabulous "Unspecified error".
    > I'm using MSIE6 WinXP SP2.
    >
    > <html>
    > <body>
    > <OBJECT
    > classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
    > codebase="http://www.apple.com/qtactivex/qtplugin.cab"
    > width="320" height="256" id="movie1">
    > <PARAM name="src" value="test.mov">
    > <EMBED HEIGHT=256 WIDTH=320
    > SRC="test.mov" TYPE="video/quicktime"
    > PLUGINSPAGE="www.apple.com/quicktime/download"
    > EnableJavaScript="true" NAME="movie1">
    > </OBJECT>
    >
    > //works:
    > <a href="javascript:alert
    > (document.movie1.GetQuickTimeVersion());">version</a>


    Assuming that movie1 is an object and that GetQuickTimeVersion is
    necessarily a mehthod supported by that object seems a little error
    prone. Try:

    var movie = document.movie1;
    if (movie && tyepof movie.GetQuickTimeVersion == 'function') {
    alert( movie.GetQuickTimeVersion() )
    } else {
    // Either movie1 isn't an element in one of the standard
    collections
    // or it doesn't have a GetQuickTimeVersion method
    }

    That should also check whether the QuickTime plugin is installed. I
    can't test it right now since I don't have (or want) QuickTime on my
    Windows machine. I can test it later on a Mac if you want.

    >
    > //doesn't:
    > <script language="JavaScript">
    > <!--


    The language attribute is deprecated, type is required. There is no
    point to HTML comments inside script elements, just don't use them.

    <script type="text/javscript">


    To be strictly standards compliant you should be using
    type="application/javascript" but it will cause your scripts to fail
    in at least some browsers. Some suggest ignoring validation errors
    and using:

    <script> ... </script>


    --
    Rob
    RobG, Jun 20, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. johnathan  james

    Quicktime and Apache Ant

    johnathan james, Jun 8, 2005, in forum: Java
    Replies:
    0
    Views:
    1,711
    johnathan james
    Jun 8, 2005
  2. Mike
    Replies:
    3
    Views:
    2,942
    oczkowy
    Mar 10, 2008
  3. Ari Brown

    Quicktime and Ruby

    Ari Brown, Jul 10, 2007, in forum: Ruby
    Replies:
    8
    Views:
    128
    hengist podd
    Jul 10, 2007
  4. Axel Etzold
    Replies:
    4
    Views:
    100
  5. cacciatc

    ruby and quicktime??

    cacciatc, Dec 4, 2007, in forum: Ruby
    Replies:
    2
    Views:
    95
    cacciatc
    Dec 5, 2007
Loading...

Share This Page