Hello,
I am trying to acheived the same thing I did with B4A (without any problems using the Audio lib).
I want to be able to play 3 audio streams (urls) at the same time, but it seems that with Videoview it's not possible? If not, any alternative?
Here is my code, which does not work with more than 1 stream:
Thank you
I am trying to acheived the same thing I did with B4A (without any problems using the Audio lib).
I want to be able to play 3 audio streams (urls) at the same time, but it seems that with Videoview it's not possible? If not, any alternative?
Here is my code, which does not work with more than 1 stream:
B4X:
'Code module
#Region Project Attributes
#ApplicationLabel: B4i Example
#Version: 1.0.0
'Orientation possible values: Portrait, LandscapeLeft, LandscapeRight and PortraitUpsideDown
#iPhoneOrientations: Portrait, LandscapeLeft, LandscapeRight
#iPadOrientations: Portrait, LandscapeLeft, LandscapeRight, PortraitUpsideDown
#Target: iPhone, iPad
#MinVersion: 7
#End Region
Sub Process_Globals
'These global variables will be declared once when the application starts.
'Public variables can be accessed from all modules.
Public App As Application
Public NavControl As NavigationController
Private Page1 As Page
Private start As Button
Private URLPlayer1 As VideoView
Private URLPlayer2 As VideoView
Private URLPlayer3 As VideoView
Private stop As Button
End Sub
Private Sub Application_Start (Nav As NavigationController)
NavControl = Nav
Page1.Initialize("Page1")
Page1.Title = "Page 1"
Page1.RootPanel.Color = Colors.Black
Page1.RootPanel.LoadLayout("xxxx")
NavControl.ShowPage(Page1)
URLPlayer1.Initialize("rdev1")
URLPlayer2.Initialize("rdev2")
URLPlayer3.Initialize("rdev3")
End Sub
Private Sub Page1_Resize(Width As Int, Height As Int)
End Sub
Private Sub Application_Background
End Sub
Sub start_Click
URLPlayer1.LoadVideoUrl("http://peace.str3am.com:6350")
URLPlayer2.LoadVideoUrl("http://cast.sc1.shoutcaststreaming.us:8080")
URLPlayer2.LoadVideoUrl("http://sc1.christiannetcast.com:9058")
End Sub
Sub stop_Click
URLPlayer1.Stop
URLPlayer2.Stop
URLPlayer3.Stop
End Sub
Sub rdev1_Ready
URLPlayer1.Play
End Sub
Sub rdev1_Complete
Log("stream1 finished")
End Sub
Sub rdev2_Ready
URLPlayer2.Play
End Sub
Sub rdev2_Complete
Log("stream2 finished")
End Sub
Sub rdev3_Ready
URLPlayer3.Play
End Sub
Sub rdev3_Complete
Log("stream3 finished")
End Sub
Thank you
Last edited: