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

Downloading starts immediately after CachingPlayerItem created #14

Open
hssrrw opened this issue Sep 19, 2018 · 3 comments
Open

Downloading starts immediately after CachingPlayerItem created #14

hssrrw opened this issue Sep 19, 2018 · 3 comments
Labels

Comments

@hssrrw
Copy link

hssrrw commented Sep 19, 2018

Hey. I'm pretty new to iOS development so I probably misunderstand something.

What I see is CachingPlayerItem starts downloading right after I create a new instance of it.
What I expect is that it starts downloading either after play() is called for AVPlayer or download() for CachingPlayerItem. In this case, it's not very clear what the purpose of download() is.

@neekeetab neekeetab added the bug label Oct 1, 2018
@neekeetab
Copy link
Owner

neekeetab commented Oct 1, 2018

I can confirm the same behavior

@neekeetab
Copy link
Owner

I've taken a look at this issue again and figured out that it's instantiating AVPlayer with an item that triggers the download. This wasn't the case before, apparently Apple has changed the implementation slightly at some point.

@joeldrotleff
Copy link

I believe this is intentional behavior; it's useful so that you can "preload" a video by just instantiating an AVPlayer before you actually intend to start playing it

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

No branches or pull requests

3 participants