jcesar Active Member Licensed User Longtime User Jun 3, 2019 #1 Hi this java code connects to a online radio and use a player to play the stream. Anyone knows what is the b4j code to do this ? B4X: OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("http://uplink.duplexfx.com:8800/") .build(); Response response = client.newCall(request).execute(); InputStream stream = response.body().byteStream(); Last edited: Jun 3, 2019
Hi this java code connects to a online radio and use a player to play the stream. Anyone knows what is the b4j code to do this ? B4X: OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("http://uplink.duplexfx.com:8800/") .build(); Response response = client.newCall(request).execute(); InputStream stream = response.body().byteStream();
PatrikCavina Active Member Licensed User Longtime User Jun 3, 2019 #2 B4X: Dim job As HttpJob job.Initialize("", Me) job.Download("http://uplink.duplexfx.com:8800/") Wait For (job) JobDone (job As HttpJob) Dim in As InputStream = job.GetInputStream job.Release Upvote 0
B4X: Dim job As HttpJob job.Initialize("", Me) job.Download("http://uplink.duplexfx.com:8800/") Wait For (job) JobDone (job As HttpJob) Dim in As InputStream = job.GetInputStream job.Release
Erel B4X founder Staff member Licensed User Longtime User Jun 3, 2019 #3 Have you tried to play it with MediaPlayer? Upvote 0
jcesar Active Member Licensed User Longtime User Jun 3, 2019 #4 Erel said: Have you tried to play it with MediaPlayer? Click to expand... Not yet. The media player supports audio streaming ? Upvote 0
Erel said: Have you tried to play it with MediaPlayer? Click to expand... Not yet. The media player supports audio streaming ?
mcqueccu Well-Known Member Licensed User Longtime User Jun 3, 2019 #5 Try Mediaview library or Vlclibs Upvote 0