MediaPlayerStream & StreamBuffer

fabs222

Member
Licensed User
Longtime User
Hello,

how can you be the percentage or the size of the stream buffer and read out display?
I can not unfortunately.
Sorry for my bad English.

B4X:
Sub Process_Globals
Dim mp As MediaPlayerStream
End Sub

Sub Globals
Dim Label1 As Label
End Sub

Sub Activity_Create(FirstTime As Boolean)
If FirstTime Then 
mp.Initialize("mp") 
End If    
mp.Load("http://62.27.44.59:8000/ostseewellelive/livestream.mp3") 
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("Buffer: " & Percentage) 
Label1.Text = ("Buffer: " & Percentage)End Sub

So it is not:sign0148:

Fabs222
 
Last edited:

fabs222

Member
Licensed User
Longtime User
I would like to retrieve the StreamBuffer to find herraus when it is empty and then restart the stream.

With Android 2.2 does not work the StreamError. I try to reason about the stream buffer

Sorry for my bad English.


Fabs222
 
Upvote 0
Top