Coder Social home page Coder Social logo

Comments (4)

tsheaff avatar tsheaff commented on August 12, 2024

OK, good explanation @gsabran

The way that it fetches byte ranges should be an implementation detail. For example it sounds like it may depend on the encoding of the file type, which is not specified by this library.

Can you let me know how you're using the AVPlayerItemStatus ? I thought about not even exposing the AVPlayer on the external interface at all as it's an implementation detail as well.

from persistentstreamplayer.

tsheaff avatar tsheaff commented on August 12, 2024

@gsabran I've actually released a new version today, 1.0.0, that removes the player property from the header. It's an implementation detail that shouldn't be needed by consumers. We can always add more methods to PersistentStreamPlayerDelegate

Release notes here: https://github.com/calm/PersistentStreamPlayer/releases/tag/1.0.0

from persistentstreamplayer.

gsabran avatar gsabran commented on August 12, 2024

I've videos that might be played back and forth quite frequently. I think that the default AVPlayer doesn't do a good job at caching previously fetched buffers and is really designed for forward playback. So when I seek backward in a part of the video that has already been streamed, it download it again. So I wanted to have a memory / disk cache to improve that. I'm interested in the readyToPlay status since I'd like to start playing the video asap.
It's a quite specific use case, so that's fine if it doesn't fall in what you want to cover!

from persistentstreamplayer.

tsheaff avatar tsheaff commented on August 12, 2024

OK yeah that makes sense @gsabran thanks for the explanation.

Yeah that use case of seeking in the video isn't really covered by this library. It's something we could add better support for, but it's fairly complex. The goal here is to basically persist the video / audio to disk so that the next time they go to play the same one, it's just buffering locally with no network usage at all.

I left a comment here about seeking: https://github.com/calm/PersistentStreamPlayer/blob/master/PersistentStreamPlayer.h#L37

Feel free to fork if you think this is a good launching-off point for your implementation.

from persistentstreamplayer.

Related Issues (7)

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.