|
I am currently downloading and caching a video file with the following CacheManager:
And injecting the AVPlayer to my View in this way:
But how could I stream the file file while it is downloading without waiting it for complete? |
|
If you pass the remote URL directly to the |
|
@nemecek-filip it streams the video but the |
|
|
|
@nemecek-filip i tried to implement This is my simple implementation but I think that the problem is on
|
|
I solved the problem integrating ChachingPlayerItem ( https://github.com/neekeetab/CachingPlayerItem ) with Cache ( https://github.com/hyperoslo/Cache )
|
|
Hi, So you get it to work? How you build it, can you give more information? What kind of structure is in the app? |
|
Super helpful stuff. Just one gripe is I don't get how to get the delegate extension code to run before starting the player. I end up having to tap on an audio twice for it to play; I guess this means that the AVPlayer can only play a cached item for whatever reason. I am sure I am messing something up somewhere in the usage of the delegate. Any pointers would be appreciated. |
|
SPONSORED Optimize your app’s startup time, binary size, and overall performance using Emerge’s advanced app optimization and monitoring tools. Reliably measure app size, speed up your app's startup time with Emerge's Launch Booster, and much more. Emerge is actively used by many of the top mobile development teams in the world.
Sponsor Hacking with Swift and reach the world's largest Swift community!
You need to create an account or log in to reply.
All interactions here are governed by our code of conduct.
Link copied to your pasteboard.