Android Question MediaPlayerStream for playing an flv (video) from an URL

Ratna Fang

Licensed User
is it possible to load and play a flv (video) from a specific URL?

i have simple code which i follow from the sample audio library

Sub Globals
    'These global variables will be redeclared each time the activity is created.
    'These variables can only be accessed from this module.
    Dim Video1 As MediaPlayerStream
End Sub

Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
    'load streaming
End Sub

Sub Video1_StreamReady
    Log("starts playing")
End Sub

Sub Video1_StreamError (ErrorCode As String, ExtraData As Int)
    Log("Error: " & ErrorCode & ", " & ExtraData)
    ToastMessageShow("Error: " & ErrorCode & ", " & ExtraData, True)
End Sub

Sub Video1_StreamBuffer(Percentage As Int)
End Sub
if i type such the URL in a browser, i'll get a download file (a FLV file). if i type the URL in the code, i'll get a respond "error format" or something like that.

anything wrong with my code? or i should check some documentation about this audio library?



Well-Known Member
Licensed User
You could try the Vitamio library (Link), which is easy to use and can stream flv files. Another possibility would be installing VLC and running with an intent.