如何从选择列表中删除“无”选项,任何提示将不胜感激! 这是我的代码,用于从URL获取支持的比特率。
MappingTrackSelector.MappedTrackInfo mappedTrackInfo = selector.getCurrentMappedTrackInfo();
if (mappedTrackInfo != null) {
int rendererIndex = 0;
int rendererType = mappedTrackInfo.getRendererType(rendererIndex);
boolean allowAdaptiveSelections =
rendererType == C.TRACK_TYPE_VIDEO
|| (rendererType == C.TRACK_TYPE_AUDIO
&& mappedTrackInfo.getTypeSupport(C.TRACK_TYPE_VIDEO)
== MappingTrackSelector.MappedTrackInfo.RENDERER_SUPPORT_NO_TRACKS);
Pair<AlertDialog, TrackSelectionView> dialogPair =
TrackSelectionView.getDialog(VideoStream.this, "Available Quality", (DefaultTrackSelector) selector, rendererIndex);
dialogPair.second.setShowDisableOption(true);
dialogPair.second.setAllowAdaptiveSelections(allowAdaptiveSelections);
dialogPair.first.show();
}
**和输出** OUTPUT Image
答案 0 :(得分:0)
可以通过删除以下行来完成。
dialogPair.second.setShowDisableOption(true);