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 the KRAdapter protocol, so objects should also implement a type 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 a APSMediaUnit:

      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>"
                            ]
                        }
                    ]
                }
      

    Declaration

    Objective-C

    @protocol APSControlPluginProtocol <NSObject, KRAdapter>

    Swift

    protocol APSControlPluginProtocol : KRAdapter
  • Defines methods that need to be implemented by any object that want to register as an APSMediaBuilder plugin.

    See more

    Declaration

    Objective-C

    @protocol APSMediaBuilderPlugin <KRAdapter>

    Swift

    protocol APSMediaBuilderPlugin
  • The APSMediaEventProtocol protocol describes methods that objects extending the associated APSMediaEvent class must or can implement.

    See more

    Declaration

    Objective-C

    @protocol APSMediaEventProtocol <NSObject>

    Swift

    protocol APSMediaEventProtocol : NSObjectProtocol

Available Tracking Events

  • The APSMediaPlayerActionDelegate protocol declares the two methods that a class must implement in order to become an APSMediaPlayer actionDelegate. The object implementing APSMediaPlayer will receive information about the URLs that need to be executed as the user interacts with the player.

    See more

    Declaration

    Objective-C

    @protocol APSMediaPlayerActionDelegate <NSObject>

    Swift

    protocol APSMediaPlayerActionDelegate : NSObjectProtocol
  • The APSMediaPlayerOverlayController defines all the methods that a UIViewController subclass must or can implement to be able to register as an overlay controller with the player. This protocol extends the KRAdapter protocol, so objects should also implement a type 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>"
      
    See more

    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 a type 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]];
      
    See more

    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 more

    Declaration

    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 a type 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>"
      
    See more

    Declaration

    Objective-C

    @protocol APSUnitManagerProtocol <NSObject, KRAdapter>

    Swift

    protocol APSUnitManagerProtocol : KRAdapter
  • Protocol definition for APSVASTAdBreakDelegate

    See more

    Declaration

    Objective-C

    @protocol APSVASTAdBreakDelegate <NSObject>

    Swift

    protocol APSVASTAdBreakDelegate : NSObjectProtocol
  • The KRAdapter protocol allows an object to declare itself as being of a certain type.

    See more

    Declaration

    Objective-C

    @protocol KRAdapter <NSObject>

    Swift

    protocol KRAdapter : NSObjectProtocol