Giter VIP home page Giter VIP logo

Comments (5)

jorgenhenrichsen avatar jorgenhenrichsen commented on May 24, 2024 1

Okay, thanks for the details! I will look into how it behaves when larger files are played over a slow connection.

from swiftaudio.

jorgenhenrichsen avatar jorgenhenrichsen commented on May 24, 2024

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.

alangumer avatar alangumer commented on May 24, 2024

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.

jorgenhenrichsen avatar jorgenhenrichsen commented on May 24, 2024

Version 0.10.0 should solve this problem 👍

from swiftaudio.

alangumer avatar alangumer commented on May 24, 2024

Awesome, thanks! 👍

from swiftaudio.

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.