apivideo / api.video-flutter-live-stream

Flutter RTMP live stream client. Made with ♥ by api.video
MIT License
62 stars 37 forks source link

Support Flutter Web #26

Closed sirwes closed 1 year ago

sirwes commented 1 year ago

I'd love to use this library, but I need it to work for Flutter Web as well

ThibaultBee commented 1 year ago

Hi, We would love to make it. Unfortunately it is not possible to directly stream over RTMP in a web browser (because you can not open a socket connection). (Duplicated with https://github.com/apivideo/api.video-flutter-live-stream/issues/24).

To stream for a browser, we got another project called browser to rtmp. This project is composed of 2 separate parts:

-in a browser: stream from camera to WebSocket -in a separate server: stream from WebSocket to RTMP

So if you want to use this library, you must install your own WebSocket to RTMP server.

So, we are thinking to create another Flutter package that only contains browser to RTMP (only web support). It would be a wrapper around browser to RTMP. So if developer wants to have a RTMP from a browser would have to install a new package (as well as this api.video-flutter-live-stream). Hope it is clear enough. The question we want to answer is: are you willing to install your own server to be able to stream WebSocket/RTMP from a web browser? Does it worth to be implemented?

sirwes commented 1 year ago

@ThibaultBee Thanks for the explanation. I understand the situation better now. Doing this would be worth it to me.

I have a few questions for you:

  1. If I understand you correctly, you're saying that currently in flutter it's not possible, but with a little bit of work on your end, you could provide a flutter package that is a wrapper around the linked project. Then that new package would be required for Flutter Web. The requirement for me, however is that I have both packages installed and I set up a WebSocket to RTMP server?
  2. Would I have to do anything else to get it into my cloud database from the external server?
  3. When do you think this new package would come out?
ThibaultBee commented 1 year ago

@ThibaultBee Thanks for the explanation. I understand the situation better now. Doing this would be worth it to me.

I have a few questions for you:

1. If I understand you correctly, you're saying that currently in flutter it's not possible, but with a little bit of work on your end, you could provide a flutter package that is a wrapper around the linked project. Then that new package would be required for Flutter Web. The requirement for me, however is that I have both packages installed and I set up a WebSocket to RTMP server?

Yes, that is pretty much it.

2. Would I have to do anything else to get it into my cloud database from the external server?

The WebSocket to RTMP server

3. When do you think this new package would come out?

The roadmap of the first quarter is already pretty full and it is not requested by api.video customers, so it has a low priority. TLDR; We don't know.

ThibaultBee commented 1 year ago

Hi,

I don't think this is something we will tackle any day soon. Closing it for now. We will reopen it if we start working on it.