Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some videos are not playing with request timed out error. #23

Open
asifbilal786 opened this issue Jul 3, 2019 · 2 comments
Open

Some videos are not playing with request timed out error. #23

asifbilal786 opened this issue Jul 3, 2019 · 2 comments

Comments

@asifbilal786
Copy link

I have properly implemented the CachingPlayerItem functionality in my application. The only problem I am facing is that some videos with streaming URLs are not playing. AVPlayer gives error: "request timed out".

Although using simple AVPlayerItem class AVPlayer plays such videos with no error. Please resolve this issue.

FYI, I am testing it on real device. That is, iPhone 6.

@neekeetab
Copy link
Owner

Hi,

Sorry for late response.

Have you noticed anything common to all those videos that won't play? Can you provide a link to a video that reproduces the error?

@asifbilal786
Copy link
Author

asifbilal786 commented Jul 9, 2019

Yes, it happens for some of the videos.
For one of such video, I digged deep into the code and noticed that resource delegate methods are requesting bytes with range that are the last portion(bytes) of video. Hence, downloading video to that range takes too long and AVPlayer causes the error: "request timed out".

BTW, once video is downloaded completely, then works perfectly as cached file.

I will provide you the link within a day.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants