Android Question Video play speed for SimpleExoPlayer

Cesaral

Member
I have been reading many threads about the SimpleExoPlayer object, and I have not bene able to set up the Play speed using this class.

Could someone post a short example showing how to do it?

Thanks!
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
B4X:
Private Sub CreatePlaybackParameters(speed As Float, pitch As Float) As JavaObject
    Dim pp As JavaObject
    pp.InitializeNewInstance("com.google.android.exoplayer2.PlaybackParameters", Array(speed, pitch))
    Return pp
End Sub

Usage:
B4X:
player1.As(JavaObject).GetFieldJO("player").RunMethod("setPlaybackParameters", Array(CreatePlaybackParameters(2, 1)))
player1 - SimpleExoPlayer
 
Upvote 0
Top