Detecting HTML5 or Flash

118 views
Skip to first unread message

Scott

unread,
Feb 22, 2012, 2:17:27 PM2/22/12
to MediaElement.js
Is there a way to determine if mediaelement is using flash or html5 to
display the video?

I ask because if my video is played with html5, then the responsive
design works as expected. But if flash is used to play the video the
responsive design fails.

John Dyer

unread,
Feb 22, 2012, 2:31:52 PM2/22/12
to mediael...@googlegroups.com
Scott,
On the homepage of mediaelementjs.com, there is some code that shows which render is being used.

JD
--
John Dyer - http://j.hn/

Scott

unread,
Feb 22, 2012, 4:21:27 PM2/22/12
to MediaElement.js
Hrm, I must be off today because I'm not seeing what I'm looking form.
Care to paste the code which you're referring to?

On Feb 22, 2:31 pm, John Dyer <johnd...@gmail.com> wrote:
> Scott,
> On the homepage of mediaelementjs.com, there is some code that shows which
> render is being used.
>
> JD
>

John Dyer

unread,
Feb 22, 2012, 4:24:05 PM2/22/12
to mediael...@googlegroups.com
Here's the line

$('audio').mediaelementplayer({audioWidth: 380, success: function(me) { $('#audio-type').html( me.pluginType); }});

Upon success, we write the pluginType (which might be native or 'flash') to a <span> tag.

JD

Scott

unread,
Feb 22, 2012, 5:14:33 PM2/22/12
to MediaElement.js
Ah ha! I should of looked at view-source. I interpreting it as you
had sample code already being displayed.

Sorry for bone head mistake.

Thanks for the quick response and answer.

Cheers,
Scott
Reply all
Reply to author
Forward
0 new messages