PDA

View Full Version : Dynamically load a HTML 5 Widget or Flash Widget Depending on the Client Browser



netfrets
12-09-2011, 12:05 PM
I have designed a Web Site whos layout behaves very well on PC, IPAD and mobile devices. I have one issue that I am hoping someone can help me with.

I want to use a Flash player widget to deliver my music from soundcloud for all desktops; however, when I detect an IPAD, IPOD, or Mobile Device I want to load an HTML 5 player. I can currently detect an IPAD.... with some Java Script and redirect to a new page, but rather than create a new page I would like to detect the client and then load the correct player. As the layout of the page will support either player.

Can this be done from the client side, If so How.

Thanks

James

Bob Barr
12-09-2011, 12:22 PM
Not having gotten too much into mobile yet, I have to ask: Is there some particular advantage to using the Flash player for desktops? If not, couldn't you use the HTML 5 player regardless of the platform?

netfrets
12-09-2011, 06:23 PM
HTML 5 at this time and this is my experience which is limited does not act well in IE and earlier browsers also have trouble. Flash on the other hand has been around since ~ 1996 and is pretty well supported at the desktop level. IPADs respond well to HTML5. So thats how I would like to approach it if possible.