Skip to main content
Version: 2.12

P2P Communication 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.

    1000131640

  • Enter the Server details as wss://ant_media_server_address:Port/live/websocket

    Screenshot_20250204-210520

  • Click Set Server Ip button to save it.

Step 2. Start a P2P stream.

  • Select P2P from the list item & enter the streamId that you want to join in P2P mode.

    1000131648

  • When another peer is connected to the same streamId via Android, iOS, or the web, P2P communication will be established, and you can talk to each other.

  • You can quickly join as a peer to the same streamId via the peer-to-peer sample page.

    https://your_domain:5443/live/peer.html