get Text Track Info
Retrieves detailed text track information for this player instance.
Provides a list of available text tracks, the currently selected track index, and the track type. Each track is represented as a Bundle containing track-specific metadata.
Example usage:
SurfaceView surfaceView = findViewById(R.id.surface_view);
SandboxedPlayer player = new SandboxedPlayer(context, surfaceView);
player.setObserver(this, isReady -> {
if (isReady) {
player.loadVideoSource("http://example.com/video.mp4", null);
TrackInfo textTrackInfo = player.getTextTrackInfo();
if (textTrackInfo != null) {
Log.d("Client", "Selected text track index: " + textTrackInfo.getSelectedIndex());
Log.d("Client", "Number of text tracks: " + textTrackInfo.getTracks().size());
}
}
});
Content copied to clipboard
Return
TrackInfo object containing a list of text tracks, the selected track index, and the track type, or null if no text track information is available.