Android Question Only show seekbar of Exoplayer and rewind/fastforward

Sifu

Active Member
Hello,
I have 2 questions for Exoplayer,

1-is it possible to only show the seekbar/progressbar and time of the Exoplayer, and not the buttons?
If yes how to do that?
playing with these settings sometimes I only see the rewind/fastforward and not play stop, but that's probably a glitch
B4X:
SimpleExoPlayerView1.UseController = False 
    VideoPlayers.Put(SimpleExoPlayerView1, True)
    Dim jo As JavaObject = SimpleExoPlayerView1
    jo.RunMethod("setControllerShowTimeoutMs", Array(1))
    jo.RunMethod("setControllerHideOnTouch", Array(True))

2-I know how to use separate button to control Previous,Next, play and Pause. with:
B4X:
playerJ.As(JavaObject).GetFieldJO("player").RunMethod("next", Null)
But how to use rewind and fastforward? If i'm correct it is seekTo, but how to do that. I saw somewhere they used p=p+5000 and p=p-5000 for a 5 second jump, but how to implement that?

Thanks for any help.
 

Sifu

Active Member
The control of rewind and fastforward works perfect with separate buttons.

I change the color of the buttons, so they are not visible, but they still work no matter the setting in the designer.
I'm not sure how to move the buttons of the controller outside of the screen.
It seems padding in the designer at the explayer does nothing, I expected with padding 0,0,0,60 to push it all up so only the seekbar stays visible, as it is now only visible at a certain height of the player.

I tried some with this:
B4X:
SimpleExoPlayerView1.UseController = True 'visibility of player controls
    VideoPlayers.Put(SimpleExoPlayerView1, True)
    Dim jo As JavaObject = SimpleExoPlayerView1 
    jo.RunMethod("setControllerShowTimeoutMs", Array(0)) 'this stops controlbuttons from fading away on player
    jo.RunMethod("setControllerHideOnTouch", Array(False)) 'this line prevents remove of controls, when touch on outer left or right side
[CODE]
But that seems similar to the settings at the player in the designer.
Or I should use a separate seekbar.

On the other hand, if I could catch the Next and Previous buttons of the player itself, then probably I'm also helped. As now I use separate buttons to go to the next track and load the next image.

What would be the best approach?
Thanks.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…