SharePlayManager

public protocol SharePlayManager

Undocumented

  • The delegate to get callbacks on SharePlay activities.

    Declaration

    Swift

    var delegate: SharePlayDelegate? { get set }
  • API to start SharePlay

    Declaration

    Swift

    func sharePlay(with asset: SharePlayAsset)

    Parameters

    asset

    Construct and pass a instance of typeSharePlayAsset required for a successful playback.

  • API to setup coordination of playback for all the users in a SharePlay session. Must be invoked after Player creation to sync playback for all users.

    Declaration

    Swift

    func coordinate(with player: Player?)
  • API to check if user is on FaceTime call and can participate in a SharePlay experience.

    Declaration

    Swift

    func canSharePlay() -> Bool
  • API to check if SharePlay user has valid session.

    Declaration

    Swift

    func isConnected() -> Bool
  • API to close an on-going playback only for local user. This ends the SharePlay Session for current user. Note: Use this API to terminate the SharePlay Session for current user and not for other users. Use endSharePlaySession() to terminate session for everyone. Example use-case: User wants to close the playback and leave the FaceTime call.

    Declaration

    Swift

    func leaveSharePlaySession()
  • Ends the SharePlay Session for all users. API to end an on-going playback for all the users in SharePlay.

    Declaration

    Swift

    func endSharePlaySession()