|
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 Still waiting on your CI build? Speed it up ~3x with Blaze - change one line, pay less, keep your existing GitHub workflows. First 25 HWS readers to use code HACKING at checkout get 50% off the first year. Try it now for free!
Sponsor Hacking with Swift and reach the world's largest Swift community!
This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.
All interactions here are governed by our code of conduct.
Link copied to your pasteboard.