MediaPlayerStream compile error.

strady77

Member
Licensed User
Longtime User
Hello, I'm beginner and i'm using a b4a code for streaming audio over the Web:

sub Process_Globals
Dim mp As MediaPlayerStream
end Sub

sub Globals

end Sub

Sub Activity_Create (Firsttime As Boolean)
Then if Firsttime
mp.Initialize ("MP")
end If
mp.Load ("http:// ...")
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 (As Percentage Int)
Log (Percentage)
end Sub



more or less I understand how it works, only problem when I compile returns the following error:

Compiling code. Error
Error parsing program.
Error description: Unknown type: mediaplayerstream
Are you missing a library reference?
Occurred online: 2

Dim mp As MediaPlayerStream

does not seem to find the library MediaPlayerStream, how can I fix this?
Thanks to all.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…