IPhone: Phonegap: play audio in the background

I use this code to stream MP3 audio file in the background in Phonegap. But the problem is this: using this code, there is no way to get the current position and all other telephone functions using this code. I tried my own quicktime / childbrowser method to play the file. This works great and shows time frames, etc. But there is no way to hide the QuickTime player and view it in the application, and there is also no way to save the position and set the position in the audio files. Any ideas to solve the problem?

+4
source share
1 answer

Another option (if you're not afraid of code development) is a plug-in for streaming audio (including fixed-length files such as mp3) for PhoneGap on iOS.

https://github.com/devgeeks/phonegap-plugins/tree/AudioStreamer/iPhone/AudioStream

It is currently under development and may have bugs, but it is quite functionally rich.

I also have an example of an iPhone project that uses it:

https://github.com/devgeeks/ExampleAudioStreamer

If you try to find any errors, let me know. I squash them pretty quickly as I try to prepare it for the main PhoneGap plugin repository.

+1
source

Source: https://habr.com/ru/post/1379019/


All Articles