getInputStream

abstract fun getInputStream(context: Context): InputStream

Returns an InputStream for a MediaItem.

Return

an InputStream for the content in the MediaItem.

Parameters

context

Any Context, used to get a ContentResolver

Throws

May throw RuntimeExceptions when media could not be retrieved / no media file has been found for the given mediaItem (e.g. just about to be stored). In short: library consumers should handle when this method throws an Exception.