Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS Support #19

Closed
laoluadeyo opened this issue Sep 28, 2015 · 21 comments
Closed

iOS Support #19

laoluadeyo opened this issue Sep 28, 2015 · 21 comments

Comments

@laoluadeyo
Copy link

Hi!

I was wondering if this plugin has been tested on iOS yet?

@arielfaur
Copy link
Owner

Hi! Yes it works on iOS ☺️

On Monday, 28 September 2015, Laolu Adeyo notifications@github.com wrote:

Hi!

I was wondering if this plugin has been tested on iOS yet?


Reply to this email directly or view it on GitHub
#19.

@laoluadeyo
Copy link
Author

Hi,
I implemented this last night in a streaming app I was working on, It worked fine on my android but on my iOS device it freezes once I hit the play button. I'm not sure why.

@arielfaur
Copy link
Owner

What iOS version are you on? iOS will freeze the UI while the track is loading by default, but then the track should start playing. At least that is the behavior I have seen and what others have reported. Do you see any errors in the console?

@laoluadeyo
Copy link
Author

Hi, I am using iOS version 7.1.2. When I ran the ionic serve command and opened the console I saw "ionic-audio: missing Cordova Media Plugin. Have you installed the plugin?
Run 'ionic plugin add org.apache.cordova.media'"

But I have already installed the cordova media plugin

@arielfaur
Copy link
Owner

This will not work with ionic serve. You need to test on your device.
There's an error in the documentation. To make sure you have the latest Media plugin remove it and add it again with:
ionic plugin add cordova-plugin-media

@laoluadeyo
Copy link
Author

Hi,
I removed the media plugin and reinstalled it, I ran it on my iOS device, but it still freezes again. It still plays fine on the android

@arielfaur
Copy link
Owner

Is it an iPhone 4? I've never tested on iOS 7.1.2. Only on iOS 8.4.1 and 9.
You should be able to do remote debugging if you have your iPhone plugged to your dev machine and open Safari as explained here:
http://phonegap-tips.com/articles/debugging-ios-phonegap-apps-with-safaris-web-inspector.html

You can then open your device's console window while your app is running and see if there are any errors.

@leonardosalles
Copy link

You checked if sound starts play after a minute? If you use this on iOS the app will freeze until all the audio files is downloade.

@laoluadeyo
Copy link
Author

I forgot to post but I was able to get it working about a month ago. I think it was because I was trying to access an m4a file not an mp3. Thanks for the help.

@leonardosalles
Copy link

You're welcome.

@NurdinDev
Copy link

who I can make play Audio When Screen Is Locked in IOS?

@arielfaur
Copy link
Owner

You need to enable background audio in xCode

On Sun, Dec 13, 2015 at 6:44 AM, nuruddinbadawi notifications@github.com
wrote:

who I can make play Audio When Screen Is Locked in IOS?


Reply to this email directly or view it on GitHub
#19 (comment)
.

@NurdinDev
Copy link

in IOS when start playing its take long time to starting play and spinner is frozen
how to fix this and thanks?

@arielfaur
Copy link
Owner

There is no fix for that. That's how the Cordova Media works.

@badawiZad
Copy link

hi ..
I have a problem with IOS when to play any Audio " internet link " the app is freeze 10 sec or 15 after that is start play
why ?

@NurdinDev
Copy link

screen shot 2015-12-23 at 13 48 30

I have problem in ios when play audio app is freezing
please any solution if anyone know how fix this ?

@laoluadeyo
Copy link
Author

I think that's just how it works for iOS. Since the cordova media plugin does not support streaming, it is going to freeze until the audio file is completely downloaded. I would suggest using maybe Web Audio API instead
example: https://www.airpair.com/ionic-framework/posts/using-web-audio-api-for-precision-audio-in-ionic

@NurdinDev
Copy link

Is there a way to solve the freezing problem temporarily?
For example, show loading or something else.

@NurdinDev
Copy link

who I can allow stop audio in background mode and I enable background mode in xCode and work good
but the problem is I can't pause audio outside application .

@arielfaur
Copy link
Owner

You can use MediaManager.stop() as explained here: http://arielfaur.github.io/ionic-audio/#MediaManager

@bazimov
Copy link

bazimov commented Apr 6, 2016

I think cordova media plugin 2.2 newest version has fixed the issue. And thank you so much @arielfaur for such an awesome project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants