Fix Cordova Audio Framework and Notifications
Bounty
$1000+ USD for whoever can fix everything described in this issue page.
Intro
VIEW DEMO APP HERE
->I wrote a Vue.js web framework that needs to somehow work on iOS and Android.
You can find this framework in main.js.
The audio framework is inside CreekCordovaAudioPlugin.js that attempts to use a Cordova "native" audio plugin to make the audio playback work correctly on mobile devices (iOS/Android), especially when the device's screen is locked.
The Cordova Media plugin appears to be loading up correctly, but there are a several issues with how it interacts with the audio framework and Cordova Media Controls plugin.
We also need some work finished for the music notifications plugin.
Resources
-
Working demo of the browser-based audio framework: http://kwmr-app-1.creek.fm
- Uses CreekAudioPlugin.js and Howler.js instead of the Cordova media plugin -- just so that you can see how it works.
-
Cordova Media Plugin documentation is here: https://github.com/apache/cordova-plugin-media
-
Main framework/boilerplate for this Vue + Cordova app: https://github.com/vuetifyjs/cordova
- Want to use something else? Then go ahead and NOT use Vuetify. Quasar? A new Vue CLI thing? Whatever, just make this work!
Debug Process
-
You can see how the audio framework and UI is normally supposed to function if you re-activate CreekAudioPlugin.js in
./src/main.js
.-
To do this, edit
./src/main.js
and comment out theCreekCordovaAudioPlugin.js
line (around line 51), and uncomment theCreekAudioPlugin.js
line. -
CreekAudioPlugin.js is supposed to have the exact same API (like
Creek.audio.play()
) as the Cordova version, except it uses Howler.js so that it works in browsers. -
Otherwise, the Cordova media plugin does not work in the browser-based
npm run dev
preview mode. It only works on iOS/Android or in the device simulators.
-
-
Try out the playback functions -- live stream player, and audio file player (which has a seek/position bar).
-
Then, once you see how it show work, please load up the Cordova Media plugin again (activate CreekCordovaAudioPlugin.js again) and try it out on an Android and iOS device.
-
It may play the audio stream at first, but it has a lot of issues (see issues below!)
-
Check out the readme.md file for how to launch the app on a test device (iOS/Android).
-
Known Issues
-
If you just try to start/stop the live audio, it may "double up" and play multiple audio streams on top of each other. It seems to not be deleting the previous
MediaInstance
. -
The spinner doesn't stop spinning, so it is not correctly handling the "audio is loaded" event of the
MediaInstance
. -
The Media Controls plugin does not use the "current song" data that's coming from Socket.io in the CreekLivePlugin.js -- so it should use that same "Live API" data just like the audio toolbar at the bottom.
-
Audio file player is untested, and needs to be tested and its various functions tried out -- including seek and generally just playing files correctly.
-
Likely others -- it will need some testing, so that you try out all of the audio player's functions, to find what is not working.
File Structure
The Creek audio framework is structured as a Vue.js plugin.
The main "Creek" package is here:
You can find the plugin files here:
The main plugin that needs work is here: