Search completed in 1.14 seconds.
7 results for "rtcsessiondescriptioninit":
RTCPeerConnection.setRemoteDescription() - Web APIs
wo peers agree on a configuration, the description submitted by calling setRemoteDescription() does not immediately take effect. Instead, the current connection configuration remains in place until negotiation is complete. Only then does the agreed-upon configuration take effect. ...
...tion take effect. Syntax aPromise = rtcPeerConnection.setRemoteDescription(sessionDescription); Parameters sessionDescription An
RTCSessionDescriptionInit or RTCSessionDescription which specifies the remote peer's current offer or answer. This value is an offer or answer received from the remote peer through your implementation of The sessionDescription parameter is technically of type
RTCSessionDescriptionInit, but because RTCSessionDescription serializes to be indistinguishable from
RTCSessionDescriptionInit, you can also pass in an RTCSessionDescription. This lets you simplify code such as the following: myPeerConnection.setRemoteDescription(new RTCSessionDescription(description)) .then(function () { return createMyStream(); }) to simply be: myPeerConnection.setRemoteDescription(description) .t...
...r which don't match the others specifeid here are reported as OperationError. This includes identity validation errors. RTCError An RTCError with the errorDetail set to sdp-syntax-error is reported if the SDP specified by RTCSessionDescription.sdp. The error object's sdpLineNumber property indicates the line number within the SDP on which the syntax error was detected. TypeError The specified
RTCSessionDescriptionInit or RTCSessionDescription object is missing the type property, or no description parameter was provided at all. Usage notes When you call setRemoteDescription(), the ICE agent checks to make sure the RTCPeerConnection is in either the stable or have-remote-offer signalingState. These states indicate that either an existing connection is being renegotiated or that an offer previously specified b...
RTCPeerConnection.createOffer() - Web APIs
iption object describing the newly-created offer. errorCallback An RTCPeerConnectionErrorCallback which will be passed a single DOMException object explaining why the request to create an offer failed. options Optional An optional RTCOfferOptions dictionary providing options requested for the offer. Return value A Promise whose fulfillment handler will receive an object conforming to the
RTCSessionDescriptionInit dictionary which contains the SDP describing the generated offer. That received offer should be delivered through the signaling server to a remote peer. Exceptions These exceptions are returned by rejecting the returned promise. Your rejection handler should examine the received exception to determine which occurred. InvalidStateError The RTCPeerConnection is closed. NotReadableError No c...
...Once that's done, the offer is sent to the remote system over the signaling channel; in this case, by using a custom function called sendToServer(). The implementation of the signaling server is independent from the WebRTC specification, so it doesn't matter how the offer is sent as long as both the caller and potential receiver are using the same one. Use Promise.ca...
RTCPeerConnection.setLocalDescription() - Web APIs
ption() does not immediately take effect. Instead, the current connection configuration remains in place until negotiation is complete. Only then does the agreed-upon configuration take effect. Syntax aPromise = RTCPeerConnection.setLocalDescription(sessionDescription); pc.setLocalDescription(sessionDescription, successCallback, errorCallback); Parameters sessionDescription Optional An
RTCSessionDescriptionInit or RTCSessionDescription which specifies the configuration to be applied to the local end of the connection. If the description is omitted, the WebRTC runtime tries to automatically do the right thing. Implicit description If you don't explicity provide a session description, the WebRTC runtime will try to handle it correctly. If the signaling state is one of stable, have-local-offer, or have-...
...scription, the WebRTC runtime will try to handle it correctly. If the signaling state is one of stable, have-local-offer, or have-remote-pranswer, the WebRTC runtime automatically creates a new offer and sets that as the new local description. Otherwise, setLocalDescription() creates an answer, which becomes the new local description. Type of the description parameter The description is of type
RTCSessionDescriptionInit, which is a serialized version of a RTCSessionDescription browser object. They're interchangeable: myPeerConnection.createOffer().then(function(offer) { return myPeerConnection.setLocalDescription(offer); }); This is equivalent to: myPeerConnection.createOffer().then(function(offer) { return myPeerConnection.setLocalDescription(new RTCSessionDescription(offer)); }); For this reason, the...
RTCSessionDescription() - Web APIs
The RTCSessionDescription() constructor creates a new RTCSessionDescription with its properties initialized as described in the specified object. This constructor has been deprecated because RTCPeerConnection.setLocalDescription() and other methods which take SDP as input now directly accept an object conforming to the
RTCSessionDescriptionInit dictionary, so you don't have to instantiate an RTCSessionDescription yourself. Syntax sessionDescription = new RTCSessionDescription(
rtcSessionDescriptionInit); Values
rtcSessionDescriptionInit Optional An object providing the default values for the session description; the object conforms to the
RTCSessionDescriptionInit dictionary. That dictionary has the following properties: type Required. A string which is a member of the RTCSdpType enum; it must ...
...ng containing a SDP message describing the session. This value is an empty string ("") by default and may not be null. Example This example uses the constructor to convert an SDP offer into an RTCSessionDescription object. This is no longer necessary, however; RTCPeerConnection.setLocalDescription() and other methods which take SDP as input now directly accept an object conforming to the
RTCSessionDescriptionInit dictionary, so you don't have to instantiate an RTCSessionDescription yourself. navigator.getUserMedia({video: true}, function(stream) { pc.onaddstream({stream: stream}); // Adding a local stream won't trigger the onaddstream callback pc.addStream(stream); pc.createOffer(function(offer) { pc.setLocalDescription(new RTCSessionDescription(offer), function() { // send the offer ...
RTCPeerConnection.createAnswer() - Web APIs
ons Optional An optional RTCOfferOptions object providing options requested for the answer. Exceptions NotReadableError The identity provider wasn't able to provide an identity assertion. OperationError Generation of the SDP failed for some reason; this is a general failure catch-all exception. Return value A Promise whose fulfillment handler is called with an object conforming to the
RTCSessionDescriptionInit dictionary which contains the SDP answer to be delivered to the other peer. Example Here is a segment of code taken from the code that goes with the article Signaling and video calling. This code comes from the handler for the message sent to carry an offer to another peer across the signaling channel. Keep in mind that this is part of the signaling process, the transport layer for which is a...
RTCSessionDescription - Web APIs
response to a previous offer that is not the final answer. It is usually employed by legacy hardware. rollback This special type with an empty session description is used to roll back to the previous stable state. Methods The RTCSessionDescription doesn't inherit any methods. RTCSessionDescription() This constructor returns a new RTCSessionDescription. The parameter is a
RTCSessionDescriptionInit dictionary containing the values to assign the two properties. RTCSessionDescription.toJSON() Returns a JSON description of the object. The values of both properties, type and sdp, are contained in the generated JSON. Example signalingChannel.onmessage = function (evt) { if (!pc) start(false); var message = JSON.parse(evt.data); if (message.sdp) pc.setRemoteDesc...
RTCSessionDescriptionCallback - Web APIs
unction passed into the deprecated callback-based version of createOffer() or createAnswer() when using them to create offers or answers. Because this function type is part of the legacy WebRTC API, you should avoid using it (and the callback-based forms of createOffer() and createAnswer() that make use of it). Syntax RTCSessionDescriptionCallback(description); Parameters description An
RTCSessionDescriptionInit (or RTCSessionDescription) object describing the session being offered or being accepted. This object contains the type and sdp properties which are part of RTCSessionDescription. Return value The callback doesn't need to return anything, so the return value is undefined. Example var pc = new RTCPeerConnection(); var descriptionCallback = function(offer) { pc.setLocalDescription(offer); } ...