Comments (22)
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.
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.
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.
Forgot to add that you must run bower install
first of all :)
from ionic-audio.
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.
That'd be great @ascendedmasta ! Thanks!
from ionic-audio.
@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.
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.
@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.
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.
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.
Can you upload a project for me to test your use case?
from ionic-audio.
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.
@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.
@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.
@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.
@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.
@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.
@arielfaur Nice work! I've tested on iOS and can confirm that the previous issues are now resolved.
from ionic-audio.
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.
Tested on iPhone 6, 6 Plus, and iPad Mini. The issues are resolved.
from ionic-audio.
Thanks a lot for your feedback @ascendedmasta !
from ionic-audio.
Related Issues (20)
- Adjust speed of playing track HOT 2
- Structure of this._audioProvider.tracks duration seeking
- problem in play
- I have an error when it comes to template parsing errors.
- Customize UI of the provided html tags
- How can I post all of the tracks playing at the same time?
- Want to stop any audio properly
- Not able to Play M3u Files . HOT 1
- on iOS lock screen, I can't play the audio
- Ionic 4 version? HOT 10
- Are there any way to have two audioProvider?
- I can't change the progress if the file is saved under assets/
- it doesn't work with local audio files, HOT 1
- preload metadata is not preloading tracks with local files - It works only on streaming HOT 1
- online audio file not working on device
- onFinish called while playing
- Cannot properly handle ExpressionChangedAfterItHasBeenCheckedError
- AudioProvider replace function
- Change volume
- ERROR in Error during template compile of 'IonicAudioModule'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ionic-audio.