Search code examples
javascripthtmlquicktime

How can I make custom UI controls for the QuickTime Player?


How can I make custom UI controls for the QuickTime Player in HTML pages? (like Apple does on its site)


Solution

  • You need to use the QuickTime JavaScript API.

    Make sure to check the section "Controlling QuickTime Using JavaScript", for some code examples.

    You would be able to do the following:

    <div>
        <script language="javascript" type="text/javascript">
           QT_WriteOBJECT('MyMovie.mov', '180','160', '',
           'obj#id', 'movie1', 'emb#name', 'movie1', 'enablejavascript', 'true');
        </script>
    </div>
    
    <p>Play and Stop Movie: <br>
        <a href="javascript:document.movie1.Play();">Play Movie</a><br>
        <a href="javascript:document.movie1.Stop();">Stop Movie</a><br>
    </p>