This page contains information on the old SkyWay. Click here for information on the new SkyWay.

# Introduction

This section describes the specifications and terminology common to all SDKs.

# Peer

A Peer is an agent that manages connections to signaling servers and other clients.

For example, in a 1:1 video chat, each Peer will send and receive audio and video at the caller and the receiver

# Peer ID

The Peer ID is an ID that uniquely identifies a Peer.

When you create a Peer instance, you can get it as a 16-digit random string.

The Peer ID is generated by the signaling server in principle, but users can also specify their own values.

# Communication Model

There are two communication models for ECLWebRTC. This section describes the flow of connection establishment in each model.

# 1. Telephone Model

This model communicates in a 1:1 manner, just like a telephone. In order to connect, you will need to know the Peer ID of the person in question by some means.

# Media Communication

  1. The caller specifies a Peer ID instead of a phone number to make a call to the other party. peer.call('Peer ID of the peer')

  2. On the receiving end, the call event fires when you receive an incoming call.

  3. Call call.answer() for the call event.

  4. Communication is established.

For both callers and callers, audio and video can be retrieved with the firing of the stream event as MediaStream with the firing of the stream event.

# Data Communication

  1. The caller specifies a Peer ID instead of a phone number to make a call to the other party. peer.connect('Peer ID of the peer')

  2. On the receiving side, the connection event fires when you receive an incoming call.

  3. Communication is established.

It is not necessary to call answer() as in media communication, and the connection is established automatically.

# 2. Room Model

This is a model that allows multiple Peers to communicate with each other, just like a video conference.

  1. Peer joins a room by specifying a room name (peer.joinRoom('room name')).

  2. If audio or video is received from other participants, the Room.stream event will be fired and media communication will be established.

  3. You can use Room.close() in order to leave a room.

Once all participants have left the room, the room will be deleted.

The room namespace is independent of each API key. In other words, if there is an API key named A and an API key named B, even if they both have the same room name, the participants in room A and the participants in room B will not communicate with each other.

There are two types of room implementation methods, Mesh and SFU. For more information, see [here](/skyway/overview.html#sfu server)

# MediaStream

For media communication (video and audio), MediaStream is used.

Creating a MediaStream is not provided by ECLWebRTC's SDK, so it's done in a browser or OS.

Pass the created MediaStream to ECLWebRTC SDK / Obtain it from ECLWebRTC SDK to achieve media communication.