---
title: "startSession(_:identifier:url:)"
framework: mediadevice
role: symbol
role_heading: Instance Method
path: "mediadevice/mediadeviceextension/startsession(_:identifier:url:)"
---

# startSession(_:identifier:url:)

Called when media playback or a remote application should be started on a remote device.

## Declaration

```swift
@MainActor func startSession(_ session: MediaOutputSession, identifier: String?, url: URL)
```

## Parameters

- `session`: The session associated with the playback request.
- `identifier`: The application identifier for the remote application. If nil, the extension should provide a default media playback experience on the remote device.
- `url`: The URL identifying the media content or application specific URL for the remote application.

## Mentioned in

Creating a media device extension
