availableMedia

@get:CheckReturnValue
abstract val availableMedia: Observable<List<AvailableMediaItem>>

The emitted Observable emits a list of available media items on the remote device. The list will only retrieve new items / updates, when an active connection to a remote device is established (i.e. when this MediaClients connectionState is in the ConnectedToPreview or ConnectedToMediaDownload state).

This will most often be the same list as emitted by availableThumbnails. However, as the availableThumbnails list contains the thumbnails as data as well, which often needs to be fetched separately, this Observable will receive faster updates. So if the thumbnail is not actually used for your purpose, but only the filename of the available items, it may be best to rely on this Observable than on availableThumbnails.

The returned objects of the type AvailableMediaItem contains the fileName, the corresponding mediaType of the media item as well as a convenience getter to get the dateTime of the media item.

The returned list of fileNames will be ordered by the newest item being emitted as first item in the list.

Scheduler: The returned Observable will operate on the IO Scheduler.

See also