Comments (5)
Okay, thanks for the details! I will look into how it behaves when larger files are played over a slow connection.
from swiftaudio.
Okay, so I have tried to run the example app on a device (iPhone X), with a simulated 3G connection, but I cannot reproduce what you describe here. I tried with streaming a longer mp3 file, about 7 minutes, and could not reproduce the problem. I do not have a SE available
Could you describe in more detail what is happening and what kind of file you try to play? How large is it? How long is it? Examples of the code that loads the file would be useful as well :)
I don't quite grasp what you mean here:
Just play an MP3 file over a 3G connection and you will see that the loading state is not triggered until the very end.
Do you mean that the loading
state is entered after the playing
state? Or that it never reaches the loading
state? Or do you mean that you would like the first state to be the loading
state (omitting the ready
state)?
from swiftaudio.
This only happens with longer MP3 files, for example, this 14.7 MB file https://drive.google.com/uc?export=download&id=17EBe2XD_XXKH3izZFl1RKd4tA_TZitk5.
What I mean by the loading state is not triggered immediately is that the loading (buffering) state is not entered immediately after you add/load the mp3 file, there is a delay between the time when you play the file and the time the MediaPlayer enters the loading state. This is not noticeable when the file is small because it loads faster.
On my app I'm using the loading (buffering) state to show a loading spinner to inform the user that the MP3 file is being loaded, however, it is not showing the loading spinner for the first 3 to 6 secs, (the delay that I mentioned above) because that is how long it is taking for my app to receive the loading state, the loading state lasts about 1 second and then it changes to the playing state at which point it begins the playback.
Everything is working great, is just that initial delay before any state is entered.
I would suggest for the loading state to be entered immediately after we add/play an item and once the file is loaded/buffered then enter the ready state.
Thanks for this awesome library
from swiftaudio.
Version 0.10.0 should solve this problem
from swiftaudio.
Awesome, thanks!
from swiftaudio.
Related Issues (20)
- Skipforward and skipforward issue HOT 5
- Set preferredPeakBitRate
- Catch Expired Auth Token to modify headers HOT 1
- Player state not updated after triggering the play()
- Cannot run Example app HOT 1
- How to know that the song is ended HOT 1
- AVQueuePlayer for gapless audio
- Regarding stop button functionality HOT 15
- QueuedAudioPlayer.reset() is not accessible due to 'internal' protection level
- Not working with local file in Queue HOT 1
- Load the audio player
- MPRemoteCommandCenter
- handleAudioPlayerStateChange call multiple time HOT 1
- how to clearQueue HOT 2
- .wav file not play
- Repository Future HOT 2
- @available enum issue on XCode 13 HOT 2
- iOS 15 can not play music in the background HOT 6
- Song will not play if it contains any character between "èéêëēėęàáâäæãåāîïíīįìôöòóœøōõûüùúū"
- Xcode 12.5 - Using 'class' keyword for protocol inheritance is deprecated; use 'AnyObject' instead
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 swiftaudio.