Hi,
I'm actually playing around with live media streaming using B4A.. the sample project posted on this forum looks really impressive,
however, my challenge i have is: I would like to create an app that would allow live audio streaming, only for certain periods. (ie. special events/ceremonies).. Is there anything that could be achieved via the app, whereby the app detects no audio in a stream and simply displays a message? the live audio will be streamed from our internal media server using http..
hope this makes sense?
thanks in advance
I'm actually playing around with live media streaming using B4A.. the sample project posted on this forum looks really impressive,
B4X:
#Region Module Attributes
#FullScreen: False
#IncludeTitle: True
#ApplicationLabel: Generic Sample
#VersionCode: 1
#VersionName: 0.0
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
#End Region
'Activity module
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
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 StartButton As Button
Dim StopButton As Button
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Main")
If FirstTime Then
mp.Initialize("mp")
End If
mp.Load("http://transom.org/sounds/2004/tools/200403_mp3/mono_40kbps.mp3")
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause(UserClosed As Boolean)
mp.Stop
End Sub
'##########################
'######## Controls ########
'##########################
Sub StartButton_Click
StartButton.Enabled = False
StopButton.Enabled = True
mp.Play
End Sub
Sub StopButton_Click
StartButton.Enabled = True
StopButton.Enabled = False
mp.Pause
End Sub
'##########################
'######## Routines ########
'##########################
Sub mp_StreamReady
ProgressDialogShow("Loading...")
StartButton.Enabled = True
End Sub
Sub mp_StreamError(ErrorCode As String, ExtraData As Int)
ToastMessageShow("Error: " & ErrorCode & ", " & ExtraData, True)
End Sub
however, my challenge i have is: I would like to create an app that would allow live audio streaming, only for certain periods. (ie. special events/ceremonies).. Is there anything that could be achieved via the app, whereby the app detects no audio in a stream and simply displays a message? the live audio will be streamed from our internal media server using http..
hope this makes sense?
thanks in advance