views:

21

answers:

1

I have been reading the JavaScript Scripting Guide for Quicktime and in there it gives you an example on how to play a video using a javascript command. Unfortunately whenever I try, I am given the error document.Camera_0.Play() is not a function in firebug.

My code is as follows:

        QT_WriteOBJECT_XHTML(
            'video_placeholder.jpg',
            '200', // 4:3
            '150',
            '',
            'enablejavascript', 'true',
            'obj#id', 'Camera_0',
            'emb#name', 'Camera_0',
            'href', 'http://userwww.sfsu.edu/~infoarts/technical/howto/sound/test.mov',
            'controller', 'false',
            'target', 'myself'
        );

and

    $(".camera_live_clickable").click(function() {
        document.Camera_0.Play();
    });

document.Camera_0 is a valid object according to FireBug.

A: 

I got this to work by adding a placeholder movie and changing the href and target params to a qtsrc param with autoplay off:

        var qtEmbed = QT_GenerateOBJECTText_XHTML(
            'video_placeholder.mov', //'video_placeholder.jpg',
            '200', // 4:3
            '150',
            '',
            'enablejavascript', 'true',
            'obj#id', 'Camera_0',
            'emb#name', 'Camera_0',
            'controller', 'false',
            'qtsrc', 'rtsp://quicktime.tc.columbia.edu:554/users/lrf10/movies/sixties.mov',
            'autoplay', 'false'
        )
Nat Ryall