FileMediaItem

public class FileMediaItem
extends MediaItem

java.lang.Object
   ↳ androidx.media2.common.MediaItem
     ↳ androidx.media2.common.FileMediaItem


Structure for media item for a file.

Users should use FileMediaItem.Builder to create FileMediaItem.

You cannot directly send this object across the process through ParcelUtils. See MediaItem for detail.

See also:

Summary

Nested classes

class FileMediaItem.Builder

This Builder class simplifies the creation of a FileMediaItem object. 

Constants

long FD_LENGTH_UNKNOWN

Used when the length of file descriptor is unknown.

Inherited constants

Public methods

long getFileDescriptorLength()

Returns the content length associated with the ParcelFileDescriptor of this media item.

long getFileDescriptorOffset()

Returns the offset associated with the ParcelFileDescriptor of this media item.

ParcelFileDescriptor getParcelFileDescriptor()

Returns the ParcelFileDescriptor of this media item.

Inherited methods