Code Monkey home page Code Monkey logo

Comments (22)

eminos avatar eminos commented on July 18, 2024

Actually, Pause doesn't work at all for me. (BTW, I'm not using the spinner, I don't need it since it's all local files that start instantly.)

from ionic-audio.

arielfaur avatar arielfaur commented on July 18, 2024

hmm...interesting. I haven't tested this use case with local files but that shouldn't make a difference. I will run some tests today. Did you by any chance update to the latest version? Because I pushed a new version yesterday and I want to know if it worked fine before with the earlier release. Or did you spot the issue just today by chance?

from ionic-audio.

arielfaur avatar arielfaur commented on July 18, 2024

I tried different scenarios, including yours, and it all worked fine on my Android devices (4.1.2 and 5.1). Haven't tested on iOS though.
Could you please check out this Ionic project and simply run it on your device(s) ?
https://github.com/arielfaur/ionic-audio-example

Simply add a platform and run it on your device and let me know if you see any issues. I removed the spinner and progress bar just like in your example. I've also added some local mp3 files like you're doing and it all worked fine on my end! Let me know.

from ionic-audio.

arielfaur avatar arielfaur commented on July 18, 2024

Forgot to add that you must run bower install first of all :)

from ionic-audio.

ascendedmasta avatar ascendedmasta commented on July 18, 2024

I'll give this a shot on iOS as well.

I've only ever used local files to test with...Seems to have worked fine with me before.

from ionic-audio.

arielfaur avatar arielfaur commented on July 18, 2024

That'd be great @ascendedmasta ! Thanks!

from ionic-audio.

ascendedmasta avatar ascendedmasta commented on July 18, 2024

@eminos Copying and pasting your code didn't run initially...Not sure what you're trying to do with your exercise/s object array.

I did was @arielfaur did to test as well.

from ionic-audio.

arielfaur avatar arielfaur commented on July 18, 2024

What if you move ng-repeat="exercise in exercises" to the ion-audio-track tag:

<ion-audio-track ng-repeat="exercise in exercises" track="exercise">

Does that work for you?

from ionic-audio.

ascendedmasta avatar ascendedmasta commented on July 18, 2024

@arielfaur : When I do that I'm able to play both tracks independently and they work. However, the ability to pause either track is disabled so the music plays to the end.

If exercise track1 is playing when you press exercise track2, track1 stops and track2 starts playing (until it ends) with no ability to stop the track.

And vice versa.

from ionic-audio.

arielfaur avatar arielfaur commented on July 18, 2024

This is really weird because the ionic-audio-example project I uploaded to GitHub does exactly that, the code is very similar to @eminos code.
@ascendedmasta did you try with the example project? I am able to play one track, then play the other and still able to pause.
Maybe @eminos can put up a full sample project for us to try ?

from ionic-audio.

ascendedmasta avatar ascendedmasta commented on July 18, 2024

Sorry about that...It was a syntax error on my part.

Do both the tracks play at one time?

A quick user test:

If you play another track while that spinner is still active, it will disable the ability to play that other track. I'm guessing that playlist support would correct this issue though.

from ionic-audio.

arielfaur avatar arielfaur commented on July 18, 2024

Can you upload a project for me to test your use case?

from ionic-audio.

nickfogle avatar nickfogle commented on July 18, 2024

Has anyone found the root of the pause problems. I'm noticing the same issue on iOS. The only way to stop the current track is to click play for a separate track.

from ionic-audio.

arielfaur avatar arielfaur commented on July 18, 2024

@nickfogle can you upload a sample project so I can test it? Unfortunately I don't have an iOS device, but I can try with the emulator. On Android everything seems to work fine though.

from ionic-audio.

nickfogle avatar nickfogle commented on July 18, 2024

@arielfaur After encountering the issue, I tried again using your example project. I installed all dependencies and deployed to my iPhone. I had the exact same issue with the pause button not working. There are no errors in my console, but it's like that pause button doesn't even register the touch. I'm using an iPhone 5s running iOS 8.

from ionic-audio.

arielfaur avatar arielfaur commented on July 18, 2024

@nickfogle I have been testing the example project on the iOS simulator, tried on the iPhone 5S and works fine at least on the emulator image! I don't have an actual iPhone to test on unfortunately. Although I have an idea where the problem may come from. I will push some fixes. It would be great if you could give it a try on your iPhone and report back.

from ionic-audio.

nickfogle avatar nickfogle commented on July 18, 2024

@arielfaur thanks for looking into this. Once you push the updates, I'm happy to test it on my device and let you know how it works.

from ionic-audio.

arielfaur avatar arielfaur commented on July 18, 2024

@nickfogle I have been looking into the play-pause issue. Since I don't have an iOS device I can only guess where the problem comes from. I would guess it's related to the fact I disabled the play button until the track had fully loaded to avoid the use case of multiple clicks leading to unexpected behavior. Disabling the button element seemed not to work well on iOS apparently. So I have simplified this scenario by preventing multiple clicks.
Could you please test it on your iPhone and let me know? It's still not a release, but a fix to the example project. It's in a new branch so simply check out the project:
https://github.com/arielfaur/ionic-audio-example/tree/fix-play-pause

Note: The project is using a modified ion-audio.js, not the one in the master branch:
https://github.com/arielfaur/ionic-audio-example/blob/fix-play-pause/www/js/ion-audio.js

from ionic-audio.

nickfogle avatar nickfogle commented on July 18, 2024

@arielfaur Nice work! I've tested on iOS and can confirm that the previous issues are now resolved.

from ionic-audio.

arielfaur avatar arielfaur commented on July 18, 2024

Excellent! I will build a release then. It would be great to get feedback from @eminos and @ascendedmasta too, to be on the safe side :)

from ionic-audio.

ascendedmasta avatar ascendedmasta commented on July 18, 2024

Tested on iPhone 6, 6 Plus, and iPad Mini. The issues are resolved.

from ionic-audio.

arielfaur avatar arielfaur commented on July 18, 2024

Thanks a lot for your feedback @ascendedmasta !

from ionic-audio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.