Cannot load video from assets folder.

anallie0

Active Member
Licensed User
Longtime User
Hi,
I am using the example of a video view.
the directory that I use is DirAssets.
B4X:
Sub Globals
   'These global variables will be redeclared each time the activity is created.
   'These variables can only be accessed from this module.

   
   Dim vv As VideoView
   
   
   
End Sub

Sub Activity_Create(FirstTime As Boolean)
vv.Initialize("vv")
    Activity.AddView(vv, 0%x, 0%y, 100%x, 100%y)
    vv.LoadVideo(File.DirAssets,  "poslaterale.3gp")
    vv.Play
End Sub

I added the file and it is present in the directory file.
I have not errors to compile, but it appears the message on the phone:

An error has occurred in sub: main_activity_create (line java: 213)
java.lang.RuntimeException:
Can not load video from the assets folder.

Can someone help me?
thanks
 

anallie0

Active Member
Licensed User
Longtime User
Thanks Margret, but then how do I attach video files in the distribution of the app. ?
 
Upvote 0

anallie0

Active Member
Licensed User
Longtime User
Thanks NJDude,
I ask, if I set the SetBackgroundImage and run the video the image is fixed and does not make me watch the video. why?
 
Upvote 0
Top