开发者

Safari 5.1 QuickTime object + javascript bug?

I have a QuickTime object and I want to control it via JavaScript. On control I mean Play, Stop, Set volume.

Actually everything went fine, until Safari 5.1 came out. Now I can't operate with my object in any way.

I made a sample html page, where I can demonstrate my problem:

http://seven7.uw.hu/uwother/safari/v.html

Please check the source code of it to understand how it works.

So in this, I have a QuickTime object with a wav inside. Only on Safari 5.1 when I click any of the javascript controlled button I get this error message (Safari developer menu, error console):

TypeError: 'undefined' is not a function (evaluating 'aud.SetVolume(100)')

Or when I just want to play it removing the volume control:

TypeError: 'undefi开发者_开发知识库ned' is not a function (evaluating 'aud.Play()')

I don't know where the problem is, because it works with other browsers (Firefox 5.0, IE7, IE8, IE9, etc) and it also works perfectly with lower version of Safari than 5.1 eg: 5.0.5.

Any suggestion?

(I don't want to use html5 audio tag, so skip it please.)

Thanks!


I've been seeing problems with Safari 5.1 and <embed> tags. MP3 audio files are not loading reliably and Javascript calls to Play() result in a JS error.

The issue is possibly related to running Firefox in 64-bit mode on the client computer. Firefox 5/6 doesn't play well with Quicktime 7.6.6 (default under OS X [10.6.8]), which somehow is affecting Safari 5.1 and Quicktime interactions. In my test, Firefox 5 + Quicktime 7.6.6 couldn't not even play a simple link to an .mp3 file, opened in a new browser window.

Use Get Info... to force Firefox to run in 32-bit mode. Mp3's now play.

In Safari, Empty Cache.... . Then under Reset Safari... select the option: "Remove all website data". Safari now ignores whatever Firefox and Quicktime had cooked up together.

Restart and Safari 5.1 should work.


try putting that code in a try/catch

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜