Giter VIP home page Giter VIP logo

Comments (7)

jorgenhenrichsen avatar jorgenhenrichsen commented on June 4, 2024 2

Nice!

Yeah, I have thought about the same thing and it is definitely something that should be added 👍

from swiftaudio.

whsmacon avatar whsmacon commented on June 4, 2024 1

I also come from react-native-track-player and would love to see gapless queues implemented.

from swiftaudio.

murad1981 avatar murad1981 commented on June 4, 2024

yes the library is so clean, a small suggestion is to use the same mentioned custom AVPlayerItem in SwiftAudio.

from swiftaudio.

JhonnyTawk avatar JhonnyTawk commented on June 4, 2024

@dcvz Hey, I am trying to add caching to SwiftAudio using https://github.com/neekeetab/CachingPlayerItem

but the func add and load take AudioItem add(items: [AudioItem], playWhenReady: Bool = true)

and in the caching library AVPlayer take CachingPlayerItem so how to integrate it?

Thank in Advance

from swiftaudio.

nishanBende avatar nishanBende commented on June 4, 2024

@dcvz We could also add a preloading functionality.
Ideas:
delannoyk/AudioPlayer#36 (comment)

Thanks @dcvz for react-native-track-player. I came looking if the underlying SwiftAudio provides a preloading functionality.
I am not an iOS developer but will try to implement this feature in a fork. I'll let you know if I come up with something.
This is a must-have to built apps with awesome feeds (Instagram e.g.) with almost 0 load time.

from swiftaudio.

nishanBende avatar nishanBende commented on June 4, 2024

@dcvz I have attempted a preload functionality in SwiftAudio and tested with react-native-track-player.
The playing becomes as fast as a downloaded asset. I have been testing this for a few days.
nishanBende@41e5564

P.S. I am not sure about the implications it can bring, I took the implementation idea from this comment.
delannoyk/AudioPlayer#36 (comment)

from swiftaudio.

nishanBende avatar nishanBende commented on June 4, 2024

@dcvz I am managing the queue in JavaScript because the underneath QueueAudioPlayer is not preloading the next track, so, I have exported the preload function to RNTrackPlayer with preload/cancelPreload implementation in this commit.
nishanBende@41e5564

I feel we should split it into 2 separate features.

  1. Caching while Playing. Similar to https://github.com/neekeetab/CachingPlayerItem.
  2. Preloading any asset programmatically.

Can we also let AVQueuePlayer handle the queue for us?
There's some discussion that it internally preloads the next track but I cannot confirm.
https://developer.apple.com/documentation/avfoundation/avqueueplayer

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.