This shows you the differences between two versions of the page.

Link to this comparison view

play_an_mp3_file_in_phonegap [2013/06/18 14:31]
Joel Dare
play_an_mp3_file_in_phonegap [2020/06/01 22:53]
Line 1: Line 1:
-====== Play an MP3 File in PhoneGap ====== 
-There is nothing special about playing a plain MP3 file in Phonegap. You can typically just use HTML5 audio. Here's an example. 
-<audio controls>​ 
-  <source src="​sound.ogg"​ type="​audio/​ogg">​ 
-  <source src="​sound.mp3"​ type="​audio/​mpeg">​ 
-Your browser doesn'​t support audio. 
-That should be all you need. Nothing special here. 
-I included both ogg and mp3 files because some browsers support mp3 and some don't (we use ogg for those). iOS and Android both support mp3, so you might only need the mp3 version for mobile development. Firefox doesn'​t support mp3 and the upcoming Firefox and Ubuntu phones might need the ogg file. Those don't have much market share at present, so ogg might not be necessary at all. 
-You may also be interested in how to [[Play an MP3 Audio Stream in PhoneGap]]. 
comments powered by Disqus
play_an_mp3_file_in_phonegap.txt · Last modified: 2020/06/01 22:53 (external edit)