Note that there are some explanatory texts on larger screens.

plurals
  1. POSetURL method of QuickTime object undefined?
    text
    copied!<p>I have a hidden embedded QuickTime object on my page that I'm trying to control via JavaScript, but it's not working. The object looks like this:</p> <pre><code>&lt;object id="myPlayer" data="" type="audio/mpeg" pluginspage="http://www.apple.com/quicktime/download" width="0" height="0"&gt; &lt;param name="autoPlay" value="false" /&gt; &lt;param name="controller" value="false" /&gt; &lt;param name="enablejavascript" value="true" /&gt; &lt;/object&gt; </code></pre> <p>There is nothing in the data parameter because at render time, I don't know the URL that's going to be loaded. I set it like this:</p> <pre><code>var player = document.getElementById("myPlayer"); player.SetURL(url); </code></pre> <p>The audio will later be played back with:</p> <pre><code>player.Play(); </code></pre> <p>Firefox 3.0.3 produces no error in the JavaScript console, but no playback occurs when <code>Play()</code> is called. Safari 3.0.4 produces the following error in the console:</p> <pre><code>"Value undefined (result of expression player.SetURL) is not object." </code></pre> <p>Internet Explorer 7.0.5730.11 gives the following extremely helpful error message:</p> <pre><code>"Unspecified error." </code></pre> <p>I have QuickTime version 7.4 installed on my machine. <a href="http://developer.apple.com/documentation/QuickTime/Conceptual/QTScripting_JavaScript/bQTScripting_JavaScri_Document/chapter_1000_section_5.html" rel="nofollow noreferrer">Apple's documentation</a> says that <code>SetURL()</code> is correct, so why does it not work?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload