Cannot play video

mbisso

Member
Licensed User
Longtime User
Whenever I try to play a video using Video view, I get the error message:
Cannot play video, Sorry, this video cannot be played.

This is the code I used

Dim vv as VideoView
vv.Initialize("")
activity.AddView(vv,200,200,400,200)
vv.LoadVideo("//video","hale_bopp_1.mpg")
vv.Play

The unfiltered log file reads

Command PLAYER_SET_DATA_SOURCE completed with an error or info PVMFErrNotSupported
PVMFInfoErrorHandlingComplete
info/warning (1, 26)
error (1, -4)
Info (1,26)


What is PVMFErrNotSupported? Which video formats are supported by video view?

Thanks
 

mbisso

Member
Licensed User
Longtime User
Tried it with a .3gp sample file downloaded from the quicktime sample site and still get the same error...
 
Upvote 0

mbisso

Member
Licensed User
Longtime User
found the solution

It seems that when you buy a "cheap" chineese tablet, it does not have all the nice android doodades that most android devices should have. So with that in mind, I used the B4A log sniffer to fetch the intent that was generated whenever I started a video from the file explorer, and here it is:

Sub desinc_click

Dim vint As Intent
' to play a video on the Chineese tablet, it generates this intent:
' Starting activity: Intent { act=android.intent.action.VIEW
' dat=File:///flash/Video/sample_mpeg4.mp4 typ=video/*
' flg=0x10000000 cmp=android.rk.RockVideoPlayer/.VideoPlayActivity }

' coded in B4A

vint.Initialize(vint.ACTION_VIEW,"file:///flash/Video/sample_mpeg4.mp4")
Vint.SetType("video/*")
Vint.Flags = 0x10000000
vint.SetComponent("android.rk.RockVideoPlayer/.VideoPlayActivity")
StartActivity(vint)

End Sub

It works great.
 
Upvote 0
Top