Class ContentMetadataMutations
- java.lang.Object
-
- com.google.android.exoplayer2.upstream.cache.ContentMetadataMutations
-
@Deprecated public class ContentMetadataMutations extends Object
Deprecated.com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.Defines multiple mutations on metadata value which are applied atomically. This class isn't thread safe.
-
-
Constructor Summary
Constructors Constructor Description ContentMetadataMutations()Deprecated.Constructs a DefaultMetadataMutations.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Map<String,Object>getEditedValues()Deprecated.Returns a map of metadata name, value pairs to be set.List<String>getRemovedValues()Deprecated.Returns a list of names of metadata values to be removed.ContentMetadataMutationsremove(String name)Deprecated.Adds a mutation to remove a metadata value.ContentMetadataMutationsset(String name, byte[] value)Deprecated.Adds a mutation to set a metadata value.ContentMetadataMutationsset(String name, long value)Deprecated.Adds a mutation to set a metadata value.ContentMetadataMutationsset(String name, String value)Deprecated.Adds a mutation to set a metadata value.static ContentMetadataMutationssetContentLength(ContentMetadataMutations mutations, long length)Deprecated.Adds a mutation to set theContentMetadata.KEY_CONTENT_LENGTHvalue, or to remove any existing value ifC.LENGTH_UNSETis passed.static ContentMetadataMutationssetRedirectedUri(ContentMetadataMutations mutations, Uri uri)Deprecated.Adds a mutation to set theContentMetadata.KEY_REDIRECTED_URIvalue, or to remove any existing entry ifnullis passed.
-
-
-
Method Detail
-
setContentLength
public static ContentMetadataMutations setContentLength(ContentMetadataMutations mutations, long length)
Deprecated.Adds a mutation to set theContentMetadata.KEY_CONTENT_LENGTHvalue, or to remove any existing value ifC.LENGTH_UNSETis passed.- Parameters:
mutations- The mutations to modify.length- The length value, orC.LENGTH_UNSETto remove any existing entry.- Returns:
- The mutations instance, for convenience.
-
setRedirectedUri
public static ContentMetadataMutations setRedirectedUri(ContentMetadataMutations mutations, @Nullable Uri uri)
Deprecated.Adds a mutation to set theContentMetadata.KEY_REDIRECTED_URIvalue, or to remove any existing entry ifnullis passed.- Parameters:
mutations- The mutations to modify.uri- TheUrivalue, ornullto remove any existing entry.- Returns:
- The mutations instance, for convenience.
-
set
@CanIgnoreReturnValue public ContentMetadataMutations set(String name, String value)
Deprecated.Adds a mutation to set a metadata value.- Parameters:
name- The name of the metadata value.value- The value to be set.- Returns:
- This instance, for convenience.
-
set
@CanIgnoreReturnValue public ContentMetadataMutations set(String name, long value)
Deprecated.Adds a mutation to set a metadata value.- Parameters:
name- The name of the metadata value.value- The value to be set.- Returns:
- This instance, for convenience.
-
set
@CanIgnoreReturnValue public ContentMetadataMutations set(String name, byte[] value)
Deprecated.Adds a mutation to set a metadata value.- Parameters:
name- The name of the metadata value.value- The value to be set.- Returns:
- This instance, for convenience.
-
remove
@CanIgnoreReturnValue public ContentMetadataMutations remove(String name)
Deprecated.Adds a mutation to remove a metadata value.- Parameters:
name- The name of the metadata value.- Returns:
- This instance, for convenience.
-
getRemovedValues
public List<String> getRemovedValues()
Deprecated.Returns a list of names of metadata values to be removed.
-
-