最終更新:2021-04-07 (水) 22:12:56 (1111d)  

RTCPeerConnection
Top / RTCPeerConnection

https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection

特徴

  • P2P
  • UDP
  • 暗号化通信

コンストラクタ

プロパティ

  • Also inherits methods from: EventTarget
    RTCPeerConnection.addIceCandidate()When a web site or app using RTCPeerConnection receives a new ICE candidate from the remote peer over its signaling channel, it delivers the newly-received candidate to the browser's ICE agent by calling RTCPeerConnection.addIceCandidate().
    RTCPeerConnection.addStream()adds a MediaStream as a local source of audio or video. If the negotiation already happened, a new one will be needed for the remote peer to be able to use it.
    RTCPeerConnection.addTrack?()The RTCPeerConnection method addTrack() adds a new media track to the connection. The track is added to the set of tracks which will be transmitted to the other peer.
    RTCPeerConnection.close?()closes the current peer connection.
    RTCPeerConnection.createAnswer()creates an SDP answer to an offer received from a remote peer during the offer/answer negotiation of a WebRTC connection. The answer contains information about any media already attached to the session, codecs and options supported by the browser, and any ICE candidates whreiady been gathered. The answer is delivered to the returned Promise, and should then be sent to the source of the offer to continue the negotiation process.
    RTCPeerConnection.createOffer()initiates the creation of an SDP offer which includes information about any MediaStreamTracks? already attached to the WebRTC session, codec and options supported by the browser, and any candidates already gathered by the ICE agent, for the purpose of being sent over the signaling channel to a potential peer to request a connection or to update the configuration of an existing connection.
    RTCPeerConnection.generateCertificate?()The generateCertificate() method of the RTCPeerConnection interface creates and stores an X.509 certificate and corresponding private key then returns an RTCCertificate?, providing access to it.
    RTCPeerConnection.getConfiguration?()returns an RTCConfiguration object which indicates the current configuration of the RTCPeerConnection on which the method is called.
    RTCPeerConnection.getIdentityAssertion?()initiates the gathering of an identity assertion. This has an effect only if the signalingState is not "closed".
    RTCPeerConnection.getLocalStreams?()returns an array of MediaStream associated with the local end of the connection. The array may be empty.
    RTCPeerConnection.getRemoteStreams?()returns an array of MediaStream associated with the remote end of the connection. The array may be empty.
    RTCPeerConnection.getSenders?()returns an array of RTCRtpSender? objects, each of which represents one RTP sender. Each RTP sender is responsible for transmitting data for one track, and provides methods and properties for examining and controlling the transmission and encoding of the track's data.
    RTCPeerConnection.getStreamById?()returns the MediaStream with the given id that is associated with local or remote end of the connection. If no stream matches, it returns null.
    RTCPeerConnection.removeStream?()removes a MediaStream as a local source of audio or video. If the negotiation already happened, a new one will be needed for the remote peer to be able to use it. Because this method has been deprecated, you should instead use removeTrack() if your target browser versions have implemented it.
    RTCPeerConnection.removeTrack?()tells the local end of the connection to stop sending media from the specified track, without actually removing the corresponding RTCRtpSender? from the list of senders as reported by RTCPeerConnection.getSenders?(). If the track is already stopped, or is not in the connection's senders list, this method has no effect.
    RTCPeerConnection.setConfiguration?()sets the current configuration of the RTCPeerConnection based on the values included in the specified RTCConfiguration object. This lets you change the ICE servers used by the connection and which transport policies to use.
    RTCPeerConnection.setIdentityProvider?()sets the Identity Provider (IdP) to the triplet given in parameter: its name, the protocol used to communicate with it (optional) and an optional username. The IdP will be used only when an assertion is needed.
    RTCPeerConnection.setLocalDescription()changes the local description associated with the connection. This description specifies the properties of the local end of the connection, including the media format.
    RTCPeerConnection.setRemoteDescription()changes the remote description associated with the connection. This description specifies the properties of the remote end of the connection, including the media format.

イベント

  • RTCPeerConnection.onaddstream
    RTCPeerConnection.onconnectionstatechange?
    RTCPeerConnection.ondatachannel?
    RTCPeerConnection.onicecandidate
    RTCPeerConnection.oniceconnectionstatechange?
    RTCPeerConnection.onicegatheringstatechange?
    RTCPeerConnection.onidentityresult?
    RTCPeerConnection.onidpassertionerror?
    RTCPeerConnection.onidpvalidationerror?
    RTCPeerConnection.onnegotiationneeded?
    RTCPeerConnection.onpeeridentity?
    RTCPeerConnection.onremovestream?
    RTCPeerConnection.onsignalingstatechange?
    RTCPeerConnection.ontrack

参考

関連