Giter Site home page Giter Site logo

Comments (9)

zhzhy avatar zhzhy commented on June 3, 2024

AVPlayer有一套自有的缓存系统,貌似不支持播放过的视频的缓存。但是支持查询缓存进度,AVPlayerItem.loadedTimeRanges可以获得load progress,并且该属性支持KVO,可以通过AVPlayer.currentItem获取到与AVPlayer关联的AVPlayerItem。

from proxymediainwebview.

xhzengAIB avatar xhzengAIB commented on June 3, 2024

你好! 意思视频不能缓存吗?

from proxymediainwebview.

zhzhy avatar zhzhy commented on June 3, 2024

应该是做了缓存,不过是黑匣子,都是系统API,所以不能断定。想自己做缓存的,可以使用代理之类的,使用自定义的下载模块。

from proxymediainwebview.

xhzengAIB avatar xhzengAIB commented on June 3, 2024

我使用您的Demo测试之后,在无网络状态下是不能播放的,所以应该没有缓存,因为一边播放一边缓存,不自定义播放器的情况下,可以做到吗?

from proxymediainwebview.

zhzhy avatar zhzhy commented on June 3, 2024

目前来看,使用默认配置是无法做到的。可行的技术方案是本地起一个HTTPServer,后者使用系统API AVAssetResourceLoader.

from proxymediainwebview.

xhzengAIB avatar xhzengAIB commented on June 3, 2024

@zhzhy
只能这样了!通过本地HTTPServer来达成模拟数据流读取了! 感谢哈! 能否一起来完成一下啊?相比很多App会有需要的哦!

from proxymediainwebview.

zhzhy avatar zhzhy commented on June 3, 2024

这方面有很多成熟的开源库可以利用,并且我认为使用AVAssetResourceLoader更方便,毕竟系统库。所以,重新搞一个的意义在哪里?

from proxymediainwebview.

xhzengAIB avatar xhzengAIB commented on June 3, 2024

嗯! 这个问题值得思考,我尝试一下怎么从AVAssetResourceLoader中进行缓存视频吧!

from proxymediainwebview.

xhzengAIB avatar xhzengAIB commented on June 3, 2024

能否简单描述一下怎样缓存的流程吗?比如使用AVPlayer去播放一个视频,这个时候需要怎样去做这个缓存的流程呢?

from proxymediainwebview.

Related Issues (1)

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.