Wish SMM access to the MediaViewController (B4J)

TILogistic

Expert
Licensed User
Longtime User
Have access to the MediaViewController to change the position of these views.

I don't see it exposed.
1710301729287.png

Code:
B4X:
    Dim MediaManagerExtra As Map = CreateMap(MediaManager.REQUEST_CALLBACK: Me)
    Dim VideoURL As String = "https://player.vimeo.com/external/354886143.hd.mp4?s=2e182d1b22282a63a9533ffda5bb0b2295cdb8e6&profile_id=175"
    MediaManager.SetMediaWithExtra(PanelVideo, VideoURL, "", MediaManagerExtra)
B4X:
Public Sub SMM_MediaReady (Success As Boolean, Media As SMMedia)
    If Media.Meta.MediaType = 3 Then
        #If B4J
        Dim MediaView1 As MediaView = PanelVideo.GetView(0).GetView(0).Tag
        MediaView1.mBase.Parent.Enabled = True
        MediaView1.Play
        #Else If B4A
        ....
 
Last edited:

TILogistic

Expert
Licensed User
Longtime User
i.e. have access to the MediaViewController properties.

As seen in the image without SMM

1710308689313.png
 
Last edited:

Erel

B4X founder
Staff member
Licensed User
Longtime User
I see. The problem is in MediaView. Upgrade to v1.03 and you will then be able to get it with:
B4X:
Dim VideoURL As String = "https://player.vimeo.com/external/354886143.hd.mp4?s=2e182d1b22282a63a9533ffda5bb0b2295cdb8e6&profile_id=175"
MediaManager.SetMediaWithExtra(Pane1, VideoURL, "", MediaManagerExtra)
Wait For (Pane1) SMM_MediaReady (Success As Boolean, Media As SMMedia)
If Success Then
    Dim mvc As MediaViewController = Pane1.GetView(0).GetView(1).Tag
    mvc.lblMute.Color = xui.Color_Red
End If
 
Top