- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I just created an educational game for android.
"Baby learns the words ™ aims to teach the basic vocabulary to young children using pictures and sound files."
Here's the link: https://play.google.com/store/apps/details?id=com.alexspectror.mots
My problem is some users reports the sound isn't working. The issue apears on device like Galaxy s4, galaxy tab.
But in another part, sound is working fine in Motorola G con Lolipop.
Here's my code.
<div id="audio"><audio controls> <source src="sounds/CHAT.mp3" type="audio/mp3"> Your browser does not support the audio element. </audio></div> <script> var handle = document.getElementById('ch'); handle.addEventListener('click',function(){ var a=document.getElementsByTagName("audio")[0]; a.play(); },false); function playMP3() { intel.xdk.player.startAudio("sounds/CHAT.mp3"); } </script>
Do you see an error? Can i solve this issue?
I need help please.
Thks. Alex.
- Tags:
- HTML5
- Intel® XDK
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Might be more reliable to use a Cordova audio plugin. There is the standard media plugin and there are other third-party low-latency plugins. See this sample app for comparison usage of the <audio> tag as well as the Cordova media plugin: https://github.com/xmnboy/hello-cordova/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Also, try building with Crosswalk, instead of Android.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
When building for Android you are running in the native Android webview. If your device is running Android 4.3 or less that webview is very deficient and is likely the reason for the behavior you are seeing. This is why we offer the Crosswalk build option, it allows you to use a modern webview on Android 4.0 and higher devices (sorry, there's nothing we can do for Android 2.x and 3.x devices). The S4 and Tab should be running a modern webview, but even the 4.4 webview is kind of old and has some issues...
Use the Debug tab and build using Crosswalk. See this article http://blogs.intel.com/evangelists/2014/09/02/html5-web-app-webview-app/ and this doc page: https://software.intel.com/en-us/xdk/docs/why-use-crosswalk-for-android-...