UriMediaItem

Added in 1.0.0
Deprecated in 1.3.0

public class UriMediaItem extends MediaItem


Structure for media item descriptor for Uri.

Users should use Builder to create UriMediaItem.

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

See also
MediaItem

Summary

Nested types

public final class UriMediaItem.Builder extends MediaItem.Builder

This class is deprecated.

androidx.media2 is deprecated.

Public methods

@NonNull Uri

Return the Uri of this media item.

@Nullable List<HttpCookie>

Return the Uri cookies of this media item.

@Nullable Map<StringString>

Return the Uri headers of this media item.

Inherited Constants

From androidx.media2.common.MediaItem
static final long
POSITION_UNKNOWN = 576460752303423487

Used when a position is unknown.

Inherited methods

From androidx.media2.common.MediaItem
long

Return the position in milliseconds at which the playback will end.

@Nullable MediaMetadata

Gets the metadata of the media.

long

Return the position in milliseconds at which the playback will start.

void

Sets metadata.

String

Public methods

getUri

Added in 1.0.0
Deprecated in 1.3.0
public @NonNull Uri getUri()

Return the Uri of this media item.

Returns
@NonNull Uri

the Uri of this media item

getUriCookies

Added in 1.0.0
Deprecated in 1.3.0
public @Nullable List<HttpCookiegetUriCookies()

Return the Uri cookies of this media item.

Returns
@Nullable List<HttpCookie>

the Uri cookies of this media item

getUriHeaders

Added in 1.0.0
Deprecated in 1.3.0
public @Nullable Map<StringStringgetUriHeaders()

Return the Uri headers of this media item.

Returns
@Nullable Map<StringString>

the Uri headers of this media item