Solved

How to play a audio file in android 2.2 browser

Posted on 2011-09-09
5
793 Views
Last Modified: 2012-05-12
I have a web application which will be used in the android tablet browser running 2.2.
In this, I would like to play some audio files of any  android supported formats

I have gone through the link below and tried the mp3 file with bit rate 320 kbps. But it is not playing.

http://developer.android.com/guide/appendix/media-formats.html

I tried .wav and avi files, which play on my PC but not in the android browser.

I tried audio and video tags in HTML 5, both are not working.
I read that audio tag is not supported in android 2.2, but the video tag is supported from Android 2.0+. But still it is not working.

Appreciate the Help
Thanks
0
Comment
Question by:shahjagat
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
5 Comments
 
LVL 18

Expert Comment

by:dj_alik
ID: 36516799
Android 2.2 browser (FroYo) does not support the HTML5 audio tag

HTML5 <audio> tag on Android
http://stackoverflow.com/questions/4895188/html5-audio-tag-on-android

Android 2.2 mobile OS  supports full Adobe Flash 10.1
flash might be an option

0
 

Author Comment

by:shahjagat
ID: 36516874
I tried .swf file with embed tag...... which didn't work..
Is there any flash file formats other than .swf

Just to make sure that there is nothing wrong in the .swf file,  can you provide me a sample .swf file, so that i can try it again..
0
 

Author Comment

by:shahjagat
ID: 36516890
Audio tag is not supported in 2.2 . But video tag should support from 2.0+

Even the video tag is not working.....

Here is the format i followed......

<video width="320" height="240" controls="controls">
  <source src="movie.mp4" type="video/mp4" />
    Your browser does not support the video tag.
</video>

If the video tag is not supported in the browser, then it should give me the above message like, "Your browser does not support the video tag"

I see the message on my PC using internet explorer
But, when i check it on my Android Tablet,  it does not give me any message, page tries to load the video and it just couldn't  and gives me another error message "AN ERROR OCCURRED IN THE VIDEO"
0
 

Accepted Solution

by:
shahjagat earned 0 total points
ID: 37118266
I read that the audio tag should work from android 2.3 or high,,. but it didn't work for me.
So i used the YahooMediaPlayer to play a mp3 file on my web app..Just worked fine..

Thank you all...
0
 

Author Closing Comment

by:shahjagat
ID: 37136784
YahooMediaPlayer worked for me..
0

Featured Post

Command Line Tips and Tricks

The command line is a powerful tool at the disposal of every Linux user. Although Linux distros come with beautiful user interfaces, it's worthwhile to learn the command line because it allows you to do a number of things that you otherwise cannot do from the GUI.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
Here, we have shared an easy step by step tutorial on how to download instagram images and videos on PC, Android Mobile and iOS mobile.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This video demonstrates how to sync Microsoft Exchange Public Folders with smartphones using CodeTwo Exchange Sync and Exchange ActiveSync. To learn more about CodeTwo Exchange Sync and download the free trial, go to: http://www.codetwo.com/excha…

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question