- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Does anyone know what are the audio formats that can be played by Apache Cordova Media plugin (https://github.com/apache/cordova-plugin-media)?
Does the Apache Cordova Media plugin support the same formats as the Audio API (HTML5) would support? What if the Audio API is not supported? Will the Apache Cordova Media plugin still work? How to know or check the formats supported?
Thank you in advance,
Joan
- Tags:
- HTML5
- Intel® XDK
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Joan,
First of all you can take look of one of our sample to understand how it works.
Here is the link: https://github.com/gomobile/sample-audio-player
.wav and .ogg files are the only ones compatible with the emulator. However, you can use .mp3 files without issues except that you should test on a built app or app preview.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Thanks for your reply.
That sample seems to use the Cordova Native Audio Plugin instead of the Cordova Media Plugin. Right?
My code already works well and plays audio files without problem. As you said, MP3 files are not supported by the emulator but they work in my Android device (Sony Xperia Z3).
I have successfully played MP3, OGG, WAV and some more. But I only have a phone to test. Maybe some formats I tried are not supported by another different device. So I need a method to know what formats are supported by the device which is currently running the app.
I just would like to know whether the audio formats supported depend on the Cordova Media Plugin or depend on the system/platform. If it depends on the system, where can I find a list of the compatible audio formats for each system? Are the formats supported by the Cordova Media plugin the same supported ones by the HTML5 Audio API? Iin such a case, I could use the canPlayType() method of the Audio object.
In other words, will the canPlayType() method give me the information I need to know whether the Cordova Media plugin can play an audio format in the current system the app is running or not?
Thank you.
Cheers,
Joan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Are you building with crosswalk or Android?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
And can you explain what is Cordova Native Audio Plugin vs Cordova Media Plugin?
Emulator is just a simulator. There are some limitations just check out this link: https://software.intel.com/en-us/xdk/docs/dev-emulator
Try to build with crosswalk and use either build or debug tab to see the actual behavior of the app.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Cordova Native Audio plugin and Cordova Media plugin are two totally different plugins for Apache Cordova.
I think maybe I did not express myself clearly. I just want to know what formats are supported by the Apache Cordova Media plugin. Not only on my device but in all other devices. There must be a way to check what formats are supported by the device which is running the app.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, I am the owner of that post in Stackoverflow. But no body provided a good answer so far.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
As Paul indicated it is platform based. It really depends on what platform you are using.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page