Almora Well-Known Member Licensed User Longtime User May 1, 2025 #1 B4X: ....... Dim Url As String = cur.GetString("VideoURL") ..... Media3PlayerView1.Player = addoPlayer addoPlayer.Prepare addoPlayer.Prepare_Source(addoPlayer.CreateHLSSource(Url)) addoPlayer.Play Hello How can I query the links that do not work in the video player again? The video link is retrieved from the database. link example https://xxxx.xxx.x/mrc4/vls/ppsl1.stream What I want to do is query https://xxxx.xxx.x/mrc4/vls/ppsl1.stream when it doesn't work, query https://xxxx.xxx.x/mrc5/vls/ppsl1.stream, and when that doesn't work either, query https://xxxx.xxx.x/mrc6/vls/ppsl1.stream. If not connected within 2 seconds (mrc5), if not connected within 2 seconds (mrc6) I just want to change the numbers in (mrc4) 4,5,6... and my source comes from database. thanks..
B4X: ....... Dim Url As String = cur.GetString("VideoURL") ..... Media3PlayerView1.Player = addoPlayer addoPlayer.Prepare addoPlayer.Prepare_Source(addoPlayer.CreateHLSSource(Url)) addoPlayer.Play Hello How can I query the links that do not work in the video player again? The video link is retrieved from the database. link example https://xxxx.xxx.x/mrc4/vls/ppsl1.stream What I want to do is query https://xxxx.xxx.x/mrc4/vls/ppsl1.stream when it doesn't work, query https://xxxx.xxx.x/mrc5/vls/ppsl1.stream, and when that doesn't work either, query https://xxxx.xxx.x/mrc6/vls/ppsl1.stream. If not connected within 2 seconds (mrc5), if not connected within 2 seconds (mrc6) I just want to change the numbers in (mrc4) 4,5,6... and my source comes from database. thanks..
Erel B4X founder Staff member Licensed User Longtime User May 4, 2025 #2 You should handle the Error event. Another option is to make a HEAD request with OkHttpUtils2 before trying to play the stream. Upvote 0
You should handle the Error event. Another option is to make a HEAD request with OkHttpUtils2 before trying to play the stream.