Android Question Why is Turning Off Video Controller Simple Media Manager (SMM) via B4xtable-Album is not Working?

omo

Active Member
Licensed User
Longtime User
I tried turning it off with this code below, but no success thus:
B4X:
    Dim Player As SimpleExoPlayer
    Dim PlayerView As SimpleExoPlayerView
    PlayerView = pnl.GetView(0).GetView(0) 'I also changed it to: pnl.GetView(1).GetView(0), but it didnt work
    
    PlayerView.UseController = False   'now turn off usecontroller
    
    Player = PlayerView.Tag
    Player.Play
 

JohnC

Expert
Licensed User
Longtime User
Please do not use all caps for the title to your posts :)
 
Upvote 0

omo

Active Member
Licensed User
Longtime User
Thank you so much Erel and sorry for late response, i wasnt available in the forum to respond on time. i tried to modify it like:
B4X:
MediaManager.SetMediaWithExtra(pnl, xui.DefaultFolder & "/myalbum/"&filenm, tq, CreateMap(MediaManager.REQUEST_CALLBACK: Me))

                        Wait For (pnl) SMM_MediaReady (Success As Boolean, Mediab As SMMedia)
                        If Success = True Then
                            Dim playerview As SimpleExoPlayerView = pnl.GetView(0).GetView(0) ' .tag '
                            playerview.UseController = False
                            playerview.ResizeMode = "FIT"
                            Dim player As SimpleExoPlayer = playerview.Tag
                            player.Play
                        End If

When i run it, it hangs then exit. Note that this is SMM in b4xtable-album and not ordinary SMM. Which one is the right reference of this line:
Dim playerview As SimpleExoPlayerView = pnl.GetView(0).GetView(0)

is it pnl.GetView(0).GetView(0) or pnl.GetView(1).GetView(0) or pnl.GetView(1).GetView(0).GetView(0) ?
Note: I always use: pnl.GetView(0).GetView(0) with ordinary SMM which normally works fine, but not seems to work with b4xtable-album
 
Upvote 0
Top