APSMediaPlayerActionDelegate

Objective-C

@protocol APSMediaPlayerActionDelegate <NSObject>

Swift

protocol APSMediaPlayerActionDelegate : NSObjectProtocol

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.

  • Returns a Boolean value indicating whether the receiver is able to interpret and react to the given input NSURL.

    Declaration

    Objective-C

    - (BOOL)canRespondTo:(NSURL *_Nonnull)url;

    Swift

    func canRespond(to url: URL) -> Bool

    Parameters

    url

    The URL that needs to be launched.

    Return Value

    YES if the object can interpret and react to the given input URL, NO otherwise.

  • If the APSMediaPlayerActionDelegate implementing object returns YES from the canRespondTo method for a certain URL, this method will be triggered to request effective execution.

    Declaration

    Objective-C

    - (void)respondTo:(NSURL *_Nonnull)url;

    Swift

    func respond(to url: URL)

    Parameters

    url

    The URL that needs to be launched.