Skip to content

Commit 74fb05c

Browse files
Samrobboojw28
authored andcommitted
Update MediaMetadata javadoc to clarify nuances.
PiperOrigin-RevId: 405616711
1 parent 0ad1cdb commit 74fb05c

File tree

1 file changed

+5
-1
lines changed
  • library/common/src/main/java/com/google/android/exoplayer2

1 file changed

+5
-1
lines changed

library/common/src/main/java/com/google/android/exoplayer2/Player.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,11 @@ default void onTracksInfoChanged(TracksInfo tracksInfo) {}
141141
*
142142
*

The provided {@link MediaMetadata} is a combination of the {@link MediaItem#mediaMetadata}

143143
* and the static and dynamic metadata from the {@link TrackSelection#getFormat(int) track
144-
* selections' formats} and {@link Listener#onMetadata(Metadata)}.
144+
* selections' formats} and {@link Listener#onMetadata(Metadata)}. If a field is populated in
145+
* the {@link MediaItem#mediaMetadata}, it will be prioritised above the same field coming from
146+
* static or dynamic metadata.
147+
*
148+
*

This method may be called multiple times in quick succession.

145149
*
146150
*

{@link #onEvents(Player, Events)} will also be called to report this event along with

147151
* other events that happen in the same {@link Looper} message queue iteration.

0 commit comments

Comments
 (0)