Platforms to show: All Mac Windows Linux Cross-Platform
AVPlayerLayerMBS class
Super class: CALayerMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
The videoGravity property defines how the video content is displayed within the player layer's bounds rect.
The value for the contents key of a player layer is opaque and effectively read-only.
During playback, AVPlayer may compensate for temporal drift between its visual output and its audible output to one or more independently-clocked audio output devices by adjusting the timing of its associated player layers. The effects of these adjustments are usually very small; however, clients that wish to remain entirely unaffected by such adjustments may wish to place other layers for which timing is important into independently timed subtrees of their layer trees.
You can create arbitrary numbers of player layers with the same AVPlayer object. Only the most-recently-created player layer will actually display the video content on-screen.
Subclass of the CALayerMBS class.
- 2 properties
- property player as AVPlayerMBS
- property videoGravity as string
- 3 methods
- method Constructor(player as AVPlayerMBS)
- method isReadyForDisplay as boolean
- method videoRect as CGRectMBS
- shared method playerLayerWithPlayer(player as AVPlayerMBS) as AVPlayerLayerMBS
Super class CALayerMBS
- 41 properties
- property affineTransform as CGAffineTransformMBS
- property anchorPoint as CGRectMBS
- property anchorPointZ as Double
- property AutoresizingMask as Integer
- property backgroundColor as Variant
- property borderColor as Variant
- property borderWidth as Double
- property bounds as CGRectMBS
- property className as string
- property classPath as string
- property contents as Variant
- property contentsCenter as CGRectMBS
- property contentsRect as CGRectMBS
- property contentsScale as Double
- property cornerRadius as Double
- property DoubleSided as boolean
- property drawsAsynchronously as boolean
- property frame as CGRectMBS
- property Handle as Integer
- property Hidden as boolean
- property mask as CALayerMBS
- property masksToBounds as Boolean
- property minificationFilterBias as Double
- property modelLayer as CALayerMBS
- property needsDisplay as boolean
- property needsDisplayOnBoundsChange as boolean
- property needsLayout as boolean
- property opacity as Double
- property Opaque as boolean
- property position as CGRectMBS
- property preferredFrameSize as CGSizeMBS
- property presentationLayer as CALayerMBS
- property rasterizationScale as Double
- property shadowColor as Variant
- property shadowOffset as CGSizeMBS
- property shadowOpacity as Double
- property shadowPath as Variant
- property shadowRadius as Double
- property shouldRasterize as Boolean
- property superlayer as CALayerMBS
- property zPosition as Double
- 14 methods
- method addSublayer(layer as CALayerMBS)
- method Constructor
- method display
- method displayIfNeeded
- method layoutIfNeeded
- method layoutSublayers
- method removeAllAnimations
- method removeFromSuperlayer
- method renderInContext(CGContextHandle as Integer) as boolean
- method renderInPicture(Pic as Picture) as boolean
- method setNeedsDisplay
- method setNeedsDisplayInRect(r as CGRectMBS)
- method setNeedsLayout
- method sublayers as CALayerMBS()
- 4 shared methods
- shared method available as boolean
- shared method layer as CALayerMBS
- shared method layerFromHandle(Handle as Integer) as CALayerMBS
- shared method layerFromHandle(Handle as Ptr) as CALayerMBS
- 11 constants
Edge constants
Constant | Value | Description |
---|---|---|
kCALayerBottomEdge | 4 |
Specifies that the bottom edge of the receiver's content should be antialiased. |
kCALayerLeftEdge | 1 |
Specifies that the left edge of the receiver's content should be antialiased. |
kCALayerRightEdge | 2 |
Specifies that the right edge of the receiver's content should be antialiased. |
kCALayerTopEdge | 8 |
Specifies that the top edge of the receiver's content should be antialiased. |
Autoresize Mask Constants
Constant | Value | Description |
---|---|---|
kCALayerHeightSizable | 16 |
The receiver's height is flexible. |
kCALayerMaxXMargin | 4 |
The left margin between the receiver and its superview is flexible. |
kCALayerMaxYMargin | 32 |
The top margin between the receiver and its superview is flexible. |
kCALayerMinXMargin | 1 |
The left margin between the receiver and its superview is flexible. |
kCALayerMinYMargin | 8 |
The top margin between the receiver and its superview is flexible. |
kCALayerNotSizable | 0 |
The receiver cannot be resized. |
kCALayerWidthSizable | 2 |
The receiver's width is flexible. |
This class has no sub classes.
Some methods using this class:
- DesktopMoviePlayer.AVPlayerLayerMBS as AVPlayerLayerMBS
- MoviePlayer.AVPlayerLayerMBS as AVPlayerLayerMBS
Some examples using this class:
- /AVFoundation/Donut Video Player
- /AVFoundation/Donut Video Player Overlay
- /AVFoundation/Simple Player
- /AVFoundation/Transparent Player
The items on this page are in the following plugins: MBS AVFoundation Plugin, MBS MacCG Plugin.
AVPlayerItemVideoOutputMBS - AVPlayerLooperMBS