---
title: mediaSources
framework: medialibrary
role: symbol
role_heading: Instance Property
path: medialibrary/mlmedialibrary/mediasources
---

# mediaSources

Returns a dictionary of media sources by identifier.

## Declaration

```swift
var mediaSources: [String : MLMediaSource]? { get }
```

## Discussion

Discussion Returns nil the first time, beginning an asynchronous load of the media sources. A KVO notification is sent when all media sources have been loaded. If there are no objects in a media source, the source does not appear in this dictionary.
