Closed dw8869 closed 1 month ago
Check the cache status before mediaPlay.OpenMedia
call, and try mediaPlay.OpenMedia
call when the Progress is over 0.
if (status == CachedMediaStatus.Caching)
{
while (true)
{
await Task.Yield();
mediaPlayer.Cache.GetCachedMediaStatus(URL, ref progress);
if (progress > 0)
break;
}
}
mediaPlayer.OpenMedia(mediaPathType, url, false);
There seems to be no problem when modifying it as above. Can you review my solution?
InvalidResponseCodeException: Response code: 416 suggests that the player is requesting an invalid byte range from the server. While playback whilst caching is possible, it will depend on the available network resources, which may be causing the issue here. I presume it plays fine for you when it is not caching?
Not use cache. it works fine.
I would try videos from different servers, and making sure you have a good internet connection.
Describe the issue Try to cache and play the video, an error occurs on Android.
To Reproduce
mediaPlayer.Cache.AddMediaToCache
mediaPlayer.OpenMedia
mediaPlayer.Play
Logs avpro_log.txt
Videos https://stg.cms.treal.xyz/output/cd89fa770af8622277fe008afe5bfd31/hls/cd89fa770af8622277fe008afe5bfd31.m3u8