UnityPlugin-AVProVideo
UnityPlugin-AVProVideo copied to clipboard
How to PauseDownloadOfMediaToCache
I can CancelDownloadOfMediaToCache, but the cached data will be cleared. How to PauseDownloadOfMediaToCache when play video?
Is this for Android or iOS?
Android. And after mp.Play(), mp.Cache still caching, so I want to Pause Cache to avoid Play(url) stucked.
Another bug: mp.Cache.IsMediaCached() return false, but cache progress is 1. On android.
What version of AVPro Video are you using?
AVPro Video - Ultra Edition 2.4.1 Unity 2021.3.4f1
We are looking into the possibility of adding pause/resume functionality.
Re IsMediaCached(). This was reported a while ago and it appears we did not fully resolve it then : #1063. I will look to resolve it fully this time.
Thanks for reply.
I want to know,whether the video will play from cache (if cached progress is 1 from GetCachedMediaStatus). If not, we consider remove cache code from project for now.
The answer to 'will the video play from cache?' is not as straight forward to answer.
If GetCachedMediaStatus() returns...
CachedMediaStatus.Cached : then the video is downloaded and will playback completely from the cache.
CachedMediaStatus.Caching : then the video might playback from thee cache. This is determined by how much of the video has been cached (you can obtain this in 'progress'), and where the playback head (current position) is.
Unfortunately there is no simple way we can report back a true/false on the question other than if the entire video is cached. That said...there is an exception to this is. If you have previously downloaded a video that has multiple variants, via resolution/bitrate, and then want to playback without limitation (or different limitations).
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
We will be adding pause/resume functionality (Android support only at this stage) to the next release (v2.6.3)
The latest version has been released. This function has been added to Android only at this stage. Please let us know if this issue has not been fixed for you.