APSMediaOverlay
Objective-C
@interface APSMediaOverlay : APSMediaEvent <NSCopying, APSMediaTrackableObject>
Swift
class APSMediaOverlay : APSMediaEvent, NSCopying, APSMediaTrackableObject
APSMediaOverlay
describes any overlay that the APSMediaPlayer
instance needs to render during playback.
-
Overlay type. The values that can be used with this property are usually constants defined by each individual overlay controller
Declaration
Objective-C
@property (nonatomic) NSString *_Nonnull type;
Swift
var type: String { get set }
-
Overlay parameters. Implementation-specific to overlay controllers.
Declaration
Objective-C
@property (nonatomic) NSMutableDictionary *_Nullable parameters;
Swift
var parameters: NSMutableDictionary? { get set }
-
Describes the position the overlay should take when placed on-screen by the player. See
APSMediaOverlayPosition
for available values.Declaration
Objective-C
@property (nonatomic) APSMediaOverlayPosition position;
Swift
var position: APSMediaOverlayPosition { get set }
-
The order of the overlay in the current view stack.
Declaration
Objective-C
@property (nonatomic) int zIndex;
Swift
var zIndex: Int32 { get set }
-
The width of the overlay. Supports pixels (e.g.: @“320”) or percentages, relative to the total width (e.g.: @“50%”).
Declaration
Objective-C
@property (nonatomic) NSString *_Nonnull width;
Swift
var width: String { get set }
-
The height of the overlay. Supports pixels (e.g.: @“320”) or percentages, relative to the total height (e.g.: @“50%”).
Declaration
Objective-C
@property (nonatomic) NSString *_Nonnull height;
Swift
var height: String { get set }
-
The overlay’s absolute horizontal offset, relative to the current origin. The current origin is determined by the overlay’s
position
parameter, while the positive direction is always toward the center of the player surface. Supports pixels (e.g.: @“320”) or percentages, relative to the total width (e.g.: @“50%”).Declaration
Objective-C
@property (nonatomic) NSString *_Nullable absoluteOffsetX;
Swift
var absoluteOffsetX: String? { get set }
-
The overlay’s absolute vertical offset, relative to the current origin. The current origin is determined by the overlay’s
position
parameter, while the positive direction is always toward the center of the player surface. Supports pixels (e.g.: @“320”) or percentages, relative to the total height (e.g.: @“50%”).Declaration
Objective-C
@property (nonatomic) NSString *_Nullable absoluteOffsetY;
Swift
var absoluteOffsetY: String? { get set }
-
The duration (in seconds) for the fade in effect of the overlay, when it is placed on and taken off screen.
Declaration
Objective-C
@property (nonatomic) CGFloat fadeInDuration;
Swift
var fadeInDuration: CGFloat { get set }
-
Defines if the overlay should be removed from memory when its’ opacity becomes zero.
Declaration
Objective-C
@property (nonatomic) BOOL removeWhenHidden;
Swift
var removeWhenHidden: Bool { get set }
-
After being added to a
APSMediaUnit
object, a reference to this parent can be found here.Declaration
Objective-C
@property (nonatomic, weak) APSMediaUnit *_Nullable parentUnit;
Swift
weak var parentUnit: APSMediaUnit? { get set }
-
A refence to the overlay controller object. This is set by the player, on the overlay’s initial render.
Declaration
Objective-C
@property (nonatomic) APSMediaPlayerOverlayController *_Nullable controller;
Swift
var controller: APSMediaPlayerOverlayController? { get set }
-
Additional overlay information.
Declaration
Objective-C
@property (nonatomic) NSMutableDictionary *_Nullable metadata;
Swift
var metadata: NSMutableDictionary? { get set }
-
Converts a string format to a APSMediaOverlayPosition value.
- “top”
- “topLeft”
- “topRight”
- “bottomLeft”
- “bottomRight”
- “bottom”
“fullscreen”
Declaration
Objective-C
+ (APSMediaOverlayPosition)positionFromString:(NSString *_Nonnull)position;
Swift
class func position(from position: String) -> APSMediaOverlayPosition
Parameters
position
The position of the overlay. Possible values are:
Return Value
The APSMediaOverlayPosition value coresponding to the string format.