Question

in html:

<EMBED SRC="movies/test.mov" WIDTH="100%" HEIGHT="100%" AUTOPLAY="false" CONTROLLER="false" LOOP="false"PLUGINSPAGE="http://www.apple.com/quicktime/" id="movie1" />

in javascript:

document.getElementById('movie1').Play();

the error:

Uncaught TypeError: Object #<HTMLEmbedElement> has no method 'Play'

Yet it works fine with the same javascript from the JS console, what is going on?

Was it helpful?

Solution

You need to have a space between LOOP and PLUGINSPACE. Othewr than that, I can't find any problems. It may be the way you're calling the JavaScript, or maybe the URL is wrong. It's working here: http://jsfiddle.net/8GYLZ/. I used a sample .mov file from the Apple site, and called it with a button.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top