0

I'm new to using AVKit and was wondering if it was possible to mask a player onto a UIView. So the frame of the video is the frame of the cell.

If so where / how would I implement this.

Additionally,

If you know of any AVKit quick start guides or tutorials that'd be helpful.

Stefan
  • 908
  • 1
  • 11
  • 33

1 Answers1

1

yes, basically all you have to do is call self.view.addSubview(AVPlayerLayer), and this is a layer for the APPlayer; after you instantiate the cell view, then make sure that AVPlayer.frame = view.bounds

andrewF
  • 54
  • 8
  • I think it should be self.view.layer.addSublayer(playerLayer) and frame should be set on playerLayer because AVPlayer is not a UIView and does not have a .frame property. – Baglan Jun 10 '17 at 06:42