Re: Playing videos on CALayer ?
Re: Playing videos on CALayer ?
- Subject: Re: Playing videos on CALayer ?
- From: Felix Franz via Cocoa-dev <email@hidden>
- Date: Mon, 28 Mar 2022 11:38:23 +0200
- Importance: Normal
Currently, my app displays images on a CALayer,
with some basic animation like so:
CABasicAnimation * anim = [CABasicAnimation animationWithKeyPath:
@"bounds.size"];
Now, I would like to include videos, too.
So, first of all, how would I put videos on such a CALayer, so that they get
played while the layer is visible? (without sound)
Would that interfere with the animation?
You can use a AVPlayerLayer
https://developer.apple.com/documentation/avfoundation/avplayerlayer to display
a video.
Sorry, don't remember if it interferes with animations.
Could some kind soul perhaps point me to some relevant literature,
or even to an example program?
a quick search revealed:
https://blog.prototypr.io/avfoundation-introduction-to-avplayerlayer-5ac63bb0aec0
Cheers,
Felix
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden