我有m3u8 Hls Url,如何在Exoplayer视频属性中找到视频是垂直还是水平。
将事件侦听器添加到您的MediaSource并覆盖onLoadCompleted
MediaSource mediaSource = buildMediaSource(url);
mediaSource.addEventListener(new Handler(), new DefaultMediaSourceEventListener() {
@Override
public void onLoadCompleted(int windowIndex, @Nullable MediaSource.MediaPeriodId mediaPeriodId, LoadEventInfo loadEventInfo, MediaLoadData mediaLoadData) {
super.onLoadCompleted(windowIndex, mediaPeriodId, loadEventInfo, mediaLoadData);
if(mediaLoadData.trackFormat.width > mediaLoadData.trackFormat.height){
}else{
}
}
});