web radio

ginocasa

Member
Licensed User
Longtime User
Good evening everyone, I recently purchased B4A and after the first programs of buttons and text boxes I wanted to make an application a more complex, the results was very deludent. i want access a podcat its url is the following: switch3 .castup.net / CuNET / gm.asp? ai = 31 & ar = Reshet_Bet
i try to use mediaplayerstream but I just get errors. Maybe it can just open mp3 files?
Thanks for any answers.
Gino :BangHead:
 

ginocasa

Member
Licensed User
Longtime User
Hi, i try to change the url with another url (other radio) and i listen music.
Someone could you help me .
follow my program:
#Region Project Attributes
#ApplicationLabel: B4A Example
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
#End Region

#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region

Sub Process_Globals
Dim mp As MediaPlayerStream
End Sub

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

Dim Button1 As Button
Dim Button2 As Button
End Sub

Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("radioscreen")
If FirstTime Then
mp.Initialize("mp")
End If
' mp.Load("http://www.switch3.castup.net/cunet/gm.asp?ai=31&ar=Reshet_Bet")
mp.Load("http://radio.glz.co.il:8000/galatz")
End Sub

Sub Activity_Resume

End Sub

Sub Activity_Pause (UserClosed As Boolean)

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

Sub Button1_Click
mp.Play
End Sub
Sub Button2_Click
mp.Pause
End Sub
 
Upvote 0
Top