This page is In Progress

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

readyState

Summary

Returns the ready state of the peer connection.

Property of apis/webrtc/RTCPeerConnectionapis/webrtc/RTCPeerConnection

Syntax

Note: This property is read-only.

var result = element.readyState;

Return Value

Returns an object of type RTCPeerStateRTCPeerState

The RTCPeerState enum has the following values:

  • new - the object was just created; no netorking has transpired
  • have-local-offer - a local description of type offer has been supplied
  • have-local-pranswer - a remote description of type offer has been supplied and a local description of type pranswer has been supplied
  • have-remote-pranswer - a local description of type “offer” has been supplied and a remote description of type “pranswer” has been supplied
  • active - both local and remote descriptions have been supplied, and the offer-answer exchange is complete
  • closed - the connection is closed