From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/ja/web/api/rtcsessiondescription/index.html | 130 ++++++++++++++++++++++ 1 file changed, 130 insertions(+) create mode 100644 files/ja/web/api/rtcsessiondescription/index.html (limited to 'files/ja/web/api/rtcsessiondescription') diff --git a/files/ja/web/api/rtcsessiondescription/index.html b/files/ja/web/api/rtcsessiondescription/index.html new file mode 100644 index 0000000000..970487879e --- /dev/null +++ b/files/ja/web/api/rtcsessiondescription/index.html @@ -0,0 +1,130 @@ +--- +title: RTCSessionDescription +slug: Web/API/RTCSessionDescription +tags: + - API + - Audio + - Experimental + - Interface + - Media + - RTCSessionDescription + - Reference + - Video + - Web + - WebRTC +translation_of: Web/API/RTCSessionDescription +--- +

{{APIRef("WebRTC")}}{{SeeCompatTable}}

+ +

RTCSessionDescription インターフェイスは、接続 (または接続する予定のもの) の一端と、その構成方法を記述します。それぞれの RTCSessionDescription は、どのオファー/アンサー交渉プロセスを使用するかを表す記述の {{domxref("RTCSessionDescription.type", "type")}} と、セッションの {{Glossary("SDP")}} 記述子から成ります。

+ +

The process of negotiating a connection between two peers involves exchanging RTCSessionDescription objects back and forth, with each description suggesting one combination of connection configuration options that the sender of the description supports. Once the two peers agree upon a configuration for the connection, negotiation is complete.

+ +

プロパティ

+ +

RTCSessionDescription が継承するプロパティは存在しません。

+ +
+
{{domxref("RTCSessionDescription.type")}} {{ReadOnlyInline}}
+
これは RTCSdpType の列挙型であり、ディスクリプションの種類を表します。
+
+ +
+
{{domxref("RTCSessionDescription.sdp")}} {{ReadOnlyInline}}
+
これは、セッションを説明するための {{Glossary("SDP")}} 形式の {{domxref("DOMString")}} です。
+
+ +

定数

+ +

RTCSdpType

+ +

This enum defines strings that describe the current state of the session description, as used in the {{domxref("RTCSessionDescription.type", "type")}} property. The session description's type will be specified using one of these values.

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
説明
answerThe SDP contained in the {{domxref("RTCSessionDescription.sdp", "sdp")}} property is the definitive choice in the exchange. In other words, this session description describes the agreed-upon configuration, and is being sent to finalize negotiation.
offerThe session description object describes the initial proposal in an offer/answer exchange. The session negotiation process begins with an offer being sent from the caller to the callee.
pranswerThe session description object describes a provisional answer; that is, it's a response to a previous offer or provisional answer.
rollbackThis special type with an empty session description is used to roll back to the previous stable state.
+ +

メソッド

+ +

RTCSessionDescription が継承するメソッドは存在しません。

+ +
+
{{domxref("RTCSessionDescription.RTCSessionDescription", "RTCSessionDescription()")}} {{deprecated_inline}}
+
新しい RTCSessionDescription を返します。この引数は RTCSessionDescriptionInit ディクショナリであり (任意の) 2つの引数を含みます。これらの引数の1つまたは全て与えられなかった場合、関連するプロパティはnullに設定されます。
+
{{domxref("RTCSessionDescription.toJSON()")}}
+
このオブジェクトの {{Glossary("JSON")}} による表現を生成して返します。生成された JSON は、{{domxref("RTCSessionDescription.type", "type")}} と {{domxref("RTCSessionDescription.sdp", "sdp")}}を含みます。
+
+ +

+ +
signalingChannel.onmessage = function (evt) {
+    if (!pc)
+        start(false);
+
+    var message = JSON.parse(evt.data);
+    if (message.sdp)
+        pc.setRemoteDescription(new RTCSessionDescription(message), function () {
+            // オファーを受け取った場合、このオファーに対して応答する。
+            if (pc.remoteDescription.type == "offer")
+                pc.createAnswer(localDescCreated, logError);
+        }, logError);
+    else
+        pc.addIceCandidate(new RTCIceCandidate(message.candidate),
+            function () {}, logError);
+};
+
+ +

仕様策定状況

+ + + + + + + + + + + + + + + + +
仕様書策定状況コメント
{{ SpecName('WebRTC 1.0', '#rtcsessiondescription-class', 'RTCSessionDescription') }}{{Spec2('WebRTC 1.0')}}初回定義
+ +

ブラウザーの対応

+ + + +

{{Compat("api.RTCSessionDescription")}}

+ +

関連情報

+ + -- cgit v1.2.3-54-g00ecf