I'm hoping someone can help me understand how to get a sample of this working.
The former functionality of my b4a app uses an apache webserver to get its content for exoplayer to play and works nicely. But now I'd like to remove the apache webserver from the mix.
Since traditional webserver functionality appears to be unavailable for b4j (thanks @aeric), I thought that getting the content using websockets might be possible.
jServer is the answer! Thanks @Erel
I'm using websockets for connecting to b4j from a b4a app.
It is possible to have B4j send a media file to exoplayer through a socket?
If so, is there a sample somewhere I could view?
I'm unfamiliar with preparing a file for transport through a socket and handling the mobile side of receiving the file for playback.
I ran a few samples from these forums using asynchstreams but those just copy the files over to the device. I'd like for exoplayer to play the file as it arrives as though it were an http request or similar.
Are there any thoughts or pointers to get me moving in the right direction? Maybe a few steps of what is needed to achieve this?
For reference: I have attached a pic of the libraries I'm using both for B4A and B4J. I believe they are the latest but I could be wrong about one or more of them.
After some searching on the web: It does appear to be possible..
I found a solution here (See answer #1 a bit down the page) but this is not for B4X design environments so implementation would be difficult for me.
stackoverflow.com
Thanks, Chris
The former functionality of my b4a app uses an apache webserver to get its content for exoplayer to play and works nicely. But now I'd like to remove the apache webserver from the mix.
jServer is the answer! Thanks @Erel
I'm using websockets for connecting to b4j from a b4a app.
It is possible to have B4j send a media file to exoplayer through a socket?
If so, is there a sample somewhere I could view?
I'm unfamiliar with preparing a file for transport through a socket and handling the mobile side of receiving the file for playback.
I ran a few samples from these forums using asynchstreams but those just copy the files over to the device. I'd like for exoplayer to play the file as it arrives as though it were an http request or similar.
Are there any thoughts or pointers to get me moving in the right direction? Maybe a few steps of what is needed to achieve this?
For reference: I have attached a pic of the libraries I'm using both for B4A and B4J. I believe they are the latest but I could be wrong about one or more of them.
After some searching on the web: It does appear to be possible..
I found a solution here (See answer #1 a bit down the page) but this is not for B4X design environments so implementation would be difficult for me.

how to play video stream from websocket url on exoplayer?
I am trying to stream a video from websocket url in android. The url looks something like this ws://abc.com:80/api/streaming/download/mp4/ . I am not really sure how to proceed because this thing i...
Thanks, Chris
Attachments
Last edited: