Reputation: 1193
I'm building a music application with capabilities to stream audio from hosted streaming server. But I'm not able to find any cordova plugin which enables me to stream audio inside application. I have tried using cordova-plugin-media, but it gives error code 1 in android for .m3u8 files.
To summarise what I have already tried:
Can somebody point me in right direction?
Thanks
Upvotes: 2
Views: 1523
Reputation: 11935
As you have already mentioned that the app works fine in iOS with cordova media plugin, the easiest and minimal change that needs to be done to make this work in Android is to use the exoplayer plugin that has the capability to play m3u8 files.
You can make use of the Cordova device plugin to identify the device platform and invoke Cordova media plugin for iOS and exoplayer plugin for Android. This should do the trick for you.
Upvotes: 3