You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (_targetTrackVideoFormat!=null||_targetTrackAudioFormat!=null) {
369
+
val tracks = exoPlayer?.player?.currentTracks;
370
+
if (tracks !=null) {
371
+
if (_targetTrackVideoFormat!=null) {
372
+
val group = tracks.groups.find { it.mediaTrackGroup.type ==C.TRACK_TYPE_VIDEO&& (0 until it.mediaTrackGroup.length).any { i -> it.mediaTrackGroup.getFormat(i) ==_targetTrackVideoFormat } };
373
+
if (group !=null) {
374
+
builder = builder.addOverride(TrackSelectionOverride(group.mediaTrackGroup, (0 until group.mediaTrackGroup.length).find { i -> group.mediaTrackGroup.getFormat(i) ==_targetTrackVideoFormat }!!));
375
+
}
376
+
}
377
+
if (_targetTrackAudioFormat!=null) {
378
+
val group = tracks.groups.find { it.mediaTrackGroup.type ==C.TRACK_TYPE_AUDIO&& (0 until it.mediaTrackGroup.length).any { i -> it.mediaTrackGroup.getFormat(i) ==_targetTrackAudioFormat } };
379
+
if (group !=null) {
380
+
builder = builder.addOverride(TrackSelectionOverride(group.mediaTrackGroup, (0 until group.mediaTrackGroup.length).find { i -> group.mediaTrackGroup.getFormat(i) ==_targetTrackAudioFormat }!!));
0 commit comments