Your Search Results


    この記事はまだ日本語に翻訳されていません。MDN の翻訳はボランティアによって行われています。是非 MDN に登録し、私たちの力になって下さい。

    This is an experimental technology
    Because this technology's specification has not stabilized, check the compatibility table for the proper prefixes to use in various browsers. Also note that the syntax and behavior of an experimental technology is subject to change in future versions of browsers as the spec changes.

    The RTCSessionDescription interface represents the parameters of a session. It consists of the kind of description, which part of a offer/answer negotiation it describes and of the SDP descriptor of the session.


    The RTCSessionDescription doesn't inherit any property.

    Is an enum of type RTCSdpType describing the type of the description. It can be one of the following values:
    • "offer", the description is the initial proposal in an offer/answer exchange.
    • "answer", the description is the definitive choice in an offer/answer exchange.
    • "pranswer", the description is a provisional answer and may be changed when the definitive choice will be given.
    Is a DOMString containing the SDP format describing the session.


    The RTCSessionDescription doesn't inherit any method.

    Returns a new RTCSessionDescription. The parameter is a RTCSessionDescriptionInit dictionary containing the (optional) values for the two properties. If one of these value, or the whole parameter, is not given, the relevant property will be initiated to null.
    Is a jsonifier, that is a method generating a JSON description of the object. Both properties, type and {domxref("RTCSessionDescription.sdp", "sdp")}}, are contained in the generated JSON.


    signalingChannel.onmessage = function (evt) {
        if (!pc)
        var message = JSON.parse(;
        if (message.sdp)
            pc.setRemoteDescription(new RTCSessionDescription(message.sdp), function () {
                // if we received an offer, we need to answer
                if (pc.remoteDescription.type == "offer")
                    pc.createAnswer(localDescCreated, logError);
            }, logError);
            pc.addIceCandidate(new RTCIceCandidate(message.candidate),
                function () {}, logError);


    Specification Status Comment
    WebRTC 1.0: Real-time Communication Between Browser
    The definition of 'RTCSessionDescription' in that specification.
    Working Draft Initial definition.

    Browser compatibility

    Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
    Basic support (Yes) (Yes) -moz- Not supported (Yes) ?
    Feature Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
    Basic support ? ? ? Not supported ? ?

    See also


    Contributors to this page: wesj, teoli
    最終更新者: teoli,