Contents

AVSystemRouteSession

An object that manages a single media playback session on a remote device.

Declaration

@interface AVSystemRouteSession : NSObject

Overview

AVSystemRouteSession manages a single media playback session on a remote device. Create a session to initiate playback on a connected device, communicate with a remote application, and control the lifecycle of the remote playback experience.

To use a session:

  1. Create an AVSystemRouteSession with a URL and launch mode

  2. Add the session to an AVSystemRoute using addSession:

  3. Start the session with startWithCompletionHandler:

  4. Use the returned AVSystemRouteMediaSession to communicate with the remote device

  5. Call stop when playback ends to clean up resources

Sessions are single-use. After calling stop, the session cannot be restarted or added to another route. Create a new AVSystemRouteSession for each new playback.

Reporting Playback Metadata

Report playback metadata to MPNowPlayingInfoCenter to ensure the system displays accurate information about the current media across a person’s devices and in system UI.

Topics

Instance Methods

See Also

Routes and sessions