---
title: mediaServicesWereLostNotification
framework: avfaudio
role: symbol
role_heading: Type Property
path: avfaudio/avaudiosession/mediaserviceswerelostnotification
---

# mediaServicesWereLostNotification

A notification the system posts when it terminates the media server.

## Declaration

```swift
class let mediaServicesWereLostNotification: NSNotification.Name
```

## Discussion

Discussion The system posts this notification when the media server first becomes unavailable. Most apps don’t need to subscribe to this notification and should instead subscribe to the mediaServicesWereResetNotification notification. However, you can use this notification as a cue to take any appropriate steps to handle requests that come in before the server restarts. This notification has no userInfo dictionary. The system posts this notification on the main thread.

## See Also

### Handling a change of media services

- [mediaServicesWereResetNotification](avfaudio/avaudiosession/mediaserviceswereresetnotification.md)
