mirror of
https://github.com/tapframe/NuvioStreaming.git
synced 2026-03-11 17:45:38 +00:00
fix
This commit is contained in:
parent
4203ad18be
commit
9b65bc95a0
1 changed files with 13 additions and 3 deletions
|
|
@ -1599,10 +1599,17 @@ 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 into title so JS can read it e.g. "English|ch:6"
|
||||
// Encode channel count and bitrate into title so JS can read them reliably
|
||||
// e.g. "English|ch:6|br:640000"
|
||||
String existing = audioTrack.getTitle() != null ? audioTrack.getTitle() : "";
|
||||
if (format.channelCount != Format.NO_VALUE && format.channelCount > 0) {
|
||||
String existing = audioTrack.getTitle() != null ? audioTrack.getTitle() : "";
|
||||
audioTrack.setTitle(existing + "|ch:" + format.channelCount);
|
||||
existing = existing + "|ch:" + format.channelCount;
|
||||
}
|
||||
if (format.bitrate != Format.NO_VALUE && format.bitrate > 0) {
|
||||
existing = existing + "|br:" + format.bitrate;
|
||||
}
|
||||
if (!existing.isEmpty()) {
|
||||
audioTrack.setTitle(existing);
|
||||
}
|
||||
audioTracks.add(audioTrack);
|
||||
}
|
||||
|
|
@ -1803,6 +1810,9 @@ public class ReactExoplayerView extends FrameLayout implements
|
|||
if (format.channelCount != Format.NO_VALUE && format.channelCount > 0) {
|
||||
baseTitle = baseTitle + "|ch:" + format.channelCount;
|
||||
}
|
||||
if (format.bitrate != Format.NO_VALUE && format.bitrate > 0) {
|
||||
baseTitle = baseTitle + "|br:" + format.bitrate;
|
||||
}
|
||||
track.setTitle(baseTitle);
|
||||
track.setSelected(false); // Don't report selection status - let PlayerView handle it
|
||||
if (format.sampleMimeType != null)
|
||||
|
|
|
|||
Loading…
Reference in a new issue