Adaptive Media Player

AmpCore Docs

AmpSharePlay

@available(iOS 15, tvOS 15, *)
@objc
open class AmpSharePlay : NSObject

Class in charge of handle configurations and events for SharePlay.

  • Flag to enables or disables the permisson to join in a SharePlay session.

    If enables when the user receive a SharePlay session request will show an alert to ask the user if want to join to the session. Default value true.

    Declaration

    Swift

    public var requiredPermissonToJoinSharePlay: Bool { get set }
  • Message displayed when it is not possible to join SharePlay because there is not a FaceTime session.

    Default value: “Join a FaceTime call to activate SharePlay”.

    Declaration

    Swift

    public var joinFaceTimeAlertMessage: String { get set }
  • Title displayed when it is not possible to join SharePlay because there is not a FaceTime session.

    Default value: “SharePlay”.

    Declaration

    Swift

    public var joinFaceTimeAlertTitle: String { get set }
  • Registers a new observer to be able to receive notifications of the SharePlay events.

    To remove a single observer you will need the returned ID.

    Declaration

    Swift

    @objc
    open func registerObserver(_ observer: SharePlayEventObserver) -> Int

    Parameters

    observer

    Instance of the observer to register.

    Return Value

    ID of the registered observer.