Embedded Flash not working in mobile

114 Views Asked by At

I would like to play a song in my website. It works fine for all updated browsers in web, but it didn't work for mobile browsers. Please see below code:

<object type="application/x-shockwave-flash" data="dewplayer.swf" width="200" height="20" id="dewplayer" name="dewplayer">
    <param name="wmode" value="transparent" />
    <param name="movie" value="dewplayer.swf" />
    <param name="flashvars" value="mp3=om_gananadam_thumbi_kaiyyil.mp3&amp;autostart=1" />
</object>

Is there a way to work this on mobile browsers?

2

There are 2 best solutions below

0
On

Mobile devices, by and far, do not support flash. You'll need to look into playing your music via html5 - http://www.w3schools.com/html/html5_audio.asp

0
On

If it truly is just an audio file, convert your flash file to an mp3 and oga format and set it up as an HTML5 audio.

NOTE: You can also include a swf object as a flash fallback in case HTML5 isn't supported

<audio controls>
  <source src="http://source.org/audio.mp3" type='audio/mp3' />
  <source src="http://source.org/audio.oga" type='audio/ogg; codecs=vorbis' />
  <p>Your user agent does not support the HTML5 Audio element.</p>
</audio>