Worklight audio play, and control - android

Worklight 6.1
I have a worklight application that will be deployed to both Android, and iOS devices. A feature of the application is to play & control fixed audio files stored within the application. The files are in .wav format, but can be converted to mp3 if necessary (mpeg). Using the audio tag the audio play & control works fine in Android emulators (Chrome), but when the app is deployed to an Android device (ex: Nexus-7 4.1.2) the audio tag is not working.
I've read that there are issues with Android devices 4.X playing audio using the audio tag. Can someone please suggest the best approach to playing, and controlling audio (start, stop, pause, reset to beginning) that will work across both Android, and iOS devices.
Thank You.

From past experience, Cordova's Media API worked for me in both iOS and Android 4.
You can try that.

Related

MP3 livestream distorted on Android devices

We're developing some Google Actions for local and national radios.
We're using the MediaResponse to play an MP3 livestream (via icecast). The livestream is fine on Google Nest or iOS devices, but it is distorted on Android devices using the "Google Assistant" app.
During the playback we hear a lot of clips and pops that make the audio stream unlistenable. We verified the same issue for other Radios' Actions.
On the other hand, we tried using an ".ogg" livestream which works very well on Google Nest and other smart speaker, and works well on Android phones too, but it doesn't work at all on iOS phones.
The listening experience on Android phones is currently very bad, we tried with different devices and Android versions (Android 10 or 12) and the results are the same.

Samsung voice recordings won't play on iOS but recordings from other Android devices do play on iOS

I've written a Android module for an App which required a way to make a voice recording. The app is cross-platform and thus required a way to record and play cross-platform, the only problem is that a recording made with a Samsung device doesn't play on iOS but other devices (OnePlus 3 & Nexus 7) do play on iOS even though there is no difference in the way the file is processed as far as I know. Does someone have experience with this or is able to help me out?

Cordova sound bug on android

i made a simple android app with cordova to play audio whenever a button is clicked. it works on my huawei phone (android 5.1.1) and the google emulator, but it does NOT work on any other android phones (android 4.x [4.1;4.2;4.4]).
i have the media plugin installed into the project, haven't done any android-version specific restrictions
index.js: http://puu.sh/mrY3g/9d4a99d3e9.txt
config.xml: http://puu.sh/mrY7a/ae9b06aa51.txt
thanks a lot
ps. if u need more files for investigation/troubleshooting, leave a comment :)
EDIT
It was something with Content Security Policy, fixed that, but now when i logcat my phone, when i try to play the .mp3 file, it says Permission Denied. This happens ONLY on android 4.x (On browser and android 5 works perfectly). Any help is appreciated.
I changed the way sound is played from onclick(function a) where in a() was made an audio/media control (backend) which played the sound. now i made an <audio> control in the html and via javascript i play it

what audio formats are supported by the android browser?

What audio formats can be played using the html5 'audio' tag in the android browser? Does anyone know where to find official specs on what the android browser supports and not?
For the record, the android media formats page does not seem to cover this - I have soundfiles (3gp) playing fine in a native app, but they won't play in my webapp.
The webkit docs also do not seem to help. My soundfiles play fine in my webapp on iphone, so that version of webkit handles them fine. Shouldn't the android browser have some official documentation somewhere?
Probably there should be official documentation. If you want to test it, why not make a web page on some domain you have access to, with links to all of the different sound files you can think of, and point your browser at it.
After some testing, I've concluded that support for the HTML5 audio element is broken in Android 2.1. Details of my testing can be found on my blog. I tested on an HTC Desire running Android 2.1 and HTC Sense, whereas Amos confirmed the same error on his HTC Heor running a custom 2.1 ROM (thanks, Amos!). If anyone will try the testpage in different configurations and report back either here or on my blog, I will update with any new information.

Does Android 2.1's Browser Support HTML 5 and What Video Format Does It Play?

The company I work for produces a lot of video and we want to target as many devices as possible, but the question came up of what does the Android do?
I personally own an Android based phone running 2.1, but I can't seem to get the HTML 5 tag to work. Even when I can trigger the browser to playback the video it just throws a notification error that it can't.
Are there guidelines to producing Android/HTML 5 compatible videos? Is it truly supported?
The android 2.1 browser currently does not support the html5 video tag the way the iphone browser does. To get the android browser to play the video when you click on the poster image you need to add onclick="this.play();" to the video tag. However, this launches a separate "window" and does not play the video in the same browser "window".
The only information I could find with details about whether Android 2.1 has the ability to play html5-video is here: http://groups.google.com/group/android-developers/browse_thread/thread/400dc61d41530242/c071c0f9712f7171?lnk=gst&q=html5#c071c0f9712f7171
This question is similar: Does html5 video work on android nexus one with android version 2.1?

Categories

Resources