Android Question VideoView cannot play

FK Leung

New Member
Licensed User
Longtime User
Sorry, pls excuse me.
I followed exactly what is in the sample code...when I deployed it.. it said it could not play the video?
I have already included the audio library in the application..Did I miss something?
B4X:
Simple example of using VideoView:
Sub Globals
    Dim vv As VideoView
End Sub
Sub Activity_Create(FirstTime As Boolean)
    vv.Initialize("vv")
    Activity.AddView(vv, 10dip, 10dip, 250dip, 250dip)
    'vv.LoadVideo(File.DirRootExternal, "somefile.mp4")
    'vv.LoadVideo(File.DirRootExternal, "test.mp4").
    'vv.LoadVideo(File.DirAssets,"test.mp4")
    'vv.LoadVideo(File.DirDefaultExternal,"test.mp4")
    vv.LoadVideo("http","http://www.example.com/video.mp4")
    vv.Play
    vv.Play
End Sub
Sub vv_Complete
    Log("Playing completed")
End Sub
 

FK Leung

New Member
Licensed User
Longtime User
Pls excuse my ignorance, the video I loaded is mp4.. and can play easily in the browser..
Do you mean I should change format of the video or I should add some codes there to make it streaming..
 
Upvote 0

jazzzzzzz

Active Member
Licensed User
Longtime User
If file is openly available without any firewall or something then your app can play video (if codec is playable by native videoplayer)...
 
Upvote 0
Top