Publishing WebRTC stream Sample in Flutter
Step 1. Set the Server Address.
Once the app is installed and running on your device, enter the server IP address. To enter the IP address, please follow the below steps.
-
Tap on the Setting icon in the top right corner of the application.
-
Enter the Server details as
wss://ant_media_server_address:Port/live/websocket
-
Click Set Server Ip button to save it.
Step 2. Publish WebRTC stream.
-
Select the Publish option from the list & enter the streamId.
-
Choose the publishing source. Please note, that for the iOS, the app screen recording option records the app's UI only, while the Android app records the complete device screen.
-
The WebRTC publish will be started. You can switch between the front & back cameras as well.
-
To verify whether the stream was published successfully, open the web panel of your Ant Media Server (e.g., http://server_ip:5080) and view the stream there.
You can also quickly play the stream via an embedded player. For more details, check this document.