- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry in advance for this stupid question as im a new user of Intel XDK and have only had it for 4 days or so.
So I have for a day or two now tried to get the standard HTML audio player to play MP3 files in Intel XDK.
My folders are structured like this:
Inside the music folder I have placed a Mp3 file called "song.mp3". But after I have added the audio player it wont play the Mp3 file. I have tried it both with the emulator and actually made a android build and tried it on my Sony Xperia Z3 compact but it wont work on neither of them.
All the buttons on the audio player just becomes grey like there isnt anything to play and no matter what I do it wont work. I have tried using a .wav files instead (of the same song, just converted) and then it works.
The code for the audio player looks like this. And it's written inside the "index.html" file so the source file path should be "music/song.mp3" if im not misstaken right?
<audio class="widget uib_w_1 d-margins" data-uib="media/audio" data-ver="0" controls="controls">
<source src="music/song.mp3" type="audio/mpeg">
</audio>
I have tried writing the code in myself and using the designer but neither seems to work. I dont want to use .wav files because (correct me if im wrong) but not all phones support .wav format files.
What am I doing wrong?
Is this a bug or common problem?
Sorry in advance if this thread got placed in the wrong section.
Thanks in advance!
- Tags:
- HTML5
- Intel® XDK
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Have you enabled to correct plugins for the app? You can do this under Projects tab, Cordova plugins.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Exactly which plugin do you have in mind? I have enabled the "Player" plugin in the Cordova plugin menu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Look at the sample Audio player. You can get an overview.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page