Hellow, finally after searching i have find the sollution, and the code is:
'*****************************************************************************
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Main")
PopulateVideoQualities
End Sub
Sub PopulateVideoQualities
Dim mp As B4XMainPage = B4XPages.MainPage
Dim jo As JavaObject = mp.Player
TrackGroups = jo.GetFieldJO("player").RunMethod("getCurrentTrackGroups", Null)
Dim videoQualities As List
videoQualities.Initialize
For i = 0 To TrackGroups.GetField("length") - 1
Dim TrackGroup As JavaObject = TrackGroups.RunMethod("get", Array(i))
For j = 0 To TrackGroup.GetField("length") - 1
Dim Format As JavaObject = TrackGroup.RunMethodJO("getFormat", Array(j))
Dim mime As String = Format.GetField("sampleMimeType")
If mime.StartsWith("video") Then
Dim width As Int = Format.GetField("width")
Dim height As Int = Format.GetField("height")
If width > 0 And height > 0 Then
Dim quality As String = width & ", " & height
videoQualities.Add(quality)
End If
End If
Next
Next
' Populate ListView with video qualities
For Each quality As String In videoQualities
lvQualities.AddSingleLine(quality)
Next
End Sub
Sub lvQualities_ItemClick (Position As Int, Value As Object)
Dim quality As String = Value
Dim parts() As String = Regex.Split(", ", quality)
Dim width As Int = parts(0)
Dim height As Int = parts(1)
SetVideoResolution(width, height)
End Sub
Private Sub SetVideoResolution(x As Int, y As Int)
Dim mp As B4XMainPage = B4XPages.MainPage
Dim jo As JavaObject = mp.Player
Dim trackSelector As JavaObject = jo.GetField("trackSelector")
trackSelector.RunMethod("setParameters", Array(trackSelector.RunMethodJO("buildUponParameters", Null).RunMethod("setMaxVideoSize", Array(x, y))))
End Sub