Android Question Playing a video file

Ajay Kakar

Member
Licensed User
Longtime User
Hi Erel,

I got the following code from the manual

Sub Process_Globals
Dim mp As MediaPlayerStream
End Sub

Sub Globals

End Sub

Sub Activity_Create(FirstTime As Boolean)
If FirstTime Then
mp.Initialize("mp")
End If
mp.Load("http://www...")
End Sub
Sub mp_StreamReady
Log("starts playing")
mp.Play
End Sub
Sub mp_StreamError (ErrorCode As String, ExtraData As Int)
Log("Error: " & ErrorCode & ", " & ExtraData)
ToastMessageShow("Error: " & ErrorCode & ", " & ExtraData, True)
End Sub
Sub mp_StreamBuffer(Percentage As Int)
Log(Percentage)
End Sub

Where is video file being played? There is no view added in the example. I tried it out and i get nothing on the screen. I cannot add a view for a mediaplayerstream object.

Any suggestions ?

Ajay
 
Top