- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi.
How can i add sound on my app ? When i add this HTML code its works only on my PC.But in mobile it does´t work. Please help me. Sorry for my language.
<audio controls> <source src="horse.ogg" type="audio/ogg"> <source src="horse.mp3" type="audio/mpeg"> Your browser does not support the audio element. </audio>
- Tags:
- HTML5
- Intel® XDK
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
For playing back audio you can use the core Cordova media plugin or use your favorite Internet search engine to search for low latency audio cordova to find some third-party alternatives.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Are you testing on a mobile device, or in the Emulator in the XDK? Definitely test on device.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
See this sample app for how to use the <audio> tag inside a webview, especially this part of the app: https://github.com/xmnboy/hello-cordova/blob/xdk-2323/www/js/main.js#L155
NOTE: older Android webviews may not work (anything on Android 4.3 and earlier) -- we highly recommend you use Crosswalk and test with the Debug tab, not the Test tab, because the Debug tab will run your app on Crosswalk.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
Not All mobile support html5 audio so if you wanna make it supportable in all the application try n build ur app in crosswalk it will work.

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