mirror of
https://github.com/tapframe/NuvioStreaming.git
synced 2026-03-11 17:45:38 +00:00
fix
This commit is contained in:
parent
b3d4953da2
commit
a75de21584
1 changed files with 8 additions and 2 deletions
|
|
@ -1599,8 +1599,8 @@ public class ReactExoplayerView extends FrameLayout implements
|
||||||
Track audioTrack = exoplayerTrackToGenericTrack(format, groupIndex, selection, group);
|
Track audioTrack = exoplayerTrackToGenericTrack(format, groupIndex, selection, group);
|
||||||
audioTrack.setBitrate(format.bitrate == Format.NO_VALUE ? 0 : format.bitrate);
|
audioTrack.setBitrate(format.bitrate == Format.NO_VALUE ? 0 : format.bitrate);
|
||||||
audioTrack.setSelected(isSelected);
|
audioTrack.setSelected(isSelected);
|
||||||
// Encode channel count and bitrate into title so JS can read them reliably
|
// Encode channel count, bitrate and mimeType into title so JS can read them reliably
|
||||||
// e.g. "English|ch:6|br:640000"
|
// e.g. "English|ch:6|br:640000|mt:audio/ac3"
|
||||||
String existing = audioTrack.getTitle() != null ? audioTrack.getTitle() : "";
|
String existing = audioTrack.getTitle() != null ? audioTrack.getTitle() : "";
|
||||||
if (format.channelCount != Format.NO_VALUE && format.channelCount > 0) {
|
if (format.channelCount != Format.NO_VALUE && format.channelCount > 0) {
|
||||||
existing = existing + "|ch:" + format.channelCount;
|
existing = existing + "|ch:" + format.channelCount;
|
||||||
|
|
@ -1616,6 +1616,9 @@ public class ReactExoplayerView extends FrameLayout implements
|
||||||
if (effectiveBitrate != Format.NO_VALUE && effectiveBitrate > 0) {
|
if (effectiveBitrate != Format.NO_VALUE && effectiveBitrate > 0) {
|
||||||
existing = existing + "|br:" + effectiveBitrate;
|
existing = existing + "|br:" + effectiveBitrate;
|
||||||
}
|
}
|
||||||
|
if (format.sampleMimeType != null && !format.sampleMimeType.isEmpty()) {
|
||||||
|
existing = existing + "|mt:" + format.sampleMimeType;
|
||||||
|
}
|
||||||
if (!existing.isEmpty()) {
|
if (!existing.isEmpty()) {
|
||||||
audioTrack.setTitle(existing);
|
audioTrack.setTitle(existing);
|
||||||
}
|
}
|
||||||
|
|
@ -1829,6 +1832,9 @@ public class ReactExoplayerView extends FrameLayout implements
|
||||||
if (effectiveBitrate != Format.NO_VALUE && effectiveBitrate > 0) {
|
if (effectiveBitrate != Format.NO_VALUE && effectiveBitrate > 0) {
|
||||||
baseTitle = baseTitle + "|br:" + effectiveBitrate;
|
baseTitle = baseTitle + "|br:" + effectiveBitrate;
|
||||||
}
|
}
|
||||||
|
if (format.sampleMimeType != null && !format.sampleMimeType.isEmpty()) {
|
||||||
|
baseTitle = baseTitle + "|mt:" + format.sampleMimeType;
|
||||||
|
}
|
||||||
track.setTitle(baseTitle);
|
track.setTitle(baseTitle);
|
||||||
track.setSelected(false); // Don't report selection status - let PlayerView handle it
|
track.setSelected(false); // Don't report selection status - let PlayerView handle it
|
||||||
if (format.sampleMimeType != null)
|
if (format.sampleMimeType != null)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue