iOS Question Video File Width and Height

gregchao

Member
Licensed User
Longtime User
Is there any way to get the video width and height in pixels? I found a way to get the info in B4A and B4J but not B4i
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
You can get the video bounds with this code:
B4X:
Dim no As NativeObject = VideoPlayer1
Dim controller As NativeObject = no.GetField("controller")
Dim bounds() As Float = controller.ArrayFromRect(controller.RunMethod("videoBounds", Null))
Log(bounds(0)) 'left
Log(bounds(1)) 'top
Log(bounds(2)) 'width
Log(bounds(3)) 'height
 
Upvote 0
Top