How to disable html5/audio tag

1,177 views
Skip to first unread message

Andrew C

unread,
Feb 17, 2010, 5:04:58 PM2/17/10
to jPlayer: the CSS styleable jQuery audio player plugin
I was having issues with multiple file request on setFile when using
the html5/audio tag. I thought I could force the use of Flash by
modifying the var configForAudioFormat like so:

//html5: Boolean((config.oggSupport) ? ((config.canPlayOGG) ? true :
config.canPlayMP3) : config.canPlayMP3)
html5: false

However, this doesn't work. The page loads fine, and there are no JS
errors and the pause button is hides. However, the setFile function
never fires.

What is the easiest way to force the player to use Flash and not html5/
audio?

Thanks!

Andrew C

unread,
Feb 17, 2010, 5:08:33 PM2/17/10
to jPlayer: the CSS styleable jQuery audio player plugin
sorry I meant the variable: configForHtmlAudio

is there no post edit in Google Groups?

Mark P

unread,
Feb 17, 2010, 5:38:04 PM2/17/10
to jPlayer: the CSS styleable jQuery audio player plugin
Hello Andrew,

Forcing the html5 variable to false should cause Flash to always be
used. It basically forces all the logic further down to use the Flash
version, ie., It adds the Flash to the page and registers the Flash
version of jQuery events.

Is this the only edit that you made to jquery.jplayer.js 0.2.5 ?

Do you have an online version we can review?

Google groups is more akin to a mailing group, so once you hit send,
the mails are sent out. Hence no edit button. It has caught me out a
few times myself too ;)

Best regards,
Mark P.

Andrew C

unread,
Feb 17, 2010, 5:47:02 PM2/17/10
to jPlayer: the CSS styleable jQuery audio player plugin
Thanks for the reply, Mark.

I'll get a test page up in a bit.

Another clue: the Flash player works fine in non-HTML5 browsers.
However, when HTML5 is present it doesn't.

My guess is that it has something to do with the audio tag prepended
on line 62, which is then removed in eventsForHtmlAudio, but not in
eventsForFlash.

We shall see.

Andrew C

unread,
Feb 17, 2010, 6:39:14 PM2/17/10
to jPlayer: the CSS styleable jQuery audio player plugin
I think I've got it sorted, but I'm ashamed to admit the fix...

I upgraded jPlayer versions, but my Jplayer.swf was cached. Doh!

Thanks for being so helpful Mark; you rule!

Mark P

unread,
Feb 17, 2010, 7:33:01 PM2/17/10
to jPlayer: the CSS styleable jQuery audio player plugin
SWF caching is a pain sometimes. Sometimes you have to restart the
browser to solve it.

Good luck with your project,
Mark P

Reply all
Reply to author
Forward
0 new messages