Retrieving current playback video and audio formats
Hello, I want to retrieve data about currently active tracks(Format).
When i am implementing TrackSelector.EventListener interface i have an onTrackSelectionsChanged() method which is triggered each time the track selection is changed. There i am trying to get the formats by player.getVideoFormat and player.getAudioFormat(). But when i am trying to get the format it is null. At least the one i am changing. As i understand, this happens because the onVideoDisabled() of the VideoRendererEventListener happens first. Is it a bug or it is me, who doing something wrong? Another question, is there any way to get the current TextFormat?
In Exo2 you can listen to AdaptiveMediaSourceEventListener.onDownStreamFormatChanged() event and check the trackType and save those trackFormat depending on the type. Then you always have the current Format for video/audio/text.
thank you for your help.