diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 0ccde8e7026..fc4a0204e69 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -3,6 +3,7 @@ ### Unreleased changes * Common Library: + * Add `Format.labels` to allow localized or other alternative labels. * ExoPlayer: * Fix issue where `PreloadMediaPeriod` cannot retain the streams when it is preloaded again. @@ -100,6 +101,8 @@ * RTMP Extension: * HLS Extension: * DASH Extension: + * Populate all `Label` elements from the manifest into `Format.labels` + ([#1054](https://github.com/androidx/media/pull/1054)). * Smooth Streaming Extension: * RTSP Extension: * Skip empty session information values (i-tags) in SDP parsing diff --git a/libraries/common/src/main/java/androidx/media3/common/Format.java b/libraries/common/src/main/java/androidx/media3/common/Format.java index 1a9a77a2141..cda7ac23e9d 100644 --- a/libraries/common/src/main/java/androidx/media3/common/Format.java +++ b/libraries/common/src/main/java/androidx/media3/common/Format.java @@ -15,15 +15,18 @@ */ package androidx.media3.common; +import static androidx.media3.common.util.Assertions.checkState; import static java.lang.annotation.ElementType.TYPE_USE; import android.os.Bundle; +import android.text.TextUtils; import androidx.annotation.IntDef; import androidx.annotation.Nullable; import androidx.media3.common.util.BundleCollectionUtil; import androidx.media3.common.util.UnstableApi; import androidx.media3.common.util.Util; import com.google.common.base.Joiner; +import com.google.common.collect.ImmutableList; import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.lang.annotation.Documented; import java.lang.annotation.Retention; @@ -50,6 +53,7 @@ *