WebRTC Samples

Broadcast Video Camera and Microphone to the Ant Media Server with WebRTC from your Web browser and play in another tab. It also supports Screen capturing, bandwidth limitation and data channel.

Play WebRTC stream that is broadcasting to the Ant Media Server. You can play any stream(RTMP & WebRTC ingesting, Stream sources, IP Camera, etc.)

You can publish with background blur or background replacement.

You can publish with DeepAr effects.

Broadcast WebRTC stream to the Ant Media Server with synchronized Whiteboard. Whiteboard is synchronized with all players. Make sure that data channel is enabled on the server side. It's disabled by default.

Play WebRTC stream with synchronized Whiteboard. Make sure that data channel is enabled on the server side. It's disabled by default.

Broadcast only microphone stream(no video) to the Ant Media Server.

Play audio only stream that is broadcasting to the Ant Media Server

Send only data through WebRTC via Ant Media Server no video or audio. It works the same way with WebRTC Publish and Play which means all data is delivered to subscribers

Reference WebRTC conference implementation

Connect a WebRTC Conference Room, get all streams & merge them into a canvas & republish to the Ant Media Server. This solution is great if you want to publish conferece room to large number of audience in a single stream.

Broadcast WebRTC camera stream by drawing current timestamp of the frame. It's used for measuring the E2E(End to End) latency.

Play WebRTC stream by drawing current timestamp of the frame. It's used for measuring the E2E latency.

Connect two peers directly. Ant Media Server is only a signalling server to establish the connection. Video and Audio is not relayed through Ant Media Server

Measure E2E(End to end) bitrate, RTT, packet lost, etc.

Play WebRTC/HLS/DASH/VoD/360 streams. Following parameters can be given as URL query

  • "id": The stream id to play. It is mandatory
  • "token": The token to play stream. It's not mandatory if token security is disabled.
  • "autoplay": To start playing automatically if streams is available. Optional. Default value is true
  • "mute": To start playing with mute if streams is available. Optional. Default value is true
  • "playOrder": The order which technologies is used in playing. Optional. Default value is "webrtc,hls". Possible values are "hls,webrtc","webrtc","hls","vod","dash"
  • "playType": the order which play type is used in playing for VoD streams. Optional. Default value is "mp4,webm". Possible values are "webm,mp4"","mp4","webm"
  • "is360": To play the stream in 360. Default value is false.
Sample:  

play.html?id=stream1&autoplay=true&playOrder=webrtc