Play mp4s

Mikie

Member
Licensed User
Longtime User
New to basic4android. I would like to create an app that plays mp4's. If this is possible, could someone give the code to start. I would like the buttons with the name of the mp4s. The mp4s will be in the sdcard on the phone.
Thanks
 

Mikie

Member
Licensed User
Longtime User
Sub Activity_Create(FirstTime As Boolean)
vv.Initialize("vv")
Activity.AddView(vv,10dip,10dip,250dip,250dip)
vv.LoadVideo(File.DirDefaultExternal,"http://pirsqrt.com/EduscapeWP/Movies/LinearEq3a.mp4")
vv.Play
End Sub

also

vv.LoadVideo(File.DirDefaultExternal,"/mnt/sdcard/download/LinearEq3a.mp4")
And I get "cannot play video"

I can tap the mp4 in the phone and it plays.
 
Upvote 0

mistermentality

Active Member
Licensed User
Longtime User
Sub Activity_Create(FirstTime As Boolean)
vv.Initialize("vv")
Activity.AddView(vv,10dip,10dip,250dip,250dip)
vv.LoadVideo(File.DirDefaultExternal,"http://pirsqrt.com/EduscapeWP/Movies/LinearEq3a.mp4")
vv.Play
End Sub

also

vv.LoadVideo(File.DirDefaultExternal,"/mnt/sdcard/download/LinearEq3a.mp4")
And I get "cannot play video"

I can tap the mp4 in the phone and it plays.

I wrote an app for streaming videos that had this problem, it seems to be an android issue with streaming as I found that many video files will not play streamed but will when played from external memory as you have also found.

Dave
 
Upvote 0
Top