문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top