diff --git a/node_modules/react-native-video/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java b/node_modules/react-native-video/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java index 95cbeb9e..7db96bd3 100644 --- a/node_modules/react-native-video/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java +++ b/node_modules/react-native-video/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java @@ -1599,8 +1599,8 @@ public class ReactExoplayerView extends FrameLayout implements Track audioTrack = exoplayerTrackToGenericTrack(format, groupIndex, selection, group); audioTrack.setBitrate(format.bitrate == Format.NO_VALUE ? 0 : format.bitrate); audioTrack.setSelected(isSelected); - // Encode channel count and bitrate into title so JS can read them reliably - // e.g. "English|ch:6|br:640000" + // Encode channel count, bitrate and mimeType into title so JS can read them reliably + // e.g. "English|ch:6|br:640000|mt:audio/ac3" String existing = audioTrack.getTitle() != null ? audioTrack.getTitle() : ""; if (format.channelCount != Format.NO_VALUE && format.channelCount > 0) { existing = existing + "|ch:" + format.channelCount; @@ -1616,6 +1616,9 @@ public class ReactExoplayerView extends FrameLayout implements if (effectiveBitrate != Format.NO_VALUE && effectiveBitrate > 0) { existing = existing + "|br:" + effectiveBitrate; } + if (format.sampleMimeType != null && !format.sampleMimeType.isEmpty()) { + existing = existing + "|mt:" + format.sampleMimeType; + } if (!existing.isEmpty()) { audioTrack.setTitle(existing); } @@ -1829,6 +1832,9 @@ public class ReactExoplayerView extends FrameLayout implements if (effectiveBitrate != Format.NO_VALUE && effectiveBitrate > 0) { baseTitle = baseTitle + "|br:" + effectiveBitrate; } + if (format.sampleMimeType != null && !format.sampleMimeType.isEmpty()) { + baseTitle = baseTitle + "|mt:" + format.sampleMimeType; + } track.setTitle(baseTitle); track.setSelected(false); // Don't report selection status - let PlayerView handle it if (format.sampleMimeType != null)