VIMVideoPlayer icon indicating copy to clipboard operation
VIMVideoPlayer copied to clipboard

Subclass that uses AVQueuePlayer

Open hankjacobs opened this issue 9 years ago • 2 comments

Hello,

I would like to add support for using AVQueuePlayer as the internal player. To do so, I am thinking of making changes that allow VIMVideoPlayer to be subclassed. I would then create a VIMQueueVideoPlayer class that subclasses VIMVideoPlayer. There are few approaches that I could take but I am thinking of doing the following:

  • Create a category called Subclassing
  • expose the readwrite AVPlayer *player property in this category
  • expose the setupPlayer instance method in this category
  • the VIMQueueVideoPlayer would then use this category to implement setupPlayer and set the player property with an instance of AVQueuePlayer.

Thoughts and feedback would be greatly appreciated before I make those changes.

Thanks!

hankjacobs avatar Dec 15 '15 02:12 hankjacobs

Hey @hankjacobs,

Our small team is in crunch mode right now preparing for a major release in late January, not much bandwidth to dig in and provide pre-implementation input at the moment, but will try.

Can you provide some info on the use case you're pursuing? I.e. what will queue player unlock for you?

So you're aware, work we might take on soon:

  • Resolving a KVO bug related to prematurely deallocating player item
  • Converting the asset tracks loading to be asynchronous

cc @ghking @huebnerob

alfiehanssen avatar Dec 19 '15 21:12 alfiehanssen

Hey @alfiehanssen,

The idea behind wanting to use AVQueuePlayer is to offload playing a queue of items to the AVFoundation framework. I could certainly implement queuing myself (in the owning view controller or something similar) but that doesn't feel quite right since Apple provides AVQueuePlayer. I already have something functional that fits my use case. At some point soon, I will generalize my solution and submit a pull request.

Thanks!

hankjacobs avatar Dec 22 '15 18:12 hankjacobs