Getting Started
- 
                  
                  
The APSMediaPlayer handles playback and rendering of APSMediaUnits and APSMediaOverlays.
Notifications
- APSMediaPlayerToggleFullscreenNotification - Posted with each toggle of the fullscreen status
 - APSMediaPlayerWillEnterFullscreenNotification - Posted before the media player enters fullscreen
 - APSMediaPlayerDidEnterFullscreenNotification - Posted after the media player enters fullscreen
 - APSMediaPlayerWillExitFullscreenNotification - Posted before the media player exists fullscreen
 - APSMediaPlayerDidExitFullscreenNotification - Posted after the media player exits fullscreen
 - APSMediaPlayerWasTappedNotification - Posted when the user taps on the media player surface
 - APSMediaPlayerControlsDisplayedNotification - Posted when the video controls bar becomes visible
 - APSMediaPlayerControlsHiddenNotification - Posted when the video controls bar becomes hidden
 - APSMediaPlayerUpdateNotification - Posted every time the internal status of the media player changes. This will happen roughly once every second.
 - APSMediaPlayerUnitFinishedNotification - Posted when a media unit finishes playback, before the remaining playlist units are processed. The 
userInfodictionary contains the APSMediaUnit object that just finished playback under theKAPSMediaPlayerCurrentUnitkey. - APSMediaPlayerErrorNotification - Posted when the media player encounters an error in the process of unit playback. The 
userInfodictionary contains the NSError object that represents the error under thekAPSMediaPlayerErrorkey. - APSMediaPlayerStatusChangedNotification - Posted when the media player playback state has changed. You can immediately get the new state using the 
playbackStatemethod of the APSMediaPlayer instance. - APSMediaPlayerTrackedEventNotification - Posted when a trackable playback event occurs.
The 
userinfodictionary contains additional information about the tracked event: - the 
kAPSMediaPlayerEventDescriptionkey returns a string description of the tracked event - the 
kAPSMediaPlayerEventTypekey returns one of the possible event type constants - the 
kAPSMediaPlayerEventURLskey returns an array of NSURLs that were pinged to track the event - the 
kAPSMediaPlayerCurrentPlaybackTimekey returns the playback time when the event was triggered - the 
kAPSMediaPlayerCurrentDurationkey returns the total duration of the unit that triggered the event - the 
kAPSMediaPlayerErroris present in case the event signals an error - the 
kAPSMediaPlayerSeekStartis present forAPSMediaPlayerEventSeekedevents and indicates the playback time when the seek started - the 
kAPSMediaPlayerSeekTois present forAPSMediaPlayerEventSeekedevents and indicates the requested playback time to seek to - APSMediaPlayerInvalidLicenseNotification - Posted when the player license is invalid. Playback will be disabled.
 - APSMediaPlayerWillOpenMiniBrowser - Posted when the internal minibrowser will be opened.
 - APSMediaPlayerWillCloseMiniBrowser - Posted when the internal minibrowser will be dismissed.
 - APSMediaPlayerPlaybackDidFinishNotification - Posted when the internal player backend finished playback. The reason for playback finish in the form of a 
APSMovieFinishReasonvalue can be retrieved from the userInfo dictionary attached to the notification, under thekAPSMediaPlayerPlaybackDidFinishReasonkey. - APSMediaPlayerLoadStateDidChangeNotification - Posted when the media load state changed. Value can be retrieved from player shared instance.
 - APSMediaPlayerDurationAvailableNotification - Posted when the duration of the played media becomes available. Value can be retrieved from player shared instance.
 - APSMediaPlayerPlaybackStateDidChangeNotification - Posted when the media playback state changed. Value can be retrieved from player shared instance.
 - APSMediaPlayerVolumeDidChangeNotification - Posted when the volume changed. Value can be retrieved from player shared instance.
 
Adapter groups
- kAPSMediaPlayerOverlayControllersGroup - The group name that 3rd party overlay controllers must use when registering with the player. See 
APSMediaPlayerOverlayControllerProtocolfor more details. - kAPSMediaPlayerUnitManagersGroup - The group name that 3rd party unit managers must use when registering with the player. See 
APSUnitManagerProtocolfor more details. - kAPSMediaPlayerBackendsGroup - The group name that 3rd party backend renderers must use when registering with the player. See 
APSMediaPlayerProtocolfor more details. - kAPSMediaPlayerControlPluginsGroup - The group name that 3rd party control plugins must use when registering with the player. See 
APSControlPluginProtocolfor more details. 
Declaration
Objective-C
@interface APSMediaPlayer : KRHub <UIViewControllerTransitioningDelegate, UIViewControllerAnimatedTransitioning, SFSafariViewControllerDelegate>Swift
class APSMediaPlayer : KRHub, UIViewControllerTransitioningDelegate, UIViewControllerAnimatedTransitioning, SFSafariViewControllerDelegate - 
                  
                  
The
APSMediaBuilderassists in creating playlists of fully configurableAPSMediaUnits, together with attached, configurableAPSMediaOverlays, using JSON files or using aNSDictionary, both following the same structure.The media builder also has class methods that assist with the generation of individual
APSMediaUnitandAPSMediaOverlayobjects from corresponding JSON orNSDictionarystructures.Plugins can be attached to a media builder. Each plugin can dynamically insert, edit or remove units and/or overlays from the generated playlist.
See more - 
                  
                  
The
See moreAPSMediaUnitclass represents a clip that’s ready to be rendered by the player. A media unit also references an array ofAPSMediaOverlayobjects, defining the overlays connected to the unit.Declaration
Objective-C
@interface APSMediaUnit : NSObject <NSCopying, APSMediaTrackableObject>Swift
class APSMediaUnit : NSObject, NSCopying, APSMediaTrackableObject - 
                  
                  
The
See moreAPSMediaEventclass describes a container that developers can use to instruct the player to run specific blocks of code at specific moments of time. Objects extending this class and implementing the correspondingAPSMediaEventProtocolprotocol can be added to the player’s main queue and can also be attached to a specificAPSMediaUnitobject, for runtime triggering.Declaration
Objective-C
@interface APSMediaEvent : NSObject <APSMediaEventProtocol>Swift
class APSMediaEvent : NSObject, APSMediaEventProtocol - 
                  
                  
An
See moreAPSVASTAdBreakobject defines an ad break for which the builder plugin will try to generateAPSMediaUnits and insert them into the playlist.Declaration
Objective-C
@interface APSVASTAdBreak : APSMediaEvent <NSCopying, APSMediaTrackableObject>Swift
class APSVASTAdBreak : APSMediaEvent, NSCopying, APSMediaTrackableObject 
      Getting Started  Reference