Open 21pg opened 2 years ago
Nothing works for me.. I Have an app builder, In which 20K apps that depends on this plugin (required this feature)- I don't required to record and play. We use live stream e.g (-[(http://streams.radiobob.de/bob-chillout/aac-64/streams.radiobob.de/)]) and just want to play this audio stream on button click.. When I click play button, output is: Error: 1
This is the same alike on StackOverflow, nothing but some config file, without the least code or stack-trace - which isn't reproducible. For me it probably would be easy to fix (besides I see no motivation to do so)... better cut all this abstract fluff out and provide hard facts. Nobody cares what you do with that plugin... this doesn't make the issue any more important, but rather raises the question why you don't reinvest in software maintenance?
This is the same alike on StackOverflow, nothing but some config file, without the least code or stack-trace - which isn't reproducible. For me it probably would be easy to fix (besides I see no motivation to do so). better cut all this abstract fluff out and provide hard facts. Nobody cares what you do with that plugin... this doesn't make the issue any more important, but rather raises the question why you don't reinvest in software maintenance?
I truly expected a solution here (If nothing a kind reply at least) I bet you don't care.. but we do care Issue easily reproducible using on Android 11 I used a very basic cordova app with only using cordova-plugin-media and build over android sdk = 30
Does the stream offer https://
version? Error code 1 is aborted and android is known to reject non-secure http paths.
Ref: https://github.com/apache/cordova-plugin-media/blob/master/www/MediaError.js#L46
Does the stream offer
https://
version? Error code 1 is aborted and android is known to reject non-secure http paths.Ref: https://github.com/apache/cordova-plugin-media/blob/master/www/MediaError.js#L46 Yes stream works on - https also http://streams.radiobob.de/bob-chillout/aac-64/streams.radiobob.de/ I tried few more streams - https://stream1.datenkollektiv.net/ginseng.mp3 https://radiopotsdam-live.cast.addradio.de/radiopotsdam/live/mp3/high/stream.mp3 https://stream1.thepuremix.net/nexusdance_low.aac
Yes stream works on - https also
So can this issue be closed? Preferably you should always use https when available. Android starting in API 28 has disabled clear text (e.g. non-encrypted traffic) by default.
If for some reason you cannot use https, then you'll need to allow clear text traffic. Cordova doesn't provide an interface to do this, you'll need to craft the appropriate xml yourself.
No, its not working, I said, stream available on both https:// and http:// version I have tried few more stream but its not working, http or https both.. Is there issue anything related to mp3.. ?
I've reproduced your issue -- I observed that the media starts but then closes the stream immediately. I'm not sure of the reason.
I also tested it with simply the HTML <audio>
controls -- that does appear to work as expected with the https
url. Like I mentioned before, android by default blocks http://
urls. Using the HTML5 may be a workaround for you for the time being.
I only tested with https://streams.radiobob.de/bob-chillout/aac-64/streams.radiobob.de/ stream.
I am getting issue with mp3 streams only... however, I made changes as per your suggestion using html 5 for now(temporarily), its working for me.. but need any solutions asap...
Add this permission in the config.xml file to fix
Add this permission in the config.xml file to fix
Note that using manage external storage permission requires justification when uploading to google play store. Google may reject the app if they believe you don't need broad file system access.
Add this permission in the config.xml file to fix
Tried, but not working for me.. I am getting problem with some stream e.g.- https://streaming.fueralle.org/ginseng.mp3 for some reason I can't use HTML5 ..
When I tested streaming with the above example audio file, I didnt see any issues.
First Use Case
config.xml
.https://localhost/
Second Use Case
AndroidInsecureFileModeEnabled
to true
in config.xml
.file:///android_asset/www/
cordova-plugin-file@7.0.0
release. The outcome shouldnt be effect with the new release.cordova-plugin-file
was added by the media plugin. I didn't add it manually.https
scheme trying to stream from the http
scheme, it will fail. This is default behavior of any browser since its trying to access something that is insecure.
Bug Report
After I upgrade to android 11 , I am getting problem with cordova-plugin-media player. Its not playing audio stream .. on checking status its always at 1.
Problem
What is expected to happen?
It should play audio stream..
What does actually happen?
A continuous loop is going on play button.
Information
Command or Code
Environment, Platform, Device
android 10.0.1
Version information
Checklist