Other Protocols
The following protocols are available globally.
-
The
APSControlPluginProtocol
allows the definition of 3rd party buttons that need to be displayed in the Veeplay control bar. This protocol extends theKRAdapter
protocol, so objects should also implement atype
method, returning a unique string to register under.To use:
- Create a new class that implements this protocol
Register it with the player shared instance:
[[APSMediaPlayer sharedInstance] registerAdapter:[<YOURCLASS> new] inGroup:kAPSMediaPlayerControlPluginsGroup];
Use the
constant
to programatically add to the control components of aAPSMediaUnit
:unit.controlsParameters = @{kAPSControlsComponents: @(APSPlaybackControl|APSTotalTimeControl|<YOURCONSTANT>|APSFullScreenControl)};
Alternatively, use the
stringConstant
in your JSON configuration:{ "content": [ "url": "http://......", "autoplay": true, "controls": { "components": [ "playback", "totalTime", "slider", "currentTime", "<YOURSTRINGCONSTANT>" ] } ] }
-
Defines methods that need to be implemented by any object that want to register as an
See moreAPSMediaBuilder
plugin.Declaration
Objective-C
@protocol APSMediaBuilderPlugin <KRAdapter>
Swift
protocol APSMediaBuilderPlugin
-
The
See moreAPSMediaEventProtocol
protocol describes methods that objects extending the associatedAPSMediaEvent
class must or can implement.Declaration
Objective-C
@protocol APSMediaEventProtocol <NSObject>
Swift
protocol APSMediaEventProtocol : NSObjectProtocol
-
The
See moreAPSMediaPlayerActionDelegate
protocol declares the two methods that a class must implement in order to become anAPSMediaPlayer
actionDelegate. The object implementingAPSMediaPlayer
will receive information about the URLs that need to be executed as the user interacts with the player.Declaration
Objective-C
@protocol APSMediaPlayerActionDelegate <NSObject>
Swift
protocol APSMediaPlayerActionDelegate : NSObjectProtocol
-
The
APSMediaPlayerOverlayController
defines all the methods that aUIViewController
subclass must or can implement to be able to register as an overlay controller with the player. This protocol extends theKRAdapter
protocol, so objects should also implement atype
method, returning a unique string to register under.To use:
- Create a new class that implements this protocol
Register it with the player shared instance:
[[APSMediaPlayer sharedInstance] registerClass:[<YOURCLASS> class] inGroup:kAPSMediaPlayerOverlayControllersGroup];
Set up with the
APSMediaOverlay
:overlay.type = @"<YOURSTRINGCONSTANT>"
Declaration
Objective-C
@protocol APSMediaPlayerOverlayControllerProtocol <KRAdapter>
Swift
protocol APSMediaPlayerOverlayControllerProtocol
-
This protocol allows 3rd party implementations of the media rendering engine that stands behind Veeplay. This protocol extends the
KRAdapter
protocol, so objects should also implement atype
method, returning a unique string to register under.To use:
- Create a new class that implements this protocol
Register it with the player shared instance:
[[APSMediaPlayer sharedInstance] registerClass:[<YOURCLASS> class] inGroup:kAPSMediaPlayerBackendsGroup];
Set up the class with the player:
[[APSMediaPlayer sharedInstance] setBackendPlayerClass:[<YOURCLASS> class]];
Declaration
Objective-C
@protocol APSMediaPlayerProtocol <NSObject>
Swift
protocol APSMediaPlayerProtocol : NSObjectProtocol
-
Defines the properties that an object needs to implement to become trackable by the player.
See moreDeclaration
Objective-C
@protocol APSMediaTrackableObject <NSObject>
Swift
protocol APSMediaTrackableObject : NSObjectProtocol
-
- This protocol provides an interface for external objects that implement dynamic playback operations. Use this if you need to generate media URLs using timestamps or for implementing DRM support.
This protocol extends the
KRAdapter
protocol, so objects should also implement atype
method, returning a unique string to register under.To use:
- Create a new class that implements this protocol
Register it with the player shared instance:
[[APSMediaPlayer sharedInstance] registerUnitManager:[<YOURCLASS> new]];
Set up with the
APSMediaUnit
:unit.managerType = @"<YOURSTRINGCONSTANT>"
-
Protocol definition for APSVASTAdBreakDelegate
See moreDeclaration
Objective-C
@protocol APSVASTAdBreakDelegate <NSObject>
Swift
protocol APSVASTAdBreakDelegate : NSObjectProtocol
-
The
See moreKRAdapter
protocol allows an object to declare itself as being of a certain type.Declaration
Objective-C
@protocol KRAdapter <NSObject>
Swift
protocol KRAdapter : NSObjectProtocol