Use AVPlayerLayer which is a subclass of CALayer. Set your parent NSView as a 
layer backed view or as a layer hosting view. This process can be a little 
confusing.

Refer to Setting Up Layer Objects.

https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/CoreAnimation_guide/SettingUpLayerObjects/SettingUpLayerObjects.html

--Richard Charles

> On Sep 6, 2016, at 10:41 AM, Andreas Falkenhahn <andr...@falkenhahn.com> 
> wrote:
> 
> My NSWindow contains an NSView which I use to draw custom graphics to. It 
> doesn't
> contain any widgets like buttons at all, just custom graphics drawn in 
> drawRect().
> 
> Now I'd like to have an AVPlayerView NSView on top of this view. Thus, I 
> tried to
> add this AVPlayerView on top of the NSView by doing the following:
> 
>    [view addSubview:playerview];
> 
> However, this didn't work and generated lots of debug output to stderr. What 
> is
> the way to add an AVPlayerView on top of my window's NSView?
> 
> -- 
> Best regards,
> Andreas Falkenhahn                          mailto:andr...@falkenhahn.com

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to