Internet Engineering Task Force (IETF)                         J. Uberti
Request for Comments: 9429                                              
Obsoletes: 8829                                              C. Jennings
Category: Standards Track                                          Cisco
ISSN: 2070-1721                                         E. Rescorla, Ed.
                                                 Windy Hill Systems, LLC
                                                              April 2024
        
JavaScript Session Establishment Protocol (JSEP)
JavaScriptセッション設立プロトコル(JSEP)
Abstract
概要

This document describes the mechanisms for allowing a JavaScript application to control the signaling plane of a multimedia session via the interface specified in the W3C RTCPeerConnection API and discusses how this relates to existing signaling protocols.

このドキュメントでは、JavaScriptアプリケーションがW3C RTCPeerconnection APIで指定されたインターフェイスを介してマルチメディアセッションのシグナル伝達面を制御できるようにするためのメカニズムについて説明し、これが既存のシグナル伝達プロトコルとどのように関連するかについて説明します。

This specification obsoletes RFC 8829.

この仕様が廃止されたRFC 8829。

Status of This Memo
本文書の位置付け

This is an Internet Standards Track document.

これは、インターネット標準トラックドキュメントです。

This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 7841.

このドキュメントは、インターネットエンジニアリングタスクフォース(IETF)の製品です。IETFコミュニティのコンセンサスを表しています。公開レビューを受けており、インターネットエンジニアリングステアリンググループ(IESG)からの出版が承認されています。インターネット標準の詳細については、RFC 7841のセクション2で入手できます。

Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at https://www.rfc-editor.org/info/rfc9429.

このドキュメントの現在のステータス、任意のERRATA、およびそのフィードバックを提供する方法に関する情報は、https://www.rfc-editor.org/info/rfc9429で取得できます。

著作権表示

Copyright (c) 2024 IETF Trust and the persons identified as the document authors. All rights reserved.

著作権(c)2024 IETF Trustおよび文書著者として特定された人。無断転載を禁じます。

This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License.

このドキュメントは、BCP 78およびIETFドキュメント(https://trustee.ietf.org/license-info)に関連するIETF Trustの法的規定の対象となります。この文書に関するあなたの権利と制限を説明するので、これらの文書を注意深く確認してください。このドキュメントから抽出されたコードコンポーネントには、セクション4.Eで説明されている法的規定のセクション4.Eで説明されており、改訂されたBSDライセンスで説明されている保証なしで提供されるように、改訂されたBSDライセンステキストを含める必要があります。

Table of Contents
目次
   1.  Introduction
     1.1.  General Design of JSEP
     1.2.  Other Approaches Considered
     1.3.  Changes from RFC 8829
   2.  Terminology
   3.  Semantics and Syntax
     3.1.  Signaling Model
     3.2.  Session Descriptions and State Machine
     3.3.  Session Description Format
     3.4.  Session Description Control
       3.4.1.  RtpTransceivers
       3.4.2.  RtpSenders
       3.4.3.  RtpReceivers
     3.5.  ICE
       3.5.1.  ICE Gathering Overview
       3.5.2.  ICE Candidate Trickling
         3.5.2.1.  ICE Candidate Format
       3.5.3.  ICE Candidate Policy
       3.5.4.  ICE Candidate Pool
       3.5.5.  ICE Versions
     3.6.  Video Size Negotiation
       3.6.1.  Creating an imageattr Attribute
       3.6.2.  Interpreting imageattr Attributes
     3.7.  Simulcast
     3.8.  Interactions with Forking
       3.8.1.  Sequential Forking
       3.8.2.  Parallel Forking
   4.  Interface
     4.1.  PeerConnection
       4.1.1.  Constructor
       4.1.2.  addTrack
       4.1.3.  removeTrack
       4.1.4.  addTransceiver
       4.1.5.  onaddtrack Event
       4.1.6.  createDataChannel
       4.1.7.  ondatachannel Event
       4.1.8.  createOffer
       4.1.9.  createAnswer
       4.1.10. SessionDescriptionType
         4.1.10.1.  Use of Provisional Answers
         4.1.10.2.  Rollback
       4.1.11. setLocalDescription
       4.1.12. setRemoteDescription
       4.1.13. currentLocalDescription
       4.1.14. pendingLocalDescription
       4.1.15. currentRemoteDescription
       4.1.16. pendingRemoteDescription
       4.1.17. canTrickleIceCandidates
       4.1.18. setConfiguration
       4.1.19. addIceCandidate
       4.1.20. onicecandidate Event
     4.2.  RtpTransceiver
       4.2.1.  stop
       4.2.2.  stopped
       4.2.3.  setDirection
       4.2.4.  direction
       4.2.5.  currentDirection
       4.2.6.  setCodecPreferences
   5.  SDP Interaction Procedures
     5.1.  Requirements Overview
       5.1.1.  Usage Requirements
       5.1.2.  Profile Names and Interoperability
     5.2.  Constructing an Offer
       5.2.1.  Initial Offers
       5.2.2.  Subsequent Offers
       5.2.3.  Options Handling
         5.2.3.1.  IceRestart
         5.2.3.2.  VoiceActivityDetection
     5.3.  Generating an Answer
       5.3.1.  Initial Answers
       5.3.2.  Subsequent Answers
       5.3.3.  Options Handling
         5.3.3.1.  VoiceActivityDetection
     5.4.  Modifying an Offer or Answer
     5.5.  Processing a Local Description
     5.6.  Processing a Remote Description
     5.7.  Processing a Rollback
     5.8.  Parsing a Session Description
       5.8.1.  Session-Level Parsing
       5.8.2.  Media Section Parsing
       5.8.3.  Semantics Verification
     5.9.  Applying a Local Description
     5.10. Applying a Remote Description
     5.11. Applying an Answer
   6.  Processing RTP/RTCP
   7.  Examples
     7.1.  Simple Example
     7.2.  Detailed Example
     7.3.  Early Transport Warmup Example
   8.  Security Considerations
   9.  IANA Considerations
   10. References
     10.1.  Normative References
     10.2.  Informative References
   Appendix A.  SDP ABNF Syntax
   Acknowledgements
   Authors' Addresses
        
1. Introduction
1. はじめに

This document describes how the W3C Web Real-Time Communication (WebRTC) RTCPeerConnection interface [W3C.webrtc] is used to control the setup, management, and teardown of a multimedia session.

このドキュメントでは、W3C Webリアルタイム通信(WEBRTC)RTCPEERConnectionインターフェイス[W3C.Webrtc]を使用して、マルチメディアセッションのセットアップ、管理、および分解を制御する方法について説明します。

1.1. General Design of JSEP
1.1. JSEPの一般的なデザイン

WebRTC call setup has been designed to focus on controlling the media plane, leaving signaling-plane behavior up to the application as much as possible. The rationale is that different applications may prefer to use different protocols, such as the existing SIP call signaling protocol, or something custom to the particular application, perhaps for a novel use case. In this approach, the key information that needs to be exchanged is the multimedia session description, which specifies the transport and media configuration information necessary to establish the media plane.

WeBRTCコールのセットアップは、メディアプレーンの制御に焦点を当てるように設計されており、シグナリングプレーンの動作を可能な限りアプリケーションにままにしています。理論的根拠は、異なるアプリケーションが、既存のSIPコールシグナル伝達プロトコル、またはおそらく新しいユースケースのために、特定のアプリケーションの習慣など、さまざまなプロトコルを使用することを好むかもしれないということです。このアプローチでは、交換する必要がある重要な情報はマルチメディアセッションの説明です。これは、メディアプレーンの確立に必要なトランスポートおよびメディア構成情報を指定します。

With these considerations in mind, this document describes the JavaScript Session Establishment Protocol (JSEP), which allows for full control of the signaling state machine from JavaScript. As described above, JSEP assumes a model in which a JavaScript application executes inside a runtime containing WebRTC APIs (the "JSEP implementation"). The JSEP implementation is almost entirely divorced from the core signaling flow, which is instead handled by the JavaScript making use of two interfaces: (1) passing in local and remote session descriptions and (2) interacting with the Interactive Connectivity Establishment (ICE) state machine [RFC8445]. The combination of the JSEP implementation and the JavaScript application is referred to throughout this document as a "JSEP endpoint".

これらの考慮事項を念頭に置いて、このドキュメントは、JavaScriptのシグナリング状態マシンを完全に制御できるJavaScriptセッション確立プロトコル(JSEP)について説明しています。上記のように、JSEPは、WeBRTC API(「JSEP実装」)を含むランタイム内でJavaScriptアプリケーションが実行されるモデルを想定しています。JSEP実装は、ほぼ完全にコア信号フローから離婚しており、代わりに2つのインターフェイスを使用してJavaScriptによって処理されます。マシン[RFC8445]。JSEP実装とJavaScriptアプリケーションの組み合わせは、このドキュメント全体で「JSEPエンドポイント」と呼ばれます。

In this document, the use of JSEP is described as if it always occurs between two JSEP endpoints. Note, though, that in many cases it will actually be between a JSEP endpoint and some kind of server, such as a gateway or Multipoint Control Unit (MCU). This distinction is invisible to the JSEP endpoint; it just follows the instructions it is given via the API.

このドキュメントでは、JSEPの使用は、2つのJSEPエンドポイント間で常に発生するかのように説明されています。ただし、多くの場合、実際にはJSEPエンドポイントと、ゲートウェイやマルチポイントコントロールユニット(MCU)などの何らかのサーバーの間にあることに注意してください。この区別は、JSEPエンドポイントには見えません。APIを介して与えられた命令に従うだけです。

JSEP's handling of session descriptions is simple and straightforward. Whenever an offer/answer exchange is needed, the initiating side creates an offer by calling a createOffer API. The application then uses that offer to set up its local configuration via the setLocalDescription API. The offer is finally sent off to the remote side over its preferred signaling mechanism (e.g., WebSockets); upon receipt of that offer, the remote party installs it using the setRemoteDescription API.

JSEPのセッション説明の処理は、シンプルで簡単です。オファー/回答の交換が必要なときはいつでも、開始側はCreateOffer APIを呼び出すことでオファーを作成します。その後、アプリケーションは、SetlocalDescription APIを介してローカル構成をセットアップするためにその提供を使用します。オファーは、最終的にその好ましいシグナル伝達メカニズム(例:WebSocket)を介して遠隔側に送られます。そのオファーを受け取ると、リモートパーティはsetRemotedescription APIを使用してインストールします。

To complete the offer/answer exchange, the remote party uses the createAnswer API to generate an appropriate answer, applies it using the setLocalDescription API, and sends the answer back to the initiator over the signaling channel. When the initiator gets that answer, it installs it using the setRemoteDescription API, and initial setup is complete. This process can be repeated for additional offer/answer exchanges.

オファー/回答の交換を完了するために、リモートパーティはCreateanswer APIを使用して適切な回答を生成し、Setlocaldescription APIを使用して適用し、信号チャネルを介して回答をイニシエーターに送り返します。イニシエーターがその回答を取得すると、setRemotedescription APIを使用してインストールし、初期セットアップが完了します。このプロセスは、追加オファー/回答の交換のために繰り返すことができます。

Regarding ICE [RFC8445], JSEP decouples the ICE state machine from the overall signaling state machine. The ICE state machine must remain in the JSEP implementation because only the implementation has the necessary knowledge of candidates and other transport information. Performing this separation provides additional flexibility in protocols that decouple session descriptions from transport. For instance, in traditional SIP, each offer or answer is self-contained, including both the session descriptions and the transport information. However, [RFC8840] allows SIP to be used with Trickle ICE [RFC8838], in which the session description can be sent immediately and the transport information can be sent when available. Sending transport information separately can allow for faster ICE and DTLS startup, since ICE checks can start as soon as any transport information is available rather than waiting for all of it. JSEP's decoupling of the ICE and signaling state machines allows it to accommodate either model.

ICE [RFC8445]に関して、JSEPは、シグナリング状態全体のマシンからアイスステートマシンを切り離します。ICEステートマシンは、実装のみが候補者やその他の輸送情報に関する必要な知識を持っているため、JSEP実装にとどまる必要があります。この分離を実行すると、輸送からセッションの説明を切り離すプロトコルに追加の柔軟性が得られます。たとえば、従来のSIPでは、セッションの説明と輸送情報の両方を含む、それぞれのオファーまたは回答が自己完結型です。ただし、[RFC8840]により、SIPをTrickle Ice [RFC8838]で使用することができ、セッションの説明をすぐに送信し、利用可能なときに輸送情報を送信できます。輸送情報を個別に送信すると、氷のチェックがすべてを待つのではなく、輸送情報が利用可能になるとすぐに開始できるため、氷とDTLSのスタートアップが速くなります。JSEPの氷とシグナリング状態のマシンのデカップリングにより、どちらのモデルにも対応できます。

Although it abstracts signaling, the JSEP approach requires that the application be aware of the signaling process. While the application does not need to understand the contents of session descriptions to set up a call, the application must call the right APIs at the right times, convert the session descriptions and ICE information into the defined messages of its chosen signaling protocol, and perform the reverse conversion on the messages it receives from the other side.

シグナリングを抽象化しますが、JSEPアプローチでは、アプリケーションがシグナリングプロセスを認識する必要があります。アプリケーションは、通話を設定するためにセッションの説明の内容を理解する必要はありませんが、アプリケーションは適切なタイミングで適切なAPIを呼び出し、セッションの説明とICE情報を選択した信号プロトコルの定義されたメッセージに変換し、実行する必要があります。反対側から受信するメッセージの逆変換。

One way to make life easier for the application is to provide a JavaScript library that hides this complexity from the developer; said library would implement a given signaling protocol along with its state machine and serialization code, presenting a higher-level call-oriented interface to the application developer. For example, libraries exist to provide implementations of the SIP [RFC3261] and Extensible Messaging and Presence Protocol (XMPP) [RFC6120] signaling protocols atop the JSEP API. Thus, JSEP provides greater control for the experienced developer without forcing any additional complexity on the novice developer.

アプリケーションの生活を容易にする1つの方法は、開発者からこの複雑さを隠すJavaScriptライブラリを提供することです。前述のライブラリは、その状態マシンおよびシリアル化コードとともに特定のシグナリングプロトコルを実装し、アプリケーション開発者に高レベルのコール指向インターフェイスを提示します。たとえば、ライブラリは、SIP [RFC3261]および拡張可能なメッセージングおよび存在プロトコル(XMPP)[RFC6120] JSEP APIの上にシグナリングプロトコルの実装を提供するために存在します。したがって、JSEPは、初心者の開発者に追加の複雑さを強制せずに、経験豊富な開発者に大きな制御を提供します。

1.2. Other Approaches Considered
1.2. 考慮される他のアプローチ

One approach that was considered instead of JSEP was to include a lightweight signaling protocol. Instead of providing session descriptions to the API, the API would produce and consume messages from this protocol. While providing a more high-level API, this put more control of signaling within the JSEP implementation, forcing it to have to understand and handle concepts like signaling glare (see [RFC3264], Section 4).

JSEPの代わりに考慮された1つのアプローチは、軽量シグナル伝達プロトコルを含めることでした。APIにセッションの説明を提供する代わりに、APIはこのプロトコルからメッセージを生成して消費します。より高レベルのAPIを提供しながら、これによりJSEP実装内でシグナリングの制御が強くなり、シグナリンググレアなどの概念を理解して処理する必要があります([RFC3264]、セクション4を参照)。

A second approach that was considered but not chosen was to decouple the management of the media control objects from session descriptions, instead offering APIs that would control each component directly. This was rejected based on the argument that requiring exposure of this level of complexity to the application programmer would not be beneficial; it would (1) result in an API where even a simple example would require a significant amount of code to orchestrate all the needed interactions and (2) create a large API surface that would need to be agreed upon and documented. In addition, these API points could be called in any order, resulting in a more complex set of interactions with the media subsystem than the JSEP approach, which specifies how session descriptions are to be evaluated and applied.

考慮されたが選択されていない2番目のアプローチは、セッションの説明からメディア制御オブジェクトの管理を切り離すことであり、代わりに各コンポーネントを直接制御するAPIを提供することでした。これは、このレベルの複雑さをアプリケーションプログラマーに曝露することを要求することは有益ではないという議論に基づいて拒否されました。(1)APIが発生し、単純な例でさえ、必要なすべての相互作用を調整するためにかなりの量のコードを必要とし、(2)合意して文書化する必要がある大きなAPI表面を作成します。さらに、これらのAPIポイントは任意の順序で呼び出される可能性があり、その結果、JSEPアプローチよりもメディアサブシステムとのより複雑な相互作用セットが得られます。これは、セッションの説明が評価および適用される方法を指定します。

One variation on JSEP that was considered was to keep the basic session-description-oriented API but to move the mechanism for generating offers and answers out of the JSEP implementation. Instead of providing createOffer/createAnswer methods within the implementation, this approach would instead expose a getCapabilities API, which would provide the application with the information it needed in order to generate its own session descriptions. This increases the amount of work that the application needs to do; it needs to know how to generate session descriptions from capabilities, and especially how to generate the correct answer from an arbitrary offer and the supported capabilities. While this could certainly be addressed by using a library like the one mentioned above, it basically forces the use of said library even for a simple example. Providing createOffer/createAnswer avoids this problem.

考慮されたJSEPの1つのバリエーションは、基本的なセッションと説明指向のAPIを維持するが、JSEP実装からオファーと回答を生成するメカニズムを移動することでした。実装内でCreateOffer/CreateAnswerメソッドを提供する代わりに、このアプローチは代わりにGetCapabilities APIを公開し、独自のセッションの説明を生成するために必要な情報をアプリケーションに提供します。これにより、アプリケーションが行う必要がある作業の量が増加します。機能からセッションの説明を生成する方法、特にarbitrary意的なオファーとサポートされている機能から正しい答えを生成する方法を知る必要があります。これは確かに上記のようなライブラリを使用することで対処できますが、基本的には簡単な例でも上記のライブラリの使用を強制します。createoffer/createanswerを提供すると、この問題は回避されます。

1.3. Changes from RFC 8829
1.3. RFC 8829からの変更

When [RFC8829] was published, inconsistencies regarding BUNDLE [RFC8843] operation were identified with regard to both the specification text and implementation behavior. The former concern was addressed via an update to BUNDLE (see [RFC9143]). For the latter concern, it was observed that some implementations implemented the "max-bundle" bundle policy defined in [RFC8829] by assuming that bundling had already been negotiated, rather than marking "m=" sections as bundle-only as indicated by the BUNDLE specification. In order to prevent unexpected changes to applications relying on the pre-standard behavior, the decision was made to deprecate "max-bundle" and instead introduce an identically defined "must-bundle" policy that, when selected, provides the behavior originally specified by [RFC8829].

[RFC8829]が公開されたとき、バンドル[RFC8843]に関する矛盾は、仕様テキストと実装動作の両方に関して特定されました。前者の懸念は、バンドルの更新を介して対処されました([RFC9143]を参照)。後者の懸念のために、一部の実装は、バンドリングがすでに交渉されていると仮定することにより、[RFC8829]で定義された「Max-Bundle」バンドルポリシーを実装したことが観察されました。バンドル仕様。標準以前の動作に依存しているアプリケーションへの予期しない変更を防ぐために、「マックスバンドル」を非難し、代わりに選択されたときに選択された動作を提供する同一に定義された「必見」ポリシーを導入するという決定が下されました。[RFC8829]。

2. Terminology
2. 用語

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.

「必須」、「必要」、「必須」、「shall」、「shall」、「suff」、 "not"、 "becommended"、 "becommented"、 "may"、 "optional「このドキュメントでは、BCP 14 [RFC2119] [RFC8174]で説明されているように解釈されます。

3. Semantics and Syntax
3. セマンティクスと構文
3.1. Signaling Model
3.1. シグナリングモデル

JSEP does not specify a particular signaling model or state machine, other than the generic need to exchange session descriptions in the fashion described by [RFC3264] (offer/answer) in order for both sides of the session to know how to conduct the session. JSEP provides mechanisms to create offers and answers, as well as to apply them to a session. However, the JSEP implementation is totally decoupled from the actual mechanism by which these offers and answers are communicated to the remote side, including addressing, retransmission, forking, and glare handling. These issues are left entirely up to the application; the application has complete control over which offers and answers get handed to the implementation, and when.

JSEPは、セッションの両側がセッションの実施方法を知るために、[rfc3264](offer/nesson)で記述されたファッションでセッションの説明を交換する一般的なニーズを除いて、特定のシグナル伝達モデルまたは状態マシンを指定しません。JSEPは、オファーと回答を作成し、セッションに適用するメカニズムを提供します。ただし、JSEPの実装は、アドレス指定、再送信、フォーキング、グレア処理など、これらのオファーと回答がリモート側に伝えられる実際のメカニズムから完全に分離されています。これらの問題は完全にアプリケーションに任されています。アプリケーションは、どのオファーと回答が実装に渡されるかを完全に制御します。

         +-----------+                               +-----------+
         |  Web App  |<--- App-Specific Signaling -->|  Web App  |
         +-----------+                               +-----------+
               ^                                            ^
               |  SDP                                       |  SDP
               V                                            V
         +-----------+                                +-----------+
         |   JSEP    |<----------- Media ------------>|   JSEP    |
         |   Impl.   |                                |   Impl.   |
         +-----------+                                +-----------+
        

Figure 1: JSEP Signaling Model

図1:JSEPシグナル伝達モデル

3.2. Session Descriptions and State Machine
3.2. セッションの説明と状態マシン

In order to establish the media plane, the JSEP implementation needs specific parameters to indicate what to transmit to the remote side, as well as how to handle the media that is received. These parameters are determined by the exchange of session descriptions in offers and answers, and there are certain details to this process that must be handled in the JSEP APIs.

メディアプレーンを確立するために、JSEP実装には、リモート側に送信するもの、および受信されたメディアを処理する方法を示すための特定のパラメーターが必要です。これらのパラメーターは、オファーと回答のセッション説明の交換によって決定され、このプロセスにはJSEP APIで処理する必要がある特定の詳細があります。

Whether a session description applies to the local side or the remote side affects the meaning of that description. For example, the list of codecs sent to a remote party indicates what the local side is willing to receive, which, when intersected with the set of codecs the remote side supports, specifies what the remote side should send. However, not all parameters follow this rule; some parameters are declarative, and the remote side must either accept them or reject them altogether. An example of such a parameter is the TLS fingerprints [RFC8122] as used in the context of DTLS [RFC6347] [RFC9147]; these fingerprints are calculated based on the local certificate(s) offered and are not subject to negotiation.

セッションの説明がローカル側に適用されるかリモート側に適用されるかは、その説明の意味に影響します。たとえば、リモートパーティーに送信されたコーデックのリストは、地元側が受け取る意思があるものを示します。これは、リモート側がサポートするコーデックのセットと交差すると、リモート側が送信するものを指定します。ただし、すべてのパラメーターがこのルールに従っているわけではありません。一部のパラメーターは宣言的であり、リモート側はそれらを受け入れるか、完全に拒否する必要があります。このようなパラメーターの例は、DTLS [RFC6347] [RFC9147]のコンテキストで使用されるTLS指紋[RFC8122]です。これらの指紋は、提供されるローカル証明書に基づいて計算され、交渉の対象ではありません。

In addition, various RFCs put different conditions on the format of offers versus answers. For example, an offer may propose an arbitrary number of "m=" sections (i.e., media descriptions as described in [RFC4566], Section 5.14), but an answer must contain the exact same number as the offer.

さらに、さまざまなRFCは、オファーの形式と回答の形式にさまざまな条件を置きます。たとえば、オファーは、任意の数の「m =」セクション(つまり、[RFC4566]、セクション5.14で説明されているメディアの説明)を提案する場合がありますが、回答にはオファーとまったく同じ数を含める必要があります。

Lastly, while the exact media parameters are known only after an offer and an answer have been exchanged, the offerer may receive ICE checks, and possibly media (e.g., in the case of a re-offer after a connection has been established) before it receives an answer. To properly process incoming media in this case, the offerer's media handler must be aware of the details of the offer before the answer arrives.

最後に、正確なメディアパラメーターはオファーの後にのみ知られており、回答が交換された後には、オファーはアイスチェックを受け取ることができます(例:接続が確立された後に再参入の場合)答えを受け取ります。この場合、受信メディアを適切に処理するには、オファーのメディアハンドラーは、回答が到着する前にオファーの詳細を認識する必要があります。

Therefore, in order to handle session descriptions properly, the JSEP implementation needs:

したがって、セッションの説明を適切に処理するために、JSEP実装のニーズは次のとおりです。

1. To know if a session description pertains to the local or remote side.

1. セッションの説明がローカル側またはリモート側に関係しているかどうかを知るため。

2. To know if a session description is an offer or an answer.

2. セッションの説明がオファーまたは回答であるかどうかを知るため。

3. To allow the offer to be specified independently of the answer.

3. 答えとは独立してオファーを指定できるようにするため。

JSEP addresses this by adding both setLocalDescription and setRemoteDescription methods and having session description objects contain a type field indicating the type of session description being supplied. This satisfies the requirements listed above for both the offerer, who first calls setLocalDescription(sdp [offer]) and then later setRemoteDescription(sdp [answer]), and the answerer, who first calls setRemoteDescription(sdp [offer]) and then later setLocalDescription(sdp [answer]).

JSEPは、SetLocalDescriptionとSetRemotedEdscriptionメソッドの両方を追加し、セッションの説明オブジェクトが提供されるセッション説明のタイプを示すタイプフィールドを含むことにより、これに対処します。これは、最初にsetlocaldescription(SDP [offer])を呼び出し、次にsetRemotedescription(SDP [Answer])を呼び出す提供者の両方に上記の要件を満たし、最初にsetRemotedesscription(SDP [offer])を呼び出し、次にセットロカルで説明します。(SDP [回答])。

During the offer/answer exchange, the outstanding offer is considered to be "pending" at the offerer and the answerer, as it may be either accepted or rejected. If this is a re-offer, each side will also have "current" local and remote descriptions, which reflect the result of the last offer/answer exchange. Sections 4.1.14, 4.1.16, 4.1.13, and 4.1.15 provide more detail on pending and current descriptions.

オファー/回答の交換中、未払いの申し出は、受け入れられたり拒否されたりする可能性があるため、提供者と応答者で「保留中」と見なされます。これが再参入の場合、各側は「現在の」ローカルおよびリモートの説明もあり、これは最後のオファー/回答の交換の結果を反映しています。セクション4.1.14、4.1.16、4.1.13、および4.1.15は、保留中および現在の説明の詳細を提供します。

JSEP also allows for an answer to be treated as provisional by the application. Provisional answers provide a way for an answerer to communicate initial session parameters back to the offerer, in order to allow the session to begin, while allowing a final answer to be specified later. This concept of a final answer is important to the offer/answer model; when such an answer is received, any extra resources allocated by the caller can be released, now that the exact session configuration is known. These "resources" can include things like extra ICE components, Traversal Using Relays around NAT (TURN) candidates, or video decoders. Provisional answers, on the other hand, do no such deallocation; as a result, multiple dissimilar provisional answers, with their own codec choices, transport parameters, etc., can be received and applied during call setup. Note that the final answer itself may be different than any received provisional answers.

JSEPでは、申請によって暫定として回答を扱うこともできます。暫定的な回答は、セッションの開始を許可しながら、後で最終的な回答を指定できるように、応答者が初期セッションパラメーターを提供者に伝達する方法を提供します。最終的な答えのこの概念は、オファー/回答モデルにとって重要です。そのような回答が受信されると、正確なセッション構成がわかっているため、発信者によって割り当てられた追加のリソースをリリースできます。これらの「リソース」には、追加の氷コンポーネント、NAT(ターン)候補の周りのリレーを使用したトラバーサル、またはビデオデコーダーなどが含まれます。一方、暫定的な答えは、そのような契約を行いません。その結果、独自のコーデックの選択、輸送パラメーターなどを備えた複数の異なる暫定的な回答を、コールセットアップ中に受信および適用できます。最終回答自体は、受け取った暫定的な回答とは異なる場合があることに注意してください。

In [RFC3264], the constraint at the signaling level is that only one offer can be outstanding for a given session, but at the JSEP level, a new offer can be generated at any point. For example, when using SIP for signaling, if one offer is sent and is then canceled using a SIP CANCEL, another offer can be generated even though no answer was received for the first offer. To support this, the JSEP media layer can provide an offer via the createOffer method whenever the JavaScript application needs one for the signaling. The answerer can send back zero or more provisional answers and then finally end the offer/answer exchange by sending a final answer. The state machine for this is as follows:

[RFC3264]では、シグナリングレベルでの制約は、特定のセッションで1つのオファーのみが顕著であることですが、JSEPレベルでは、いつでも新しいオファーを生成できることです。たとえば、SIPをシグナリングに使用する場合、1つのオファーが送信され、SIPキャンセルを使用してキャンセルされる場合、最初のオファーに対して回答が受け取られていなくても、別のオファーを生成できます。これをサポートするために、JSEPメディアレイヤーは、JavaScriptアプリケーションがシグナリングに必要な場合はいつでも、CreateOfferメソッドを介してオファーを提供できます。回答者は、ゼロ以上の暫定的な回答を送り返すことができ、最終的な回答を送信して最終的にオファー/回答の交換を終了できます。これのための状態マシンは次のとおりです。

                       setRemote(OFFER)               setLocal(PRANSWER)
                           /-----\                               /-----\
                           |     |                               |     |
                           v     |                               v     |
            +---------------+    |                +---------------+    |
            |               |----/                |               |----/
            |  have-        | setLocal(PRANSWER)  | have-         |
            |  remote-offer |------------------- >| local-pranswer|
            |               |                     |               |
            |               |                     |               |
            +---------------+                     +---------------+
                 ^   |                                   |
                 |   | setLocal(ANSWER)                  |
   setRemote(OFFER)  |                                   |
                 |   V                  setLocal(ANSWER) |
            +---------------+                            |
            |               |                            |
            |               |<---------------------------+
            |    stable     |
            |               |<---------------------------+
            |               |                            |
            +---------------+          setRemote(ANSWER) |
                 ^   |                                   |
                 |   | setLocal(OFFER)                   |
   setRemote(ANSWER) |                                   |
                 |   V                                   |
            +---------------+                     +---------------+
            |               |                     |               |
            |  have-        | setRemote(PRANSWER) |have-          |
            |  local-offer  |------------------- >|remote-pranswer|
            |               |                     |               |
            |               |----\                |               |----\
            +---------------+    |                +---------------+    |
                           ^     |                               ^     |
                           |     |                               |     |
                           \-----/                               \-----/
                       setLocal(OFFER)               setRemote(PRANSWER)
        

Figure 2: JSEP State Machine

図2:JSEPステートマシン

Aside from these state transitions, there is no other difference between the handling of provisional ("pranswer") and final ("answer") answers.

これらの状態の移行は別として、暫定(「プランザー」)と最終(「回答」)の回答の取り扱いに他の違いはありません。

3.3. Session Description Format
3.3. セッションの説明形式

JSEP's session descriptions use Session Description Protocol (SDP) syntax for their internal representation. While this format is not optimal for manipulation from JavaScript, it is widely accepted and is frequently updated with new features; any alternate encoding of session descriptions would have to keep pace with the changes to SDP, at least until the time that this new encoding eclipsed SDP in popularity.

JSEPのセッションの説明は、内部表現にセッション説明プロトコル(SDP)構文を使用します。この形式はJavaScriptからの操作には最適ではありませんが、広く受け入れられており、新機能で頻繁に更新されます。セッションの説明の代替エンコーディングは、少なくともこの新しいエンコードが人気のSDPを覆うまで、少なくともSDPの変更に対応する必要があります。

However, to provide for future flexibility, the SDP syntax is encapsulated within a SessionDescription object, which can be constructed from SDP and be serialized out to SDP. If future specifications agree on a JSON format for session descriptions, this object could be enhanced to generate and consume that JSON.

ただし、将来の柔軟性を提供するために、SDP構文はSDPから構築され、SDPにシリアル化できるSessionDescriptionオブジェクト内にカプセル化されます。将来の仕様がセッションの説明のためにJSON形式に一致する場合、このオブジェクトを強化してそのJSONを生成および消費することができます。

As detailed below, most applications should be able to treat the SessionDescriptions produced and consumed by these various API calls as opaque blobs; that is, the application will not need to parse or understand them.

以下に詳述するように、ほとんどのアプリケーションは、これらのさまざまなAPI呼び出しによって生成および消費されるセッションが不透明なブロブとして扱うことができるはずです。つまり、アプリケーションはそれらを解析したり理解したりする必要はありません。

3.4. Session Description Control
3.4. セッションの説明制御

In order to give the application control over various common session parameters, JSEP provides control surfaces that tell the JSEP implementation how to generate session descriptions. In most cases, this removes the need for applications to modify session descriptions after they are created.

さまざまな一般的なセッションパラメーターに対するアプリケーション制御を提供するために、JSEPはJSEP実装にセッションの説明を生成する方法を伝える制御面を提供します。ほとんどの場合、これにより、アプリケーションが作成された後にセッションの説明を変更する必要性が削除されます。

Changes to these objects result in changes to the session descriptions generated by subsequent createOffer/createAnswer calls.

これらのオブジェクトの変更により、その後のCreateOffer/CreateAnswerコールによって生成されたセッションの説明が変更されます。

3.4.1. RtpTransceivers
3.4.1. rtptransceivers

RtpTransceivers allow the application to control the RTP media associated with one "m=" section. Each RtpTransceiver has an RtpSender and an RtpReceiver, which an application can use to control the sending and receiving of RTP media. The application may also modify the RtpTransceiver directly, for instance, by stopping it.

RTPTransceiversを使用すると、アプリケーションは1つの「m =」セクションに関連付けられたRTPメディアを制御できます。各rtptransceiverにはRTPSENDERとRTPReceiverがあり、アプリケーションはRTPメディアの送信と受信を制御するために使用できます。また、アプリケーションは、たとえば停止して、rtptransceiverを直接変更する場合があります。

RtpTransceivers generally have a 1:1 mapping with "m=" sections, although there may be more RtpTransceivers than "m=" sections when RtpTransceivers are created but not yet associated with an "m=" section, or if RtpTransceivers have been stopped and disassociated from "m=" sections. An RtpTransceiver is said to be associated with an "m=" section if its mid property is non-null, i.e., set to a valid Media Identification (MID) value; otherwise, it is said to be disassociated. The associated "m=" section is determined using a mapping between transceivers and "m=" section indices, formed when creating an offer or applying a remote offer.

rtptransceiverは一般に「m =」セクションで1:1のマッピングを持っていますが、rtptransceiverが作成されているが「m =」セクションにまだ関連していない場合、またはrtptransceiversが停止している場合、「m =」セクションよりも多くのrtptransceiverがある場合があります。「m =」セクションから分離されます。rtptransceiverは、中間プロパティが非ヌルである場合、「m =」セクションに関連付けられていると言われています。そうでなければ、それは分離されていると言われています。関連する「m =」セクションは、オファーを作成したりリモートオファーを適用するときに形成されるトランシーバーと「m =」セクションインデックスの間のマッピングを使用して決定されます。

An RtpTransceiver is never associated with more than one "m=" section, and once a session description is applied, an "m=" section is always associated with exactly one RtpTransceiver. However, in certain cases where an "m=" section has been rejected, as discussed in Section 5.2.2 below, that "m=" section will be "recycled" and associated with a new RtpTransceiver with a new MID value.

rtptransceiverは複数の「m =」セクションに関連することはなく、セッションの説明が適用されると、「m =」セクションは常に正確に1つのrtptransceiverに関連付けられます。ただし、以下のセクション5.2.2で説明されているように、「m =」セクションが拒否された特定の場合、「m =」セクションは「リサイクル」され、新しいMID値を持つ新しいRTPTransceiverに関連付けられます。

RtpTransceivers can be created explicitly by the application or implicitly by calling setRemoteDescription with an offer that adds new "m=" sections.

rtptransceiverは、新しい「m =」セクションを追加するオファーを使用して、setRemotedescriptionを呼び出すことにより、アプリケーションによって明示的に作成されるか、暗黙的に作成できます。

3.4.2. RtpSenders
3.4.2. rtpsenders

RtpSenders allow the application to control how RTP media is sent. An RtpSender is conceptually responsible for the outgoing RTP stream(s) described by an "m=" section. This includes encoding the attached MediaStreamTrack, sending RTP media packets, and generating/ processing the RTP Control Protocol (RTCP) for the outgoing RTP streams(s).

RTPSENDERSは、RTPメディアの送信方法を制御できるようにアプリケーションを許可します。RTPSENDERは、「M =」セクションで説明されている発信RTPストリームについて概念的に責任を負います。これには、添付のMediaStreamTrackのエンコード、RTPメディアパケットの送信、発信RTPストリームのRTP制御プロトコル(RTCP)の生成/処理が含まれます。

3.4.3. RtpReceivers
3.4.3. rtpreceivers

RtpReceivers allow the application to inspect how RTP media is received. An RtpReceiver is conceptually responsible for the incoming RTP stream(s) described by an "m=" section. This includes processing received RTP media packets, decoding the incoming stream(s) to produce a remote MediaStreamTrack, and generating/ processing RTCP for the incoming RTP stream(s).

RTPreceiversでは、アプリケーションがRTPメディアの受信方法を検査することを許可します。RTPreceiverは、「M =」セクションで説明されている着信RTPストリームに対して概念的に責任を負います。これには、受信したRTPメディアパケットの処理、着信ストリームのデコードでリモートMediaStreamTrackを生成し、着信RTPストリームのRTCPを生成/処理することが含まれます。

3.5. ICE
3.5. 氷
3.5.1. ICE Gathering Overview
3.5.1. アイス収集の概要

JSEP gathers ICE candidates as needed by the application. Collection of ICE candidates is referred to as a gathering phase, and this is triggered either by the addition of a new or recycled "m=" section to the local session description or by new ICE credentials in the description, indicating an ICE restart. Use of new ICE credentials can be triggered explicitly by the application or implicitly by the JSEP implementation in response to changes in the ICE configuration.

JSEPは、アプリケーションに必要に応じてICE候補者を収集します。氷の候補者のコレクションは収集段階と呼ばれ、これは、ローカルセッションの説明に新しいまたはリサイクルされた「m =」セクションが追加されるか、説明の新しいアイス資格情報のいずれかによってトリガーされます。新しいアイス資格の使用は、アプリケーションによって明示的にトリガーされるか、氷の構成の変更に応じてJSEP実装によって暗黙的にトリガーされる可能性があります。

When the ICE configuration changes in a way that requires a new gathering phase, a 'needs-ice-restart' bit is set. When this bit is set, calls to the createOffer API will generate new ICE credentials. This bit is cleared by a call to the setLocalDescription API with new ICE credentials from either an offer or an answer, i.e., from either a locally or remotely initiated ICE restart.

新しい収集段階を必要とする方法で氷の構成が変更されると、「ニーズアイスリスターアート」ビットが設定されます。このビットが設定されると、CreateOffer APIへの呼び出しが新しいICE資格情報を生成します。このビットは、オファーまたは回答のいずれかからの新しいアイスクレデンシャル、つまりローカルまたはリモートで開始されたアイス再起動のいずれかからの新しいアイス資格情報を使用したSetlocalDescription APIへの呼び出しによってクリアされます。

When a new gathering phase starts, the ICE agent will notify the application that gathering is occurring through a state change event. Then, when each new ICE candidate becomes available, the ICE agent will supply it to the application via an onicecandidate event; these candidates will also automatically be added to the current and/or pending local session description. Finally, when all candidates have been gathered, a final onicecandidate event will be dispatched to signal that the gathering process is complete.

新しい収集フェーズが開始されると、ICEエージェントは、州の変更イベントを通じて収集が発生しているというアプリケーションに通知します。その後、新しい氷の候補がそれぞれ利用可能になると、ICEエージェントはOniceCandidateイベントを介してアプリケーションに供給します。また、これらの候補者は、現在および/または保留中のローカルセッションの説明に自動的に追加されます。最後に、すべての候補者が収集された場合、最終的なオニカン依存症イベントが発送され、収集プロセスが完了していることを示します。

Note that gathering phases only gather the candidates needed by new/recycled/restarting "m=" sections; other "m=" sections continue to use their existing candidates. Also, if an "m=" section is bundled (either by a successful bundle negotiation or by being marked as bundle-only), then candidates will be gathered and exchanged for that "m=" section if and only if its MID item is a BUNDLE-tag, as described in [RFC9143].

収集フェーズは、「M =」セクションの新規/リサイクル/再起動に必要な候補者のみを集めることに注意してください。他の「m =」セクションは、既存の候補者を引き続き使用しています。また、「M =」セクションがバンドルされている場合(バンドルネゴシエーションが成功するか、バンドルのみとしてマークされていることによって)、候補者は収集され、その中間項目の場合にのみ「m =」セクションと交換されます。[RFC9143]で説明されているように、バンドルタグ。

3.5.2. ICE Candidate Trickling
3.5.2. アイス候補のトリクリング

Candidate trickling is a technique through which a caller may incrementally provide candidates to the callee after the initial offer has been dispatched; the semantics of "Trickle ICE" are defined in [RFC8838]. This process allows the callee to begin acting upon the call and setting up the ICE (and perhaps DTLS) connections immediately, without having to wait for the caller to gather all possible candidates. This results in faster media setup in cases where gathering is not performed prior to initiating the call.

候補者のトリクリングは、最初の申し出が派遣された後、発信者が候補者をカリーに徐々に提供できるテクニックです。「トリクルアイス」のセマンティクスは[RFC8838]で定義されています。このプロセスにより、Calleeは、発信者がすべての可能な候補者を収集するのを待つことなく、コールに基づいて氷(およびおそらくDTL)接続をすぐに設定することができます。これにより、コールを開始する前に収集が実行されない場合のメディアセットアップが高速になります。

JSEP supports optional candidate trickling by providing APIs, as described above, that provide control and feedback on the ICE candidate gathering process. Applications that support candidate trickling can send the initial offer immediately and send individual candidates when they get notified of a new candidate; applications that do not support this feature can simply wait for the indication that gathering is complete, and then create and send their offer, with all the candidates, at that time.

JSEPは、上記のように、ICE候補の収集プロセスを制御とフィードバックを提供するAPIを提供することにより、オプションの候補者のトリクリングをサポートします。候補者のトリクリングをサポートするアプリケーションは、最初のオファーをすぐに送信し、新しい候補者に通知されたときに個々の候補者を送ることができます。この機能をサポートしていないアプリケーションは、収集が完了していることを示すことを待つだけで、その時点ですべての候補者とオファーを作成して送信できます。

Upon receipt of trickled candidates, the receiving application will supply them to its ICE agent. This triggers the ICE agent to start using the new remote candidates for connectivity checks.

トリクルされた候補者を受け取ると、受信申請書はそれらを氷剤に供給します。これにより、アイスエージェントが接続性チェックのために新しいリモート候補の使用を開始します。

3.5.2.1. ICE Candidate Format
3.5.2.1. ICE候補形式

In JSEP, ICE candidates are abstracted by an IceCandidate object, and as with session descriptions, SDP syntax is used for the internal representation.

JSEPでは、ICE候補はIceCandidateオブジェクトによって抽象化され、セッションの説明と同様に、SDP構文が内部表現に使用されます。

The candidate details are specified in an IceCandidate field, using the same SDP syntax as the "candidate-attribute" field defined in [RFC8839], Section 5.1. Note that this field does not contain an "a=" prefix, as indicated in the following example:

候補の詳細は、[RFC8839]、セクション5.1で定義されている「候補者とアトリブ」フィールドと同じSDP構文を使用して、Icecandidateフィールドで指定されています。このフィールドには、次の例に示されているように、「a =」プレフィックスが含まれていないことに注意してください。

   candidate:1 1 UDP 1694498815 192.0.2.33 10000 typ host
        

The IceCandidate object contains a field to indicate which ICE username fragment (ufrag) it is associated with, as defined in [RFC8839], Section 5.4. This value is used to determine which session description (and thereby which gathering phase) this IceCandidate belongs to, which helps resolve ambiguities during ICE restarts. If this field is absent in a received IceCandidate (perhaps when communicating with a non-JSEP endpoint), the most recently received session description is assumed.

IceCandidateオブジェクトには、[RFC8839]で定義されているように、セクション5.4で定義されているように、どのICEユーザー名フラグメント(UFRAG)が関連付けられているかを示すフィールドが含まれています。この値は、このIceCandidateが属するセッションの説明(およびどの収集フェーズ)を決定するために使用されます。これは、アイス再起動中の曖昧さを解決するのに役立ちます。受信したiceCandidateにこのフィールドが存在しない場合(おそらくJSEP以外のエンドポイントと通信するとき)、最近受信したセッションの説明が想定されます。

The IceCandidate object also contains fields to indicate which "m=" section it is associated with, which can be identified in one of two ways: either by an "m=" section index or by a MID. The "m=" section index is a zero-based index, with index N referring to the N+1th "m=" section in the session description referenced by this IceCandidate. The MID is a "media stream identification" value, as defined in [RFC5888], Section 4, which provides a more robust way to identify the "m=" section in the session description, using the MID of the associated RtpTransceiver object (which may have been locally generated by the answerer when interacting with a non-JSEP endpoint that does not support the MID attribute, as discussed in Section 5.10 below). If the MID field is present in a received IceCandidate, it MUST be used for identification; otherwise, the "m=" section index is used instead.

IceCandidateオブジェクトには、「M =」セクションが関連付けられている「M =」セクションを示すフィールドも含まれています。これは、「M =」セクションインデックスまたはMIDの2つの方法のいずれかで識別できます。「m =」セクションインデックスはゼロベースのインデックスであり、インデックスNは、このiceCandidateで参照されるセッション説明のn+1番目の "m ="セクションを参照します。MIDは、[RFC5888]で定義されている「メディアストリーム識別」値、セクション4です。これは、関連するRTPTransceiverオブジェクトのMIDを使用して、セッション説明の「m =」セクションを識別するより堅牢な方法を提供します(これ以下のセクション5.10で説明するように、MID属性をサポートしていない非JSEPエンドポイントと対話するときに、回答者によってローカルに生成された可能性があります。受信したicecandidateに中間フィールドが存在する場合、識別に使用する必要があります。それ以外の場合、代わりに「m =」セクションインデックスが使用されます。

Other than the "m=" section index, all IceCandidate fields are optional, and implementations MUST NOT reject a candidate simply because an optional field is missing.

「m =」セクションインデックスを除いて、すべてのicecandidateフィールドはオプションであり、オプションのフィールドが欠落しているという理由だけで、実装は候補者を拒否してはなりません。

3.5.3. ICE Candidate Policy
3.5.3. ICE候補ポリシー

Typically, when gathering ICE candidates, the JSEP implementation will gather all possible forms of initial candidates -- host, server-reflexive, and relay. However, in certain cases, applications may want to have more specific control over the gathering process, due to privacy or related concerns. For example, one may want to only use relay candidates, to leak as little location information as possible (keeping in mind that this choice comes with corresponding operational costs). To accomplish this, JSEP allows the application to restrict which ICE candidates are used in a session. Note that this filtering is applied on top of any restrictions the implementation chooses to enforce regarding which IP addresses are permitted for the application, as discussed in [RFC8828].

通常、ICE候補を収集するとき、JSEP実装は、ホスト、サーバー反射、リレーのすべての可能な形式の最初の候補者を収集します。ただし、特定の場合、アプリケーションは、プライバシーまたは関連する懸念により、収集プロセスをより具体的に制御する必要があります。たとえば、リレー候補のみを使用して、できるだけ少ない位置情報をリークしたい場合があります(この選択には、対応する運用コストが伴うことに留意してください)。これを達成するために、JSEPでは、アプリケーションがセッションで使用されるICE候補を制限することを許可します。このフィルタリングは、[RFC8828]で説明されているように、アプリケーションに許可されているIPアドレスが許可されるIPアドレスを実施することを選択する制限の上に適用されることに注意してください。

There may also be cases where the application wants to change which types of candidates are used while the session is active. A prime example is where a callee may initially want to use only relay candidates, to avoid leaking location information to an arbitrary caller, but then change to use all candidates (for lower operational cost) once the user has indicated that they want to take the call. For this scenario, the JSEP implementation MUST allow the candidate policy to be changed in mid-session, subject to the aforementioned interactions with local policy.

また、セッションがアクティブになっている間に、アプリケーションがどのタイプの候補者を使用するかを変更したい場合もあります。主要な例は、Calleeが最初にリレー候補のみを使用して、任意の発信者に位置情報を漏らしないようにしたい場合ですが、ユーザーが服用したいことを示した後、すべての候補者を使用して(運用コストが低い)ことを変更します。電話。このシナリオでは、JSEPの実装により、前述の地域ポリシーとの相互作用を条件として、候補者ポリシーを中間で変更することを許可する必要があります。

To administer the ICE candidate policy, the JSEP implementation will determine the current setting at the start of each gathering phase. Then, during the gathering phase, the implementation MUST NOT expose candidates disallowed by the current policy to the application, use them as the source of connectivity checks, or indirectly expose them via other fields, such as the raddr/rport attributes for other ICE candidates. Later, if a different policy is specified by the application, the application can apply it by kicking off a new gathering phase via an ICE restart.

ICE候補のポリシーを管理するために、JSEP実装は、各収集フェーズの開始時に現在の設定を決定します。次に、収集段階で、実装は、現在のポリシーによって許可されていない候補者をアプリケーションに公開したり、接続チェックのソースとして使用したり、他のICE候補者のRADDR/RPORT属性などの他のフィールドを介して間接的に公開してはなりません。。後で、アプリケーションによって別のポリシーが指定されている場合、アプリケーションは、アイス再起動を介して新しい収集段階を開始することでそれを適用できます。

3.5.4. ICE Candidate Pool
3.5.4. アイス候補プール

JSEP applications typically inform the JSEP implementation to begin ICE gathering via the information supplied to setLocalDescription, as the local description indicates the number of ICE components that will be needed and for which candidates must be gathered. However, to accelerate cases where the application knows the number of ICE components to use ahead of time, it may ask the implementation to gather a pool of potential ICE candidates to help ensure rapid media setup.

JSEPアプリケーションは、通常、JSEPの実装に、ローカルの説明が必要な氷成分の数と候補者の収集が必要な氷成分の数を示しているため、setlocaldescriptionに提供された情報を介して氷の収集を開始するように通知します。ただし、アプリケーションが事前に使用する氷コンポーネントの数を知っているケースを加速するために、迅速なメディアのセットアップを確保するために、潜在的な氷の候補者のプールを収集するよう実装に依頼するかもしれません。

When setLocalDescription is eventually called and the JSEP implementation prepares to gather the needed ICE candidates, it SHOULD start by checking if any candidates are available in the pool. If there are candidates in the pool, they SHOULD be handed to the application immediately via the ICE candidate event. If the pool becomes depleted, either because a larger-than-expected number of ICE components are used or because the pool has not had enough time to gather candidates, the remaining candidates are gathered as usual. This only occurs for the first offer/answer exchange, after which the candidate pool is emptied and no longer used.

SetLocalDescriptionが最終的に呼び出され、JSEP実装が必要なICE候補を収集する準備をする場合、候補者がプールで利用できるかどうかを確認することから始める必要があります。プールに候補者がいる場合は、ICE候補イベントを介してすぐにアプリケーションに渡される必要があります。プールが枯渇した場合、予想よりも多くの氷成分の数が使用されているため、またはプールが候補者を集めるのに十分な時間がなかったため、残りの候補者は通常通りに収集されます。これは、最初のオファー/回答交換でのみ発生し、その後候補プールが空になり、使用されなくなります。

One example of where this concept is useful is an application that expects an incoming call at some point in the future, and wants to minimize the time it takes to establish connectivity, to avoid clipping of initial media. By pre-gathering candidates into the pool, it can exchange and start sending connectivity checks from these candidates almost immediately upon receipt of a call. Note, though, that by holding on to these pre-gathered candidates, which will be kept alive as long as they may be needed, the application will consume resources on the STUN/TURN servers it is using. ("STUN" stands for "Session Traversal Utilities for NAT".)

この概念が役立つ場所の1つの例は、将来のある時点で着信コールを期待するアプリケーションであり、初期メディアの切り抜きを避けるために、接続性を確立するのにかかる時間を最小限に抑えたいと考えています。候補者をプールに事前に収集することで、電話をかけた後すぐにこれらの候補者から接続チェックを交換して送信し始めることができます。ただし、これらの事前に集められた候補者を保持することにより、必要に応じて生存される限り、アプリケーションは使用しているスタン/ターンサーバーでリソースを消費することに注意してください。(「Stun」は「NATのセッショントラバーサルユーティリティ」の略です。)

3.5.5. ICE Versions
3.5.5. アイスバージョン

While this specification formally relies on [RFC8445], at the time of its publication, the majority of WebRTC implementations support the version of ICE described in [RFC5245]. The "ice2" attribute defined in [RFC8445] can be used to detect the version in use by a remote endpoint and to provide a smooth transition from the older specification to the newer one. Implementations MUST be able to accept remote descriptions that do not have the "ice2" attribute.

この仕様は正式に[RFC8445]に依存していますが、その出版時には、WEBRTC実装の大部分は[RFC5245]に記載されているICEのバージョンをサポートしています。[RFC8445]で定義されている「ICE2」属性を使用して、リモートエンドポイントで使用されているバージョンを検出し、古い仕様から新しい仕様へのスムーズな遷移を提供できます。実装は、「ICE2」属性を持たないリモート説明を受け入れることができなければなりません。

3.6. Video Size Negotiation
3.6. ビデオサイズの交渉

Video size negotiation is the process through which a receiver can use the "a=imageattr" SDP attribute [RFC6236] to indicate what video frame sizes it is capable of receiving. A receiver may have hard limits on what its video decoder can process, or it may have some maximum set by policy. By specifying these limits in an "a=imageattr" attribute, JSEP endpoints can attempt to ensure that the remote sender transmits video at an acceptable resolution. However, when communicating with a non-JSEP endpoint that does not understand this attribute, any signaled limits may be exceeded, and the JSEP implementation MUST handle this gracefully, e.g., by discarding the video.

ビデオサイズのネゴシエーションとは、レシーバーが「A = ImageAttr」SDP属性[RFC6236]を使用して、受信できるビデオフレームサイズを示すプロセスです。レシーバーは、ビデオデコーダーが処理できるものに厳しい制限がある場合があります。または、ポリシーによって最大設定されている場合があります。これらの制限を「a = imageattr」属性で指定することにより、JSEPエンドポイントは、リモート送信者が許容できる解像度でビデオを送信するようにしようとします。ただし、この属性を理解していない非JSEPエンドポイントと通信する場合、シグナル付き制限を超える場合があり、JSEPの実装は、たとえばビデオを破棄することにより、これを優雅に処理する必要があります。

Note that certain codecs support transmission of samples with aspect ratios other than 1.0 (i.e., non-square pixels). JSEP implementations will not transmit non-square pixels but SHOULD receive and render such video with the correct aspect ratio. However, sample aspect ratio has no impact on the size negotiation described below; all dimensions are measured in pixels, whether square or not.

特定のコーデックは、1.0以外のアスペクト比(つまり、非二乗ピクセル)を持つサンプルの送信をサポートしていることに注意してください。JSEPの実装では、非二乗ピクセルは送信されませんが、そのようなビデオを正しいアスペクト比で受信してレンダリングする必要があります。ただし、サンプルのアスペクト比は、以下で説明するサイズの交渉に影響を与えません。すべての寸法は、正方形かどうかにかかわらず、ピクセルで測定されます。

3.6.1. Creating an imageattr Attribute
3.6.1. ImageAttr属性の作成

The receiver will first combine any known local limits (e.g., hardware decoder capabilities or local policy) to determine the absolute minimum and maximum sizes it can receive. If there are no known local limits, the "a=imageattr" attribute SHOULD be omitted. If these local limits preclude receiving any video, i.e., the degenerate case of no permitted resolutions, the "a=imageattr" attribute MUST be omitted, and the "m=" section MUST be marked as "sendonly"/"inactive", as appropriate.

受信機は、最初に既知のローカル制限(ハードウェアデコーダー機能やローカルポリシーなど)を組み合わせて、受信できる絶対最小サイズと最大サイズを決定します。既知のローカル制限がない場合、「a = imageattr」属性を省略する必要があります。これらのローカル制限がビデオを受け取ることを妨げる場合、つまり許可されていない解像度の退化したケースを排除する場合、「a = imageattr」属性を省略する必要があり、「m =」セクションは「sendonly」/"inactive」としてマークする必要があります。適切な。

Otherwise, an "a=imageattr" attribute is created with a "recv" direction, and the resulting resolution space formed from the aforementioned intersection is used to specify its minimum and maximum "x=" and "y=" values.

それ以外の場合、「a = imageattr」属性は「recv」方向で作成され、前述の交差点から形成された結果の解像度スペースを使用して、最小および最大の「x =」および「y =」値を指定します。

The rules here express a single set of preferences, and therefore, the "a=imageattr" "q=" value is not important. It SHOULD be set to "1.0".

ここでのルールは、単一の設定セットを表しているため、「a = imageattr」 "q ="値は重要ではありません。「1.0」に設定する必要があります。

The "a=imageattr" field is payload type specific. When all video codecs supported have the same capabilities, use of a single attribute, with the wildcard payload type (*), is RECOMMENDED. However, when the supported video codecs have different limitations, specific "a=imageattr" attributes MUST be inserted for each payload type.

「a = imageattr」フィールドはペイロードタイプ固有です。サポートされているすべてのビデオコーデックに同じ機能がある場合、ワイルドカードペイロードタイプ(*)を使用した単一の属性の使用が推奨されます。ただし、サポートされているビデオコーデックには異なる制限がある場合、ペイロードタイプごとに特定の「a = imageattr」属性を挿入する必要があります。

As an example, consider a system with a multiformat video decoder, which is capable of decoding any resolution from 48x48 to 720p. In this case, the implementation would generate this attribute:

例として、48x48から720pまでの解像度をデコードできるマルチフォームビデオデコーダーを備えたシステムを検討してください。この場合、実装は次の属性を生成します。

a=imageattr:* recv [x=[48:1280],y=[48:720],q=1.0]

a = imageattr:* recv [x = [48:1280]、y = [48:720]、q = 1.0]

This declaration indicates that the receiver is capable of decoding any image resolution from 48x48 up to 1280x720 pixels.

この宣言は、受信者が48x48から1280x720ピクセルまでの画像解像度を解読できることを示しています。

3.6.2. Interpreting imageattr Attributes
3.6.2. ImageAttr属性の解釈

[RFC6236] defines "a=imageattr" to be an advisory field. This means that it does not absolutely constrain the video formats that the sender can use but gives an indication of the preferred values.

[RFC6236]は、「A = ImageAttr」をアドバイザリー分野であると定義しています。これは、送信者が使用できるビデオ形式を絶対に制約するわけではなく、優先値を示すことを意味します。

This specification prescribes behavior that is more specific. When a MediaStreamTrack, which is producing video of a certain resolution (the "track resolution"), is attached to an RtpSender, which is encoding the track video at the same or lower resolution(s) (the "encoder resolutions"), and a remote description is applied that references the sender and contains valid "a=imageattr recv" attributes, it MUST follow the rules below to ensure that the sender does not transmit a resolution that would exceed the size criteria specified in the attributes. These rules MUST be followed as long as the attributes remain present in the remote description, including cases in which the track changes its resolution or is replaced with a different track.

この仕様は、より具体的な動作を規定しています。特定の解像度(「トラック解像度」)のビデオを作成しているMediaStreamTrackがRTPSENDERに添付されている場合、同じまたは低解像度(「エンコーダー解像度」)でトラックビデオをエンコードしています。送信者を参照し、有効な「a = imageattr recv」属性を含むリモート説明が適用されます。以下のルールに従って、送信者が属性で指定されたサイズ基準を超える解像度を送信しないようにする必要があります。これらのルールは、トラックが解像度を変更したり、別のトラックに置き換えられたりする場合を含む、リモート説明に属性が存在する限り、従う必要があります。

Depending on how the RtpSender is configured, it may be producing a single encoding at a certain resolution or, if simulcast (Section 3.7) has been negotiated, multiple encodings, each at their own specific resolution. In addition, depending on the configuration, each encoding may have the flexibility to reduce resolution when needed or may be locked to a specific output resolution.

rtpsenderの構成方法に応じて、特定の解像度で単一のエンコーディングを生成するか、同時放送(セクション3.7)が交渉された場合、それぞれ独自の特定の解像度で複数のエンコーディングがあります。さらに、構成に応じて、各エンコードは、必要に応じて解像度を減らす柔軟性がある場合があります。

For each encoding being produced by the RtpSender, the set of "a=imageattr recv" attributes in the corresponding "m=" section of the remote description is processed to determine what should be transmitted. Only attributes that reference the media format selected for the encoding are considered; each such attribute is evaluated individually, starting with the attribute with the highest "q=" value. If multiple attributes have the same "q=" value, they are evaluated in the order they appear in their containing "m=" section. Note that while JSEP endpoints will include at most one "a=imageattr recv" attribute per media format, JSEP endpoints may receive session descriptions from non-JSEP endpoints with "m=" sections that contain multiple such attributes.

RTPSENDERによって生成されている各エンコードについて、リモート説明の対応する「M =」セクションの「a = imageattr recv」属性のセットは、送信されるべきものを決定するために処理されます。エンコード用に選択されたメディア形式を参照する属性のみが考慮されます。そのような属性はそれぞれ、最高の「Q =」値を持つ属性から始まり、個別に評価されます。複数の属性が同じ「q =」値を持っている場合、「m =」セクションを含む順序で評価されます。JSEPエンドポイントには、メディア形式ごとに最大1つの「a = imageattr recv」属性が含まれますが、JSEPエンドポイントは、複数のそのような属性を含む「m =」セクションを持つ非JSEPエンドポイントからセッションの説明を受信する場合があります。

For each "a=imageattr recv" attribute, the following rules are applied. If this processing is successful, the encoding is transmitted accordingly, and no further attributes are considered for that encoding. Otherwise, the next attribute is evaluated, in the aforementioned order. If none of the supplied attributes can be processed successfully, the encoding MUST NOT be transmitted, and an error SHOULD be raised to the application.

各「a = imageattr recv」属性について、次のルールが適用されます。この処理が成功した場合、エンコーディングはそれに応じて送信され、そのエンコードの属性はさらに考慮されません。それ以外の場合、次の属性が前述の順序で評価されます。提供された属性を正常に処理できない場合、エンコードを送信する必要はなく、アプリケーションにエラーを発生させる必要があります。

* The limits from the attribute are compared to the encoder resolution. Only the specific limits mentioned below are considered; any other values, such as picture aspect ratio, MUST be ignored. When considering a MediaStreamTrack that is producing rotated video, the unrotated resolution MUST be used for the checks. This is required regardless of whether the receiver supports performing receive-side rotation (e.g., through Coordination of Video Orientation (CVO) [TS26.114]), as it significantly simplifies the matching logic.

* 属性からの制限は、エンコーダー解像度と比較されます。以下の特定の制限のみが考慮されます。画像のアスペクト比など、その他の値は無視する必要があります。回転したビデオを作成しているMediaStreamTrackを検討する場合、チェックには無関心な解像度を使用する必要があります。これは、対応するロジックを大幅に簡素化するため、受信者が受信側の回転をサポートするかどうか(たとえば、ビデオオリエンテーション(CVO)の調整(CVO)[TS26.114])をサポートするかどうかに関係なく必要です。

* If the attribute includes a "sar=" (sample aspect ratio) value set to something other than "1.0", indicating that the receiver wants to receive non-square pixels, this cannot be satisfied and the attribute MUST NOT be used.

* 属性に「SAR =」(サンプルアスペクト比)値が「1.0」以外のものに設定されている場合、レシーバーが非2乗ピクセルを受け取ることを望んでいることを示している場合、これは満たすことができず、属性を使用してはなりません。

* If the encoder resolution exceeds the maximum size permitted by the attribute and the encoder is allowed to adjust its resolution, the encoder SHOULD apply downscaling in order to satisfy the limits. Downscaling MUST NOT change the picture aspect ratio of the encoding, ignoring any trivial differences due to rounding. For example, if the encoder resolution is 1280x720 and the attribute specified a maximum of 640x480, the expected output resolution would be 640x360. If downscaling cannot be applied, the attribute MUST NOT be used.

* エンコーダーの解像度が属性によって許可される最大サイズを超え、エンコーダが解像度を調整できる場合、エンコーダは制限を満たすためにダウンスケーリングを適用する必要があります。ダウンスケーリングは、丸めによる些細な違いを無視して、エンコーディングの画像アスペクト比を変更してはなりません。たとえば、エンコーダー解像度が1280x720であり、属性が最大640x480を指定した場合、予想される出力解像度は640x360になります。ダウンスケーリングを適用できない場合、属性を使用してはなりません。

* If the encoder resolution is less than the minimum size permitted by the attribute, the attribute MUST NOT be used; the encoder MUST NOT apply upscaling. JSEP implementations SHOULD avoid this situation by allowing receipt of arbitrarily small resolutions, perhaps via fallback to a software decoder.

* エンコーダー解像度が属性によって許可される最小サイズよりも少ない場合、属性を使用してはなりません。エンコーダーはアップスケーリングを適用しないでください。JSEPの実装は、おそらくソフトウェアデコーダーへのフォールバックを介して、任意の小さな解像度を受信できるようにすることにより、この状況を回避する必要があります。

* If the encoder resolution is within the maximum and minimum sizes, no action is needed.

* エンコーダー解像度が最大サイズと最小サイズ内にある場合、アクションは必要ありません。

3.7. Simulcast
3.7. 同時放送

JSEP supports simulcast transmission of a MediaStreamTrack, where multiple encodings of the source media can be transmitted within the context of a single "m=" section. The current JSEP API is designed to allow applications to send simulcasted media but only to receive a single encoding. This allows for multi-user scenarios where each sending client sends multiple encodings to a server, which then, for each receiving client, chooses the appropriate encoding to forward.

JSEPは、MediaStreamTrackの同時放送伝送をサポートします。ここでは、ソースメディアの複数のエンコーディングを単一の「M =」セクションのコンテキスト内で送信できます。現在のJSEP APIは、アプリケーションがシンプルされたメディアを送信できるように設計されていますが、単一のエンコーディングを受け取るだけです。これにより、各送信クライアントがサーバーに複数のエンコーディングを送信するマルチユーザーシナリオが可能になります。これにより、受信クライアントごとに適切なエンコードが選択されます。

Applications request support for simulcast by configuring multiple encodings on an RtpSender. Upon generation of an offer or answer, these encodings are indicated via SDP markings on the corresponding "m=" section, as described below. Receivers that understand simulcast and are willing to receive it will also include SDP markings to indicate their support, and JSEP endpoints will use these markings to determine whether simulcast is permitted for a given RtpSender. If simulcast support is not negotiated, the RtpSender will only use the first configured encoding.

アプリケーションは、RTPSENDERで複数のエンコーディングを構成することにより、同時放送のサポートをリクエストします。オファーまたは回答の生成により、これらのエンコーディングは、以下に説明するように、対応する「M =」セクションのSDPマーキングを介して示されます。Simulcastを理解し、それを受け取る意思のあるレシーバーには、サポートを示すためのSDPマーキングも含まれます。JSEPエンドポイントは、これらのマーキングを使用して、特定のRTPSENDERで同時キャストが許可されているかどうかを判断します。Simulcastサポートが交渉されていない場合、RTPSENDERは最初の構成エンコードのみを使用します。

Note that the exact simulcast parameters are up to the sending application. While the aforementioned SDP markings are provided to ensure that the remote side can receive and demux multiple simulcast encodings, the specific resolutions and bitrates to be used for each encoding are purely a send-side decision in JSEP.

正確な同時キャストパラメーターは、送信アプリケーション次第であることに注意してください。前述のSDPマーキングが提供され、リモート側が複数の同時キャストエンコーディングを受信してデマックスできるようにしますが、各エンコードに使用される特定の解像度とビットレートは、JSEPの純粋に送信側の決定です。

JSEP currently does not provide a mechanism to configure receipt of simulcast. This means that if simulcast is offered by the remote endpoint, the answer generated by a JSEP endpoint will not indicate support for receipt of simulcast, and as such the remote endpoint will only send a single encoding per "m=" section.

JSEPは現在、Simulcastの受領を構成するメカニズムを提供していません。これは、シミュレーションがリモートエンドポイントによって提供されている場合、JSEPエンドポイントによって生成された回答が同時放送の受領のサポートを示さないため、リモートエンドポイントは「M =」セクションごとに単一のエンコードを送信することを意味します。

In addition, JSEP does not provide a mechanism to handle an incoming offer requesting simulcast from the JSEP endpoint. This means that setting up simulcast in the case where the JSEP endpoint receives the initial offer requires out-of-band signaling or SDP inspection. However, in the case where the JSEP endpoint sets up simulcast in its initial offer, any established simulcast streams will continue to work upon receipt of an incoming re-offer. Future versions of this specification may add additional APIs to handle the incoming initial offer scenario.

さらに、JSEPは、JSEPエンドポイントからの同時キャストを要求する着信オファーを処理するメカニズムを提供しません。これは、JSEPエンドポイントが初期オファーを受信する場合に同時放送されたセットアップには、帯域外シグナリングまたはSDP検査が必要であることを意味します。ただし、JSEPエンドポイントが最初のオファーで同時放送された場合、確立された同時放送ストリームは、着信再生の受領時に引き続き動作します。この仕様の将来のバージョンは、着信初期オファーシナリオを処理するために追加のAPIを追加する場合があります。

When using JSEP to transmit multiple encodings from an RtpSender, the techniques from [RFC8853] and [RFC8851] are used. Specifically, when multiple encodings have been configured for an RtpSender, the "m=" section for the RtpSender will include an "a=simulcast" attribute, as defined in [RFC8853], Section 5.1, with a "send" simulcast stream description that lists each desired encoding, and no "recv" simulcast stream description. The "m=" section will also include an "a=rid" attribute for each encoding, as specified in [RFC8851], Section 4; the use of Restriction Identifiers (RIDs, also called rid-ids or RtpStreamIds) allows the individual encodings to be disambiguated even though they are all part of the same "m=" section.

JSEPを使用してRTPSENDERから複数のエンコーディングを送信する場合、[RFC8853]および[RFC8851]の手法が使用されます。具体的には、RTPSENDERに対して複数のエンコーディングが構成されている場合、RTPSENDERの「M =」セクションには、[RFC8853]で定義されている「A = Simulcast」属性、セクション5.1が含まれます。目的の各エンコードをリストし、「Recv」シミュレーションストリームの説明はありません。「m =」セクションには、[RFC8851]、セクション4で指定されているように、各エンコードの「a = red」属性も含まれます。制限識別子(RID-IDまたはRTPSTREAMIDSとも呼ばれるRIDS)の使用により、それらはすべて同じ「M =」セクションの一部であるにもかかわらず、個々のエンコードを曖昧にすることができます。

3.8. Interactions with Forking
3.8. フォーキングとの相互作用

Some call signaling systems allow various types of forking where an SDP offer may be provided to more than one device. For example, SIP [RFC3261] defines both a "parallel search" and "sequential search". Although these are primarily signaling-level issues that are outside the scope of JSEP, they do have some impact on the configuration of the media plane that is relevant. When forking happens at the signaling layer, the JavaScript application responsible for the signaling needs to make the decisions about what media should be sent or received at any point in time, as well as which remote endpoint it should communicate with; JSEP is used to make sure the media engine can make the RTP and media perform as required by the application. The basic operations that the applications can have the media engine do are as follows:

一部のコールシグナリングシステムでは、SDPのオファーが複数のデバイスに提供される可能性があるさまざまな種類のフォーキングが可能になります。たとえば、SIP [RFC3261]は、「並列検索」と「シーケンシャル検索」の両方を定義します。これらは主にJSEPの範囲外のシグナルレベルの問題ですが、関連するメディアプレーンの構成にある程度の影響があります。信号層でフォーキングが発生すると、シグナリングの責任を負うJavaScriptアプリケーションは、いつでもメディアを送信または受信するか、および通信するリモートエンドポイントについて決定する必要があります。JSEPは、メディアエンジンがアプリケーションで必要に応じてRTPとメディアをパフォーマンスできるようにするために使用されます。アプリケーションがメディアエンジンに行うことができる基本操作は次のとおりです。

* Start exchanging media with a given remote peer, but keep all the resources reserved in the offer.

* 特定のリモートピアとメディアの交換を開始しますが、すべてのリソースをオファーに保存します。

* Start exchanging media with a given remote peer, and free any resources in the offer that are not being used.

* 特定のリモートピアとメディアの交換を開始し、使用されていないオファーのリソースを無料で無料で送信します。

3.8.1. Sequential Forking
3.8.1. シーケンシャルフォーキング

Sequential forking involves a call being dispatched to multiple remote callees, where each callee can accept the call, but only one active session ever exists at a time; no mixing of received media is performed.

シーケンシャルフォーキングでは、各Calleeが通話を受け入れることができる複数のリモートCalleesに派遣されるコールが含まれますが、一度に1つのアクティブセッションのみが存在します。受信されたメディアの混合は実行されません。

JSEP handles sequential forking well, allowing the application to easily control the policy for selecting the desired remote endpoint. When an answer arrives from one of the callees, the application can choose to apply it as either (1) a provisional answer, leaving open the possibility of using a different answer in the future or (2) a final answer, ending the setup flow.

JSEPはシーケンシャルフォーキングをうまく処理し、アプリケーションが目的のリモートエンドポイントを選択するためのポリシーを簡単に制御できるようにします。Calleesの1つから回答が到着すると、アプリケーションは(1)暫定的な答えを適用することを選択できます。。

In a "first-one-wins" situation, the first answer will be applied as a final answer, and the application will reject any subsequent answers. In SIP parlance, this would be ACK + BYE.

「最初の1つのウィン」の状況では、最初の答えが最終回答として適用され、アプリケーションはその後の回答を拒否します。SIP用語では、これはACK +バイになります。

In a "last-one-wins" situation, all answers would be applied as provisional answers, and any previous call leg will be terminated. At some point, the application will end the setup process, perhaps with a timer; at this point, the application could reapply the pending remote description as a final answer.

「最後の1つのウィン」の状況では、すべての回答が暫定的な回答として適用され、以前のコールレッグは終了します。ある時点で、アプリケーションは、おそらくタイマーでセットアッププロセスを終了します。この時点で、アプリケーションは最終的な回答として保留中のリモート説明を再申請することができます。

3.8.2. Parallel Forking
3.8.2. 並列フォーキング

Parallel forking involves a call being dispatched to multiple remote callees, where each callee can accept the call and multiple simultaneous active signaling sessions can be established as a result. If multiple callees send media at the same time, the possibilities for handling this are described in [RFC3960], Section 3.1. Most SIP devices today only support exchanging media with a single device at a time and do not try to mix multiple early media audio sources, as that could result in a confusing situation. For example, consider having a European ringback tone mixed together with the North American ringback tone -- the resulting sound would not be like either tone and would confuse the user. If the signaling application wishes to only exchange media with one of the remote endpoints at a time, then from a media engine point of view, this is exactly like the sequential forking case.

パラレルフォーキングでは、複数のリモートカリーに発送されるコールが含まれます。各Calleeはコールを受け入れることができ、結果として複数の同時アクティブシグナルセッションを確立できます。複数のCalleesが同時にメディアを送信する場合、これを処理する可能性は[RFC3960]、セクション3.1に記載されています。今日のほとんどのSIPデバイスは、一度に1つのデバイスとメディアの交換のみをサポートしており、複数の初期のメディアオーディオソースを混同しようとはしません。たとえば、ヨーロッパのリングバックトーンを北米のリングバックトーンと混ぜ合わせることを検討してください。結果として生じる音はどちらのトーンのようでもなく、ユーザーを混乱させます。シグナリングアプリケーションが一度にリモートエンドポイントの1つとのみメディアを交換したい場合、メディアエンジンの観点からは、これはシーケンシャルフォーキングの場合とまったく同じです。

In the parallel forking case where the JavaScript application wishes to simultaneously exchange media with multiple peers, the flow is slightly more complex, but the JavaScript application can follow the strategy that [RFC3960] describes, using UPDATE. The UPDATE approach allows the signaling to set up a separate media flow for each peer that it wishes to exchange media with. In JSEP, this offer used in the UPDATE would be formed by simply creating a new PeerConnection (see Section 4.1) and making sure that the same local media streams have been added into this new PeerConnection. Then the new PeerConnection object would produce an SDP offer that could be used by the signaling to perform the UPDATE strategy discussed in [RFC3960].

JavaScriptアプリケーションが複数のピアと同時にメディアを交換することを希望する並列フォーキングの場合、フローはわずかに複雑ですが、JavaScriptアプリケーションは[RFC3960]が更新を使用して説明する戦略に従うことができます。更新アプローチにより、シグナリングは、メディアと交換したい各ピアの個別のメディアフローを設定できます。JSEPでは、更新で使用されるこのオファーは、単に新しいPeerConnectionを作成し(セクション4.1を参照)、同じローカルメディアストリームがこの新しいPeerConnectionに追加されていることを確認するだけで形成されます。次に、新しいPeerConnectionオブジェクトは、[RFC3960]で説明されている更新戦略を実行するためにシグナリングによって使用できるSDPオファーを生成します。

As a result of sharing the media streams, the application will end up with N parallel PeerConnection sessions, each with a local and remote description and their own local and remote addresses. The media flow from these sessions can be managed using setDirection (see Section 4.2.3), or the application can choose to play out the media from all sessions mixed together. Of course, if the application wants to only keep a single session, it can simply terminate the sessions that it no longer needs.

メディアストリームを共有した結果、アプリケーションは、それぞれがローカルおよびリモートの説明と独自のローカルおよびリモートアドレスを備えたn並列ピーエコネクションセッションで終了します。これらのセッションからのメディアフローは、SetDirection(セクション4.2.3を参照)を使用して管理することができます。または、アプリケーションは、混合されたすべてのセッションからメディアを再生することを選択できます。もちろん、アプリケーションが単一のセッションのみを維持したい場合、必要でないセッションを単純に終了できます。

4. Interface
4. インターフェース

This section details the basic operations that must be present to implement JSEP functionality. The actual API exposed in the W3C API may have somewhat different syntax but should map easily to these concepts.

このセクションでは、JSEP機能を実装するために存在する必要がある基本操作について詳しく説明します。W3C APIで公開されている実際のAPIは、いくらか異なる構文を持っている可能性がありますが、これらの概念に簡単にマッピングする必要があります。

4.1. PeerConnection
4.1. ピーコネクション
4.1.1. Constructor
4.1.1. コンストラクタ

The PeerConnection constructor allows the application to specify global parameters for the media session, such as the STUN/TURN servers and credentials to use when gathering candidates, as well as the initial ICE candidate policy and pool size, and also the bundle policy to use.

PeerConnectionコンストラクターにより、アプリケーションは、候補者を収集するときに使用するスタン/ターンサーバーや資格情報、最初のICE候補ポリシーとプールサイズ、および使用するバンドルポリシーなど、メディアセッションのグローバルパラメーターを指定できます。

If an ICE candidate policy is specified, it functions as described in Section 3.5.3, causing the JSEP implementation to only surface the permitted candidates (including any implementation-internal filtering) to the application and only use those candidates for connectivity checks. The set of available policies is as follows:

ICE候補のポリシーが指定されている場合、セクション3.5.3で説明したように機能し、JSEP実装により、許可された候補者(実装内部フィルタリングを含む)のみをアプリケーションに表現し、接続性チェックの候補のみを使用します。利用可能なポリシーのセットは次のとおりです。

all:

all:

All candidates permitted by implementation policy will be gathered and used.

実装ポリシーで許可されているすべての候補者が収集され、使用されます。

relay:

リレー:

All candidates except relay candidates will be filtered out. This obfuscates the location information that might be ascertained by the remote peer from the received candidates. Depending on how the application deploys and chooses relay servers, this could obfuscate location to a metro or possibly even global level.

リレー候補を除くすべての候補者は除外されます。これは、受け取った候補者からのリモートピアによって確認される可能性のある位置情報を難読化します。アプリケーションのリレーサーバーの展開と選択の選択に応じて、これは位置をメトロまたは場合によってはグローバルレベルまで難読化する可能性があります。

The default ICE candidate policy MUST be set to "all", as this is generally the desired policy and also typically reduces the use of application TURN server resources significantly.

これは一般に望ましいポリシーであり、通常、アプリケーションターンサーバーリソースの使用を大幅に削減するため、デフォルトのICE候補ポリシーを「すべて」に設定する必要があります。

If a size is specified for the ICE candidate pool, this indicates the number of ICE components to pre-gather candidates for. Because pre-gathering results in utilizing STUN/TURN server resources for potentially long periods of time, this MUST only occur upon application request, and therefore the default candidate pool size MUST be zero.

氷の候補プールにサイズが指定されている場合、これは、採掘前の候補者の氷成分の数を示します。事前収集により、Stun/Turn Serverリソースを潜在的に長期間使用することになるため、これはアプリケーションリクエスト時にのみ発生する必要があるため、デフォルトの候補プールサイズはゼロでなければなりません。

The application can specify its preferred policy regarding the use of BUNDLE, the multiplexing mechanism defined in [RFC9143]. Regardless of policy, the application will always try to negotiate bundle onto a single transport and will offer a single bundle group across all "m=" sections; use of this single transport is contingent upon the answerer accepting bundle. However, by specifying a policy from the list below, the application can control exactly how aggressively it will try to bundle media streams together, which affects how it will interoperate with a non-bundle-aware endpoint. When negotiating with a non-bundle-aware endpoint, only the streams not marked as bundle-only streams will be established.

アプリケーションは、[RFC9143]で定義されている多重化メカニズムであるバンドルの使用に関する好ましいポリシーを指定できます。ポリシーに関係なく、アプリケーションは常に単一のトランスポートにバンドルを交渉しようとし、すべての「M =」セクションにわたって単一のバンドルグループを提供します。この単一のトランスポートの使用は、バンドルを受け入れる回答者に条件となります。ただし、以下のリストからポリシーを指定することにより、アプリケーションはメディアストリームをどの程度積極的にバンドルしようとするかを正確に制御できます。バンドルを認識していないエンドポイントと交渉する場合、バンドルのみのストリームとマークされていないストリームのみが確立されます。

The set of available policies is as follows:

利用可能なポリシーのセットは次のとおりです。

balanced:

バランス:

The first "m=" section of each type (audio, video, or application) will contain transport parameters, which will allow an answerer to unbundle that section. The second and any subsequent "m=" sections of each type will be marked as bundle-only. The result is that if there are N distinct media types, then candidates will be gathered for N media streams. This policy balances the desire to multiplex with the need to ensure that basic audio and video can still be negotiated in legacy cases. When acting as answerer, if there is no bundle group in the offer, the implementation will reject all but the first "m=" section of each type.

各タイプの最初の「m =」セクション(オーディオ、ビデオ、またはアプリケーション)には、輸送パラメーターが含まれています。これにより、回答者がそのセクションを解除できるようになります。2番目と後続の「m =」セクションは、各タイプのセクションにバンドルのみとしてマークされます。その結果、N異なるメディアタイプがある場合、Nメディアストリームの候補者が収集されます。このポリシーは、レガシーの場合、基本的なオーディオとビデオがまだ交渉できることを保証する必要性と多重化したいという欲求のバランスをとっています。応答者として行動する場合、オファーにバンドルグループがない場合、実装は各タイプの最初の「m =」セクションを除くすべてを拒否します。

max-compat:

Max-Compat:

All "m=" sections will contain transport parameters; none will be marked as bundle-only. This policy makes no assumptions about the remote endpoint and as such will allow all streams to be received by non-bundle-aware endpoints, but as a result requires separate candidates to be gathered for each media stream.

すべての「m =」セクションには輸送パラメーターが含まれます。バンドルのみとしてマークされるものはありません。このポリシーは、リモートエンドポイントについて仮定を行わないため、すべてのストリームをバンドルアウェアのエンドポイントで受け取ることができますが、その結果、メディアストリームごとに個別の候補を収集する必要があります。

must-bundle:

必見:

Only the first "m=" section will contain transport parameters; all streams other than the first will be marked as bundle-only. This policy presumes that the remote endpoint supports multiplexing and accordingly aims to minimize candidate gathering, at the cost of less compatibility with legacy endpoints. When acting as answerer, the implementation will reject any "m=" sections other than the first "m=" section, unless they are in the same bundle group as that "m=" section.

最初の「m =」セクションのみに輸送パラメーターが含まれます。最初のストリーム以外のすべてのストリームは、バンドルのみとしてマークされます。このポリシーは、リモートエンドポイントが多重化をサポートしており、それに応じて、レガシーエンドポイントとの互換性が低いため、候補者の集まりを最小限に抑えることを目的としています。回答者として行動する場合、実装は、「m =」セクションと同じバンドルグループにある場合を除き、最初の「m =」セクション以外の「m =」セクションを拒否します。

As it provides the best trade-off between performance and compatibility with legacy endpoints, the default bundle policy MUST be set to "balanced".

パフォーマンスとレガシーエンドポイントとの互換性の最良のトレードオフを提供するため、デフォルトのバンドルポリシーは「バランス」に設定する必要があります。

[RFC8829] defined a policy known as "max-bundle", which, while defined identically to the "must-bundle" policy described above, was implemented by some implementations according to an earlier, pre-standard definition (in which, for example, no "m=" sections were marked as bundle-only). As a result, "max-bundle" is considered deprecated, and implementations compliant with this specification SHOULD ignore attempts by the application to select this bundle policy (although some phase-out period may be necessary to avoid application breakage).

[RFC8829]は「Max-Bundle」として知られるポリシーを定義しましたが、これは上記の「必見」ポリシーと同様に定義されていますが、以前の標準以前の定義(例えば、例えば、いくつかの実装によって実装されました。、「m =」セクションはバンドルのみとしてマークされていません)。その結果、「Max-Bundle」は非推奨と見なされ、この仕様に準拠した実装は、このバンドルポリシーを選択するためのアプリケーションによる試みを無視する必要があります(ただし、アプリケーションの破損を避けるために段階的な期間が必要になる場合があります)。

The application can specify its preferred policy regarding the use of RTP/RTCP multiplexing [RFC5761] using one of the following policies:

アプリケーションは、次のポリシーのいずれかを使用して、RTP/RTCP多重化[RFC5761]の使用に関する優先ポリシーを指定できます。

negotiate:

交渉する:

The JSEP implementation will gather both RTP and RTCP candidates but also will offer "a=rtcp-mux", thus allowing for compatibility with either multiplexing or non-multiplexing endpoints.

JSEP実装は、RTP候補とRTCP候補の両方を収集しますが、「A = RTCP-Mux」も提供するため、多重化または非混合エンドポイントのいずれかとの互換性が可能になります。

require:

必要とする:

The JSEP implementation will only gather RTP candidates and will insert an "a=rtcp-mux-only" indication into any new "m=" sections in offers it generates. This halves the number of candidates that the offerer needs to gather. Applying a description with an "m=" section that does not contain an "a=rtcp-mux" attribute will cause an error to be returned.

JSEP実装はRTP候補のみを収集し、生成されるオファーの新しい「M =」セクションに「A = RTCP-Muxのみ」の表示を挿入します。これにより、提供者が収集する必要がある候補者の数が半分になります。「a = rtcp-mux」属性を含まない「m =」セクションで説明を適用すると、エラーが返されます。

The default multiplexing policy MUST be set to "require". Implementations MAY choose to reject attempts by the application to set the multiplexing policy to "negotiate".

デフォルトの多重化ポリシーは、「要求」に設定する必要があります。実装は、マルチプレックスポリシーを「ネゴシエート」するためにマルチプレックスポリシーを設定するためのアプリケーションによる試みを拒否することを選択する場合があります。

4.1.2. addTrack
4.1.2. addtrack

The addTrack method adds a MediaStreamTrack to the PeerConnection, using the MediaStream argument to associate the track with other tracks in the same MediaStream, so that they can be added to the same "LS" (Lip Synchronization) group when creating an offer or answer. Adding tracks to the same "LS" group indicates that the playback of these tracks should be synchronized for proper lip sync, as described in [RFC5888], Section 7. addTrack attempts to minimize the number of transceivers as follows: if the PeerConnection is in the "have-remote-offer" state, the track will be attached to the first compatible transceiver that was created by the most recent call to setRemoteDescription and does not have a local track. Otherwise, a new transceiver will be created, as described in Section 4.1.4.

AddTrackメソッドは、MediaStream引数を使用して同じMediaStreamの他のトラックに関連付けられて、MediaStreamTrackをPeerconnectionに追加し、オファーや回答を作成するときに同じ「LS」(リップ同期)グループに追加できるようにします。同じ「LS」グループにトラックを追加すると、[RFC5888]、セクション7で説明されているように、これらのトラックの再生が適切なリップ同期のために同期する必要があることが示されています。「Have Remote-Offer」状態であるトラックは、最新のSetRemotedesscriptionの呼び出しによって作成され、ローカルトラックがない最初の互換性のあるトランシーバーに添付されます。それ以外の場合は、セクション4.1.4で説明されているように、新しいトランシーバーが作成されます。

4.1.3. removeTrack
4.1.3. Removetrack

The removeTrack method removes a MediaStreamTrack from the PeerConnection, using the RtpSender argument to indicate which sender should have its track removed. The sender's track is cleared, and the sender stops sending. Future calls to createOffer will mark the "m=" section associated with the sender as "recvonly" (if transceiver.direction is "sendrecv") or as "inactive" (if transceiver.direction is "sendonly").

RemoveTrackメソッドは、RTPSENDER引数を使用して、どの送信者がトラックを削除するかを示すために、PeerConnectionからMediaStreamTrackを削除します。送信者のトラックがクリアされ、送信者が送信を停止します。createOfferへの将来の呼び出しは、送信者に関連付けられた「m =」セクションを「recvonly」(transceiver.directionが「sendrecv」の場合)または「非アクティブ」(transceiver.directionが「sendonly」)としてマークします。

4.1.4. addTransceiver
4.1.4. addtransceiver

The addTransceiver method adds a new RtpTransceiver to the PeerConnection. If a MediaStreamTrack argument is provided, then the transceiver will be configured with that media type and the track will be attached to the transceiver. Otherwise, the application MUST explicitly specify the type; this mode is useful for creating "recvonly" transceivers as well as for creating transceivers to which a track can be attached at some later point.

AddTransceiverメソッドは、新しいrtptransceiverをPeerConnectionに追加します。MediaStreamTrack引数が提供されている場合、トランシーバーはそのメディアタイプで構成され、トラックはトランシーバーに添付されます。それ以外の場合、アプリケーションはタイプを明示的に指定する必要があります。このモードは、「recvonly」トランシーバーを作成するだけでなく、後のポイントでトラックを添付できるトランシーバーを作成するのに役立ちます。

At the time of creation, the application can also specify a transceiver direction attribute, a set of MediaStreams that the transceiver is associated with (allowing "LS" group assignments), and a set of encodings for the media (used for simulcast as described in Section 3.7).

作成時点で、アプリケーションは、トランシーバー方向属性、トランシーバーが関連付けられているメディアストリームのセット(「LS」グループの割り当てを許可)、およびメディアのエンコーディングのセットを指定することもできます。セクション3.7)。

4.1.5. onaddtrack Event
4.1.5. OnaddTrackイベント

The onaddtrack event is dispatched to the application when a new remote track has been signaled as a result of a setRemoteDescription call. The new track is supplied as a MediaStreamTrack object in the event, along with the MediaStream(s) the track is part of.

OnADDTRACKイベントは、setRemoteDescription Callの結果として新しいリモートトラックが信号を送られたときにアプリケーションに派遣されます。新しいトラックは、イベントでMediaStreamTrackオブジェクトとして提供され、トラックは一部のメディアストリームです。

4.1.6. createDataChannel
4.1.6. createdatachannel

The createDataChannel method creates a new data channel and attaches it to the PeerConnection. If no data channel currently exists for this PeerConnection, then a new offer/answer exchange is required. All data channels on a given PeerConnection share the same SCTP/DTLS association ("SCTP" stands for "Stream Control Transmission Protocol") and therefore the same "m=" section, so subsequent creation of data channels does not have any impact on the JSEP state.

createdatachannelメソッドは、新しいデータチャネルを作成し、PeerConnectionに添付します。このピーロネクションのデータチャネルが現在存在しない場合、新しいオファー/回答の交換が必要です。特定のPeerConnection上のすべてのデータチャネルは、同じSCTP/DTLSアソシエーション(「SCTP」は「ストリーム制御伝送プロトコル」を表す)を共有しているため、同じ「M =」セクションを共有しているため、データチャネルのその後の作成は、次の「M =」セクションを共有しています。JSEP州。

The createDataChannel method also includes a number of arguments that are used by the PeerConnection (e.g., maxPacketLifetime) but are not reflected in the SDP and do not affect the JSEP state.

createdatachannelメソッドには、PeerConnection(例えば、MaxPacketlifetime)で使用される多くの引数も含まれていますが、SDPには反映されておらず、JSEP状態に影響しません。

4.1.7. ondatachannel Event
4.1.7. ondatachannelイベント

The ondatachannel event is dispatched to the application when a new data channel has been negotiated by the remote side, which can occur at any time after the underlying SCTP/DTLS association has been established. The new data channel object is supplied in the event.

Ondatachannelイベントは、新しいデータチャネルがリモート側によってネゴシエートされたときにアプリケーションに派遣されます。これは、基礎となるSCTP/DTLS協会が確立された後、いつでも発生する可能性があります。新しいデータチャネルオブジェクトは、イベントで提供されます。

4.1.8. createOffer
4.1.8. CreateOffer

The createOffer method generates a blob of SDP that contains an offer per [RFC3264] with the configurations for the session that are supported by the application, including descriptions of the media added to this PeerConnection, the codec, RTP, and RTCP options supported by this implementation, and any candidates that have been gathered by the ICE agent. An options parameter may be supplied to provide additional control over the generated offer. This options parameter allows an application to trigger an ICE restart, for the purpose of reestablishing connectivity.

CreateOfferメソッドは、[RFC3264]ごとのオファーを含むSDPのブロブを生成し、アプリケーションでサポートされているセッションの構成を生成します。実装、およびアイスエージェントによって収集された候補者。生成されたオファーを追加の制御を提供するために、オプションパラメーターを提供することができます。このオプションパラメーターにより、接続を再確立する目的で、アプリケーションがアイス再起動をトリガーできます。

In the initial offer, the generated SDP will contain all desired functionality for the session (functionality that is supported but not desired by default may be omitted); for each SDP line, the generation of the SDP will follow the process defined for generating an initial offer from the specification that defines the given SDP line. The exact handling of initial offer generation is detailed in Section 5.2.1 below.

最初のオファーでは、生成されたSDPにはセッションのすべての希望の機能が含まれます(デフォルトではサポートされているが望ましくない機能は省略できます)。各SDPラインについて、SDPの生成は、指定されたSDPラインを定義する仕様から初期オファーを生成するために定義されたプロセスに従います。初期オファー生成の正確な処理については、以下のセクション5.2.1で詳しく説明しています。

In the event createOffer is called after the session is established, createOffer will generate an offer to modify the current session based on any changes that have been made to the session, e.g., adding or stopping RtpTransceivers, or requesting an ICE restart. For each existing stream, the generation of each SDP line MUST follow the process defined for generating an updated offer from the specification that defines the given SDP line. For each new stream, the generation of the SDP MUST follow the process of generating an initial offer, as mentioned above. The exact handling of subsequent offer generation is detailed in Section 5.2.2 below.

セッションが確立された後にCreateOfferが呼び出された場合、CreateOfferは、セッションに行われた変更、たとえばRTPTransceiversの追加または停止、またはICE RestARTのリクエストに基づいて現在のセッションを変更するオファーを生成します。既存のストリームごとに、各SDPラインの生成は、指定されたSDPラインを定義する仕様から更新されたオファーを生成するために定義されたプロセスに従う必要があります。新しいストリームごとに、SDPの生成は、上記のように、初期オファーを生成するプロセスに従う必要があります。後続のオファー生成の正確な取り扱いについては、以下のセクション5.2.2で詳しく説明しています。

Session descriptions generated by createOffer MUST be immediately usable by setLocalDescription; if a system has limited resources (e.g., a finite number of decoders), createOffer SHOULD return an offer that reflects the current state of the system, so that setLocalDescription will succeed when it attempts to acquire those resources.

CreateOfferによって生成されたセッションの説明は、SetLocalDescriptionによってすぐに使用可能でなければなりません。システムのリソースが限られている場合(例:有限数のデコーダー)、CreateOfferはシステムの現在の状態を反映したオファーを返し、それらのリソースを取得しようとするとSetlocaldescriptionが成功するようにします。

Calling this method may do things such as generating new ICE credentials, but it does not change the PeerConnection state, trigger candidate gathering, or cause media to start or stop flowing. Specifically, the offer is not applied, and does not become the pending local description, until setLocalDescription is called.

この方法を呼び出すと、新しいICE資格の生成などが行われる可能性がありますが、PeerConnection状態を変更したり、候補者の収集を引き起こしたり、メディアの流動を開始または停止させたりすることはありません。具体的には、オファーは適用されず、setlocaldescriptionが呼び出されるまで、保留中のローカル説明にはなりません。

4.1.9. createAnswer
4.1.9. Createanswer

The createAnswer method generates a blob of SDP that contains an SDP answer per [RFC3264] with the supported configuration for the session that is compatible with the parameters supplied in the most recent call to setRemoteDescription; setRemoteDescription MUST have been called prior to calling createAnswer. Like createOffer, the returned blob contains descriptions of the media added to this PeerConnection; the codec, RTP, and RTCP options supported by the application; and any candidates that have been gathered by the ICE agent. An options parameter may be supplied to provide additional control over the generated answer.

CreateAnswerメソッドは、[RFC3264]ごとにSDP回答を含むSDPのブロブを生成し、セッションのサポートされた構成を生成します。セッションのサポートされた構成は、最新のSetRemotedescriptionで提供されたパラメーターと互換性があります。setRemotedescriptionは、Createanswerを呼び出す前に呼び出されたに違いありません。CreateOfferのように、返されたBLOBには、このピーコネクションに追加されたメディアの説明が含まれています。アプリケーションでサポートされているコーデック、RTP、およびRTCPオプション。アイスエージェントによって集められた候補者。生成された回答を追加の制御を提供するために、オプションパラメーターを提供することができます。

As an answer, the generated SDP will contain a specific configuration that specifies how the media plane should be established; for each SDP line, the generation of the SDP MUST follow the process defined for generating an answer from the specification that defines the given SDP line. The exact handling of answer generation is detailed in Section 5.3 below.

答えとして、生成されたSDPには、メディアプレーンの確立方法を指定する特定の構成が含まれます。各SDPラインについて、SDPの生成は、指定されたSDPラインを定義する仕様から回答を生成するために定義されたプロセスに従う必要があります。回答生成の正確な処理については、以下のセクション5.3で詳しく説明しています。

Session descriptions generated by createAnswer MUST be immediately usable by setLocalDescription; like createOffer, the returned description SHOULD reflect the current state of the system.

Createanswerによって生成されたセッションの説明は、SetlocalDescriptionによってすぐに使用可能でなければなりません。CreateOfferのように、返された説明はシステムの現在の状態を反映する必要があります。

Calling this method may do things such as generating new ICE credentials, but it does not change the PeerConnection state, trigger candidate gathering, or cause a media state change. Specifically, the answer is not applied, and does not become the current local description, until setLocalDescription is called.

この方法を呼び出すと、新しいICE資格の生成などが行われる場合がありますが、PeerConnection状態を変更したり、候補者の収集を引き起こしたり、メディア状態の変更を引き起こしたりすることはありません。具体的には、回答は適用されず、SetlocalDescriptionが呼び出されるまで、現在のローカル説明にはなりません。

4.1.10. SessionDescriptionType
4.1.10. sessiondescripttype

Session description objects (RTCSessionDescription) may be of type "offer", "pranswer", "answer", or "rollback". These types provide information as to how the description parameter should be parsed and how the media state should be changed.

セッションの説明オブジェクト(rtcsessiondescription)は、「オファー」、「プランワー」、「回答」、または「ロールバック」のタイプである場合があります。これらのタイプは、説明パラメーターをどのように解析するか、メディア状態をどのように変更するかに関する情報を提供します。

"offer" indicates that a description MUST be parsed as an offer; said description may include many possible media configurations. A description used as an "offer" may be applied any time the PeerConnection is in a "stable" state or applied as an update to a previously supplied but unanswered "offer".

「オファー」は、説明がオファーとして解析されなければならないことを示します。上記の説明には、多くの可能なメディア構成が含まれる場合があります。「オファー」として使用される説明は、ピーロネクションが「安定した」状態にある場合、または以前に提供されたが未回答の「オファー」の更新として適用される場合でも適用される場合があります。

"pranswer" indicates that a description MUST be parsed as an answer, but not a final answer, and so MUST NOT result in the freeing of allocated resources. It may result in the start of media transmission, if the answer does not specify an "inactive" media direction. A description used as a "pranswer" may be applied as a response to an "offer" or as an update to a previously sent "pranswer".

「Pranswer」は、説明が答えとして解析されなければならないことを示していますが、最終的な答えではないため、割り当てられたリソースが解放されてはなりません。回答が「非アクティブな」メディアの方向性を指定していない場合、メディアの送信が開始される可能性があります。「Pranswer」として使用される説明は、「オファー」への応答として、または以前に送信された「Pranswer」の更新として適用される場合があります。

"answer" indicates that a description MUST be parsed as an answer, the offer/answer exchange MUST be considered complete, and any resources (decoders, candidates) that are no longer needed SHOULD be released. A description used as an "answer" may be applied as a response to an "offer" or as an update to a previously sent "pranswer".

「回答」は、説明を回答として解析する必要があり、オファー/回答の交換を完全に見なす必要があり、必要でないリソース(デコーダー、候補者)をリリースする必要があることを示します。「回答」として使用される説明は、「オファー」への応答として、または以前に送信された「プランザー」の更新として適用される場合があります。

The only difference between a provisional and final answer is that the final answer results in the freeing of any unused resources that were allocated as a result of the offer. As such, the application can use some discretion on whether an answer should be applied as provisional or final and can change the type of the session description as needed. For example, in a serial forking scenario, an application may receive multiple "final" answers, one from each remote endpoint. The application could choose to accept the initial answers as provisional answers and only apply an answer as final when it receives one that meets its criteria (e.g., a live user instead of voicemail).

暫定的な答えと最終的な答えの唯一の違いは、最終的な答えが、オファーの結果として割り当てられた未使用のリソースの解放につながることです。そのため、アプリケーションは、回答を暫定または最終として適用する必要があるかどうかについて、何らかの裁量を使用し、必要に応じてセッションの説明のタイプを変更できるかどうかを使用できます。たとえば、シリアルフォーキングシナリオでは、アプリケーションが各リモートエンドポイントから複数の「最終」回答を受け取る場合があります。アプリケーションは、最初の回答を暫定的な回答として受け入れることを選択し、基準を満たしているもの(ボイスメールの代わりにライブユーザー)を受け取った場合の場合にのみ、回答として回答を適用することができます。

"rollback" is a special session description type indicating that the state machine MUST be rolled back to the previous "stable" state, as described in Section 4.1.10.2. The contents MUST be empty.

「ロールバック」は、セクション4.1.10.2で説明されているように、ステートマシンを以前の「安定」状態にロールバックする必要があることを示す特別なセッションの説明タイプです。内容は空でなければなりません。

4.1.10.1. Use of Provisional Answers
4.1.10.1. 暫定回答の使用

Most applications will not need to create answers using the "pranswer" type. While it is good practice to send an immediate response to an offer, in order to warm up the session transport and prevent media clipping, the preferred handling for a JSEP application is to create and send a "sendonly" final answer with a null MediaStreamTrack immediately after receiving the offer, which will prevent media from being sent by the caller and allow media to be sent immediately upon answer by the callee. Later, when the callee actually accepts the call, the application can plug in the real MediaStreamTrack and create a new "sendrecv" offer to update the previous offer/answer pair and start bidirectional media flow. While this could also be done with a "sendonly" pranswer followed by a "sendrecv" answer, the initial pranswer leaves the offer/answer exchange open, which means that the caller cannot send an updated offer during this time.

ほとんどのアプリケーションは、「Pranswer」タイプを使用して回答を作成する必要はありません。オファーに即時の応答を送信することは良い習慣ですが、セッショントランスポートをウォームアップしてメディアのクリッピングを防ぐために、JSEPアプリケーションの優先処理は、すぐにNull MediaStreamTrackを使用して「Sendonly」最終回答を作成して送信することです。オファーを受け取った後、メディアが発信者から送信されないようにし、Calleeが回答するとメディアがすぐに送信されるようにします。その後、Calleeが実際にコールを受け入れると、アプリケーションは実際のMediaStreamTrackをプラグインし、以前のオファー/回答ペアを更新し、双方向のメディアフローを開始するために新しい「SendRecv」オファーを作成できます。これは「sendonly」プランワーに続いて「sendrecv」の回答で行うこともできますが、最初のプランザーはオファー/回答の交換を開いたままにします。

As an example, consider a typical JSEP application that wants to set up audio and video as quickly as possible. When the callee receives an offer with audio and video MediaStreamTracks, it will send an immediate answer accepting these tracks as "sendonly" (meaning that the caller will not send the callee any media yet, and because the callee has not yet added its own MediaStreamTracks, the callee will not send any media either). It will then ask the user to accept the call and acquire the needed local tracks. Upon acceptance by the user, the application will plug in the tracks it has acquired, which, because ICE handshaking and DTLS handshaking have likely completed by this point, can start transmitting immediately. The application will also send a new offer to the remote side indicating call acceptance and moving the audio and video to be two-way media. A detailed example flow along these lines is shown in Section 7.3.

例として、オーディオとビデオをできるだけ早くセットアップしたい典型的なJSEPアプリケーションを検討してください。CalleeがオーディオとビデオのMediaStreamTrackを使用してオファーを受け取ると、これらのトラックを「Sendonly」として受け入れる即時の回答が送信されます(発信者はまだメディアを送信しないことを意味します。、カリーもメディアを送信しません)。次に、ユーザーに通話を受け入れ、必要なローカルトラックを取得するように依頼します。ユーザーに受け入れられると、アプリケーションは取得したトラックをプラグインします。これは、この時点までにICEハンドシェイクとDTLハンドシェイクが完了した可能性が高いため、すぐに送信を開始できます。また、アプリケーションは、コールの受け入れを示す新しいオファーをリモート側に送信し、オーディオとビデオを双方向のメディアに移動することを示します。これらの線に沿った詳細な例の流れは、セクション7.3に示されています。

Of course, some applications may not be able to perform this double offer/answer exchange, particularly ones that are attempting to gateway to legacy signaling protocols. In these cases, pranswer can still provide the application with a mechanism to warm up the transport.

もちろん、一部のアプリケーションは、このダブルオファー/回答交換、特にレガシーシグナル伝達プロトコルへのゲートウェイを試みているアプリケーションを実行できない場合があります。これらの場合、Pranswerは引き続き輸送をウォームアップするメカニズムをアプリケーションに提供できます。

4.1.10.2. Rollback
4.1.10.2. ロールバック

In certain situations, it may be desirable to "undo" a change made to setLocalDescription or setRemoteDescription. Consider a case where a call is ongoing and one side wants to change some of the session parameters; that side generates an updated offer and then calls setLocalDescription. However, the remote side, either before or after setRemoteDescription, decides it does not want to accept the new parameters and sends a reject message back to the offerer. Now, the offerer, and possibly the answerer as well, needs to return to a "stable" state and the previous local/remote description. To support this, this specification introduces the concept of "rollback", which discards any proposed changes to the session, returning the state machine to the "stable" state. A rollback is performed by supplying a session description of type "rollback" with empty contents to either setLocalDescription or setRemoteDescription.

特定の状況では、setlocaldescriptionまたはsetRemotededscriptionに加えられた変更を「元に戻す」ことが望ましい場合があります。通話が進行中であり、片側がセッションパラメーターの一部を変更したい場合を考えてください。その側は更新されたオファーを生成し、SetlocalDescriptionを呼び出します。ただし、setRemotedesscriptionの前または後のリモート側は、新しいパラメーターを受け入れたくないと判断し、拒否メッセージを提供者に送り返します。現在、提供者、そしておそらく応答者も同様に、「安定した」状態と以前のローカル/リモートの説明に戻る必要があります。これをサポートするために、この仕様は「ロールバック」の概念を紹介します。これにより、セッションの提案された変更を破棄し、州のマシンを「安定した」状態に戻します。ロールバックは、空のコンテンツを使用したタイプ「ロールバック」のセッション説明をsetlocaldescriptionまたはsetRemotedscriptionのいずれかに提供することにより実行されます。

4.1.11. setLocalDescription
4.1.11. setlocaldescription

The setLocalDescription method instructs the PeerConnection to apply the supplied session description as its local configuration. The type field indicates whether the description should be processed as an offer, provisional answer, final answer, or rollback; offers and answers are checked differently, using the various rules that exist for each SDP line.

Setlocaldescriptionメソッドは、PeerConnectionに、付属のセッションの説明をローカル構成として適用するよう指示します。タイプフィールドは、説明をオファー、暫定回答、最終回答、またはロールバックとして処理する必要があるかどうかを示します。SDP行ごとに存在するさまざまなルールを使用して、オファーと回答は異なる方法でチェックされます。

This API changes the local media state; among other things, it sets up local resources for receiving and decoding media. In order to successfully handle scenarios where the application wants to offer to change from one media format to a different, incompatible format, the PeerConnection MUST be able to simultaneously support use of both the current and pending local descriptions (e.g., support the codecs that exist in either description). This dual processing begins when the PeerConnection enters the "have-local-offer" state, and it continues until setRemoteDescription is called with either (1) a final answer, at which point the PeerConnection can fully adopt the pending local description or (2) a rollback, which results in a revert to the current local description.

このAPIは、地元のメディア状態を変更します。とりわけ、メディアを受信および解読するためのローカルリソースを設定します。アプリケーションが1つのメディア形式から異なる互換性のない形式に変更することを申し出たいシナリオを正常に処理するために、PeerConnectionは、現在と保留中のローカル説明の両方の使用を同時にサポートできる必要があります(例えば、存在するコーデックをサポートします。どちらの説明でも)。このデュアル処理は、ピーコネクションが「局所的な」状態に入るときに始まり、(1)最終回答と呼ばれるまで継続します。ロールバック、その結果、現在のローカル説明に戻ります。

This API indirectly controls the candidate gathering process. When a local description is supplied and the number of transports currently in use does not match the number of transports needed by the local description, the PeerConnection will create transports as needed and begin gathering candidates for each transport, using ones from the candidate pool if available.

このAPIは、候補者の収集プロセスを間接的に制御します。ローカルの説明が提供され、現在使用されている輸送の数がローカルの説明に必要な輸送の数と一致しない場合、ピーコネクツは必要に応じて輸送を作成し、利用可能な場合は候補プールからのものを使用して、各輸送の候補者の収集を開始します。。

If (1) setRemoteDescription was previously called with an offer, (2) setLocalDescription is called with an answer (provisional or final), (3) the media directions are compatible, and (4) media is available to send, this will result in the starting of media transmission.

(1)setRemotedescriptionが以前にオファーで呼び出された場合、(2)setlocaldescriptionが回答(暫定または最終)、(3)メディアの指示が互換性があり、(4)メディアが利用可能である場合、これはメディア送信の開始。

4.1.12. setRemoteDescription
4.1.12. setRemotedescription

The setRemoteDescription method instructs the PeerConnection to apply the supplied session description as the desired remote configuration. As in setLocalDescription, the type field of the description indicates how it should be processed.

setRemotedesscriptionメソッドは、PeerConnectionに、付属のセッションの説明を目的のリモート構成として適用するよう指示します。setlocaldescriptionのように、説明のタイプフィールドは、それをどのように処理するかを示します。

This API changes the local media state; among other things, it sets up local resources for sending and encoding media.

このAPIは、地元のメディア状態を変更します。とりわけ、メディアを送信およびエンコードするためのローカルリソースを設定します。

If (1) setLocalDescription was previously called with an offer, (2) setRemoteDescription is called with an answer (provisional or final), (3) the media directions are compatible, and (4) media is available to send, this will result in the starting of media transmission.

(1)setlocaldescriptionが以前にオファーで呼び出された場合、(2)setRemotedesscriptionが回答(暫定的または最終)、(3)メディアの指示が互換性があり、(4)メディアが送信できる場合、これはメディア送信の開始。

4.1.13. currentLocalDescription
4.1.13. CurrentLocalDescription

The currentLocalDescription method returns the current negotiated local description -- i.e., the local description from the last successful offer/answer exchange -- in addition to any local candidates that have been generated by the ICE agent since the local description was set.

CurrentLocalDescriptionメソッドは、ローカルの説明が設定されて以来、ICEエージェントによって生成されたローカル候補者に加えて、現在交渉されたローカル説明(つまり、最後の成功したオファー/回答交換のローカル説明)を返します。

A null object will be returned if an offer/answer exchange has not yet been completed.

オファー/回答の交換がまだ完了していない場合、nullオブジェクトが返されます。

4.1.14. pendingLocalDescription
4.1.14. 保留中のローカルデスプト

The pendingLocalDescription method returns a copy of the local description currently in negotiation -- i.e., a local offer set without any corresponding remote answer -- in addition to any local candidates that have been generated by the ICE agent since the local description was set.

PendingLocalDescriptionメソッドは、現在交渉中のローカル説明のコピー(つまり、対応するリモートの回答のないローカルオファーセット)を返します。

A null object will be returned if the state of the PeerConnection is "stable" or "have-remote-offer".

ピーロネクションの状態が「安定」または「remoteofoffer」がある場合、nullオブジェクトが返されます。

4.1.15. currentRemoteDescription
4.1.15. CurrentRemotedescription

The currentRemoteDescription method returns a copy of the current negotiated remote description -- i.e., the remote description from the last successful offer/answer exchange -- in addition to any remote candidates that have been supplied via processIceMessage since the remote description was set.

CurrentRemoteDescriptionメソッドは、現在の交渉済みのリモート説明のコピー(つまり、最後の成功したオファー/回答交換のリモート説明)を返します。

A null object will be returned if an offer/answer exchange has not yet been completed.

オファー/回答の交換がまだ完了していない場合、nullオブジェクトが返されます。

4.1.16. pendingRemoteDescription
4.1.16. PendingRemoteDESScription

The pendingRemoteDescription method returns a copy of the remote description currently in negotiation -- i.e., a remote offer set without any corresponding local answer -- in addition to any remote candidates that have been supplied via processIceMessage since the remote description was set.

PendingRemotedEdscriptionメソッドは、現在交渉中のリモート説明のコピー(つまり、対応するローカル回答なしのリモートオファーセット)を返します。

A null object will be returned if the state of the PeerConnection is "stable" or "have-local-offer".

ピーコネクションの状態が「安定した」または「localferfer」の状態がある場合、nullオブジェクトが返されます。

4.1.17. canTrickleIceCandidates
4.1.17. Cantrickleicecandidates

The canTrickleIceCandidates property indicates whether the remote side supports receiving trickled candidates. There are three potential values:

CantrickleiceCandidatesプロパティは、リモート側がトリクルド候補者を受け取ることをサポートするかどうかを示します。潜在的な値は3つあります。

null:

ヌル:

No SDP has been received from the other side, so it is not known if it can handle trickle. This is the initial value before setRemoteDescription is called.

反対側からSDPが受信されていないため、トリクルを処理できるかどうかは不明です。これは、setRemotedesscriptionが呼び出される前の初期値です。

true:

真実:

SDP has been received from the other side indicating that it can support trickle.

SDPは反対側から受け取られており、それがトリクルをサポートできることを示しています。

false:

間違い:

SDP has been received from the other side indicating that it cannot support trickle.

SDPは反対側から受け取られており、トリクルをサポートできないことを示しています。

As described in Section 3.5.2, JSEP implementations always provide candidates to the application individually, consistent with what is needed for Trickle ICE. However, applications can use the canTrickleIceCandidates property to determine whether their peer can actually do Trickle ICE, i.e., whether it is safe to send an initial offer or answer followed later by candidates as they are gathered. As "true" is the only value that definitively indicates remote Trickle ICE support, an application that compares canTrickleIceCandidates against "true" will by default attempt half trickle on initial offers and full trickle on subsequent interactions with a Trickle ICE-compatible agent.

セクション3.5.2で説明されているように、JSEP実装は常にアプリケーションに候補者を個別に提供し、トリクルアイスに必要なものと一致しています。ただし、アプリケーションは、CantrickleiceCandidatesプロパティを使用して、ピアが実際に氷をトリクルすることができるかどうかを判断できます。つまり、最初のオファーまたは回答を送信してから、後で収集された候補者がそれに続くかどうかを判断できます。「真」は、リモートトリクルアイスサポートを明確に示す唯一の値であるため、「真」と「真」と比較するアプリケーションは、デフォルトで最初のオファーで半分トリックルを試み、その後の氷互換エージェントとのその後の相互作用で完全にトリクルを試みます。

4.1.18. setConfiguration
4.1.18. setConfiguration

The setConfiguration method allows the global configuration of the PeerConnection, which was initially set by constructor parameters, to be changed during the session. The effects of calling this method depend on when it is invoked, and they will differ, depending on which specific parameters are changed:

SetConfigurationメソッドにより、最初はコンストラクターパラメーターによって設定されていたPeerConnectionのグローバルな構成がセッション中に変更されます。このメソッドを呼び出すことの効果は、いつ呼び出されるかによって異なり、特定のパラメーターが変更されるかによって異なります。

* Any changes to the STUN/TURN servers to use affect the next gathering phase. If an ICE gathering phase has already started or completed, the 'needs-ice-restart' bit mentioned in Section 3.5.1 will be set. This will cause the next call to createOffer to generate new ICE credentials, for the purpose of forcing an ICE restart and kicking off a new gathering phase, in which the new servers will be used. If the ICE candidate pool has a nonzero size and a local description has not yet been applied, any existing candidates will be discarded, and new candidates will be gathered from the new servers.

* Stun/Turnサーバーの使用を使用して使用することは、次の収集フェーズに影響します。氷の収集段階が既に開始または完了している場合、セクション3.5.1で言及されている「ニーズアイスリスート」ビットが設定されます。これにより、次の呼び出しは、アイスの再起動を強制し、新しいサーバーが使用される新しい収集段階をキックする目的で、新しいアイスクレデンシャルを生成するために次の呼び出しを作成します。ICE候補のプールにゼロ以外のサイズがあり、ローカルの説明がまだ適用されていない場合、既存の候補者は廃棄され、新しい候補者は新しいサーバーから収集されます。

* Any change to the ICE candidate policy affects the next gathering phase. If an ICE gathering phase has already started or completed, the 'needs-ice-restart' bit will be set. Either way, changes to the policy have no effect on the candidate pool, because pooled candidates are not made available to the application until a gathering phase occurs, and so any necessary filtering can still be done on any pooled candidates.

* ICE候補ポリシーの変更は、次の収集段階に影響します。氷の収集段階が既に開始または完了している場合、「ニーズアイスリスターアート」ビットが設定されます。いずれにせよ、プールされた候補者は収集段階が発生するまでアプリケーションが利用できないため、ポリシーの変更は候補プールに影響を与えません。したがって、プールされた候補者で必要なフィルタリングを実行できます。

* The ICE candidate pool size MUST NOT be changed after applying a local description. If a local description has not yet been applied, any changes to the ICE candidate pool size take effect immediately; if increased, additional candidates are pre-gathered; if decreased, the now-superfluous candidates are discarded.

* ローカルの説明を適用した後、アイス候補のプールサイズを変更しないでください。ローカルの説明がまだ適用されていない場合、ICE候補のプールサイズの変更はすぐに有効になります。増加した場合、追加の候補者は採掘されています。減少すると、現在微妙な候補者が破棄されます。

* The bundle and RTCP-multiplexing policies MUST NOT be changed after the construction of the PeerConnection.

* バンドルおよびRTCPマルチプレックスポリシーは、ピーコネクションの構築後に変更してはなりません。

Calling this method may result in a change to the state of the ICE agent.

この方法を呼び出すと、氷剤の状態が変更される可能性があります。

4.1.19. addIceCandidate
4.1.19. 中毒性

The addIceCandidate method provides an update to the ICE agent via an IceCandidate object (Section 3.5.2.1). If the IceCandidate's candidate field is non-null, the IceCandidate is treated as a new remote ICE candidate, which will be added to the current and/or pending remote description according to the rules defined for Trickle ICE. Otherwise, the IceCandidate is treated as an end-of-candidates indication, as defined in [RFC8838], Section 14.

AddiceCandidateメソッドは、IceCandidateオブジェクトを介してICEエージェントの更新を提供します(セクション3.5.2.1)。Icecandidateの候補フィールドが非ヌルの場合、Icecandidateは新しいリモートアイス候補として扱われ、Trickle Iceで定義されたルールに従って現在および/または保留中のリモート説明に追加されます。それ以外の場合、[RFC8838]、セクション14で定義されているように、IceCandidiateは補助性の兆候として扱われます。

In either case, the "m=" section index, MID, and ufrag fields from the supplied IceCandidate are used to determine which "m=" section and ICE candidate generation the IceCandidate belongs to, as described in Section 3.5.2.1 above. In the case of an end-of-candidates indication, null values for the "m=" section index and MID fields are interpreted to mean that the indication applies to all "m=" sections in the specified ICE candidate generation. However, if both fields are null for a new remote candidate, this MUST be treated as an invalid condition, as specified below.

いずれの場合も、付属の氷膜からの「m =」セクションインデックス、MID、およびUFRAGフィールドを使用して、上記のセクション3.5.2.1で説明されているように、Icecandidateが属する「m =」セクションと氷候補の生成を決定します。キャンディケート終了の兆候の場合、「m =」セクションインデックスと中間フィールドのnull値は、指定が指定されたICE候補生成のすべての「m =」セクションに適用されることを意味すると解釈されます。ただし、両方のフィールドが新しいリモート候補の場合、これは以下に指定されているように、無効な状態として扱わなければなりません。

If any IceCandidate fields contain invalid values or an error occurs during the processing of the IceCandidate object, the supplied IceCandidate MUST be ignored and an error MUST be returned.

IceCandidateフィールドに無効な値が含まれているか、IceCandidateオブジェクトの処理中にエラーが発生した場合、供給されるicecandidateは無視し、エラーを返す必要があります。

Otherwise, the new remote candidate or end-of-candidates indication is supplied to the ICE agent. In the case of a new remote candidate, connectivity checks will be sent to the new candidate, assuming that setLocalDescription has already been called to initialize the ICE gathering process.

それ以外の場合、新しいリモート候補またはキャンディデート終了の表示が氷剤に供給されます。新しいリモート候補の場合、氷の収集プロセスを初期化するためにsetlocaldescriptionがすでに呼び出されていると仮定して、接続性チェックが新しい候補に送信されます。

4.1.20. onicecandidate Event
4.1.20. onicecandidateイベント

The onicecandidate event is dispatched to the application in two situations: (1) when the ICE agent has discovered a new allowed local ICE candidate during ICE gathering, as outlined in Section 3.5.1 and subject to the restrictions discussed in Section 3.5.3, or (2) when an ICE gathering phase completes. The event contains a single IceCandidate object, as defined in Section 3.5.2.1.

Onicecandidateイベントは、2つの状況でアプリケーションに派遣されます。(1)セクション3.5.1で概説されているように、氷の剤が氷の収集中に新しい許可された氷の候補を発見し、セクション3.5.3で説明した制限の対象となる場合、または(2)氷の収集フェーズが完了したとき。このイベントには、セクション3.5.2.1で定義されているように、単一のicecandidateオブジェクトが含まれています。

In the first case, the newly discovered candidate is reflected in the IceCandidate object, and all of its fields MUST be non-null. This candidate will also be added to the current and/or pending local description according to the rules defined for Trickle ICE.

最初のケースでは、新しく発見された候補はicecandidateオブジェクトに反映され、そのすべてのフィールドは非ヌルでなければなりません。この候補者は、トリクルアイスで定義されたルールに従って、現在および/または保留中のローカル説明に追加されます。

In the second case, the event's IceCandidate object MUST have its candidate field set to null to indicate that the current gathering phase is complete, i.e., there will be no further onicecandidate events in this phase. However, the IceCandidate's ufrag field MUST be specified to indicate which ICE candidate generation is ending. The IceCandidate's "m=" section index and MID fields MAY be specified to indicate that the event applies to a specific "m=" section, or set to null to indicate that it applies to all "m=" sections in the current ICE candidate generation. This event can be used by the application to generate an end-of-candidates indication, as defined in [RFC8838], Section 13.

2番目のケースでは、イベントのIcecandidateオブジェクトには、現在の収集段階が完全であることを示すために、候補フィールドがnullに設定されている必要があります。ただし、IceCandidateのUFRAGフィールドを指定して、どのICE候補の生成が終了しているかを示す必要があります。IceCandididateの「M =」セクションインデックスおよびミッドフィールドは、イベントが特定の「M =」セクションに適用されることを示すように指定することができます。世代。このイベントは、[RFC8838]で定義されているように、セクション13で定義されているように、アプリケーションで使用するために使用できます。

4.2. RtpTransceiver
4.2. rtptransceiver
4.2.1. stop
4.2.1. 停止ストップ止める終止立ち止まる止む打ち切る停める留める阻む停留差し止める途絶える押える区切り上がり佇む踏み止まる句切る止まること停まる

The stop method stops an RtpTransceiver. This will cause future calls to createOffer to generate a zero port for the associated "m=" section. See below for more details.

STOPメソッドは、rtptransceiverを停止します。これにより、将来の呼び出しは、関連する「M =」セクションのゼロポートを生成するためにcreateOfferを作成します。詳細については、以下をご覧ください。

4.2.2. stopped
4.2.2. 停止

The stopped property indicates whether the transceiver has been stopped, either by a call to stop or by applying an answer that rejects the associated "m=" section. In either of these cases, it is set to "true" and otherwise will be set to "false".

停止したプロパティは、停止する呼び出しのいずれかによって、または関連する「m =」セクションを拒否する回答を適用することにより、トランシーバーが停止されたかどうかを示します。これらのいずれかの場合、それは「真」に設定されており、それ以外の場合は「false」に設定されます。

A stopped RtpTransceiver does not send any outgoing RTP or RTCP or process any incoming RTP or RTCP. It cannot be restarted.

停止したRTPTransceiverでは、発信RTPまたはRTCPを送信したり、着信RTPまたはRTCPを処理したりしません。再起動することはできません。

4.2.3. setDirection
4.2.3. setDirection

The setDirection method sets the direction of a transceiver, which affects the direction property of the associated "m=" section on future calls to createOffer and createAnswer. The permitted values for direction are "recvonly", "sendrecv", "sendonly", and "inactive", mirroring the identically named direction attributes defined in [RFC4566], Section 6.

SetDirectionメソッドは、Transceiverの方向を設定します。これは、CreateOfferとCreateAnswerへの将来の呼び出しに関する関連する「M =」セクションの方向プロパティに影響します。方向の許可された値は、「recvonly」、「sendrecv」、「sendonly」、および「unactive」であり、[RFC4566]で定義されている同一に指定された方向属性を反映しています。

When creating offers, the transceiver direction is directly reflected in the output, even for re-offers. When creating answers, the transceiver direction is intersected with the offered direction, as explained in Section 5.3 below.

オファーを作成するとき、トランシーバーの方向は、再勤務者であっても、出力に直接反映されます。回答を作成するとき、以下のセクション5.3で説明されているように、トランシーバーの方向に提供された方向と交差します。

Note that while setDirection sets the direction property (Section 4.2.4) of the transceiver immediately, this property does not immediately affect whether the transceiver's RtpSender will send or its RtpReceiver will receive. The direction in effect is represented by the currentDirection property, which is only updated when an answer is applied.

SetDirectionはトランシーバーの方向プロパティ(セクション4.2.4)をすぐに設定しますが、このプロパティは、トランシーバーのRTPSENDENDが送信するか、そのRTPReceiverが受信するかどうかにすぐに影響しないことに注意してください。実際の方向は、currentDirectionプロパティによって表されます。これは、回答が適用されたときにのみ更新されます。

4.2.4. direction
4.2.4. 方向向き方位指示方角方面指揮行き方針路補導訓示帰趣見当支配宛名トレンド使用法

The direction property indicates the last value passed into setDirection. If setDirection has never been called, it is set to the direction the transceiver was initialized with.

方向プロパティは、setDirectionに渡された最後の値を示します。SetDirectionが呼び出されたことがない場合、トランシーバーが初期化された方向に設定されます。

4.2.5. currentDirection
4.2.5. CurrentDirection

The currentDirection property indicates the last negotiated direction for the transceiver's associated "m=" section. More specifically, it indicates the direction attribute [RFC3264] of the associated "m=" section in the last applied answer (including provisional answers), with the direction reversed if it was a remote answer. For example, if the direction attribute for the associated "m=" section in a remote answer is "recvonly", currentDirection is set to "sendonly".

CurrentDirectionプロパティは、トランシーバーの関連する「M =」セクションの最後の交渉方向を示します。より具体的には、最後の適用回答(仮の回答を含む)の関連する「m =」セクションの方向属性[RFC3264]を示し、それがリモートの回答である場合は方向が逆になります。たとえば、リモート回答の関連する「m =」セクションの方向属性が「recvonly」である場合、currentDirectionは「sendonly」に設定されます。

If an answer that references this transceiver has not yet been applied or if the transceiver is stopped, currentDirection is set to null.

このトランシーバーを参照する回答がまだ適用されていない場合、またはトランシーバーが停止した場合、currentDirectionはnullに設定されます。

4.2.6. setCodecPreferences
4.2.6. SetCodeCpreferences

The setCodecPreferences method sets the codec preferences of a transceiver, which in turn affect the presence and order of codecs of the associated "m=" section on future calls to createOffer and createAnswer. Note that setCodecPreferences does not directly affect which codec the implementation decides to send. It only affects which codecs the implementation indicates that it prefers to receive, via the offer or answer. Even when a codec is excluded by setCodecPreferences, it still may be used to send until the next offer/answer exchange discards it.

SetCodeCpreferencesメソッドは、トランシーバーのコーデック設定を設定します。これは、Create OfferとCreateAnswerへの将来の呼び出しに関する関連する「M =」セクションの存在と順序に影響を与えます。SetCodeCpreferencesは、実装が送信することを決定するコーデックに直接影響しないことに注意してください。これは、オファーや回答を介して、実装が受信することを好むことを示すコーデックにのみ影響します。コーデックがSetCodeCpreferencesによって除外されている場合でも、次のオファー/回答の交換がそれを廃棄するまで送信するために使用される場合があります。

The codec preferences of an RtpTransceiver can cause codecs to be excluded by subsequent calls to createOffer and createAnswer, in which case the corresponding media formats in the associated "m=" section will be excluded. The codec preferences cannot add media formats that would otherwise not be present.

RTPTransceiverのコーデックの好みは、Create OfferとCreateanswerの後続の呼び出しによってコーデックを除外する可能性があります。この場合、関連する「M =」セクションの対応するメディア形式は除外されます。コーデックの好みは、そうでなければ存在しないメディア形式を追加することはできません。

The codec preferences of an RtpTransceiver can also determine the order of codecs in subsequent calls to createOffer and createAnswer, in which case the order of the media formats in the associated "m=" section will follow the specified preferences.

RTPTransceiverのコーデックの好みは、Create OfferとCreateanswerの後続の呼び出しでコーデックの順序を決定することもできます。

5. SDP Interaction Procedures
5. SDP相互作用手順

This section describes the specific procedures to be followed when creating and parsing SDP objects.

このセクションでは、SDPオブジェクトを作成および解析するときに従うべき特定の手順について説明します。

5.1. Requirements Overview
5.1. 要件の概要

JSEP implementations MUST comply with the specifications listed below that govern the creation and processing of offers and answers.

JSEPの実装は、オファーと回答の作成と処理を支配する以下にリストされている仕様に準拠する必要があります。

5.1.1. Usage Requirements
5.1.1. 使用要件

All session descriptions handled by JSEP implementations, both local and remote, MUST indicate support for the following specifications. If any of these are absent, this omission MUST be treated as an error.

JSEP実装によって処理されるすべてのセッションの説明は、ローカルとリモートの両方で、以下の仕様のサポートを示す必要があります。これらのいずれかが不在の場合、この省略はエラーとして扱わなければなりません。

* ICE, as specified in [RFC8445], MUST be used. Note that the remote endpoint may use a lite implementation; implementations MUST properly handle remote endpoints that use ICE-lite. The remote endpoint may also use an older version of ICE; implementations MUST properly handle remote endpoints that use ICE as specified in [RFC5245].

* [RFC8445]で指定されているように、氷を使用する必要があります。リモートエンドポイントはLite実装を使用する場合があることに注意してください。実装は、アイスライトを使用するリモートエンドポイントを適切に処理する必要があります。リモートエンドポイントは、古いバージョンのICEを使用する場合もあります。実装は、[RFC5245]で指定されているICEを使用するリモートエンドポイントを適切に処理する必要があります。

* DTLS [RFC6347] [RFC9147] or DTLS-SRTP [RFC5763] MUST be used, as appropriate for the media type, as specified in [RFC8827]. Note: RFC 8827 requires implementations to support DTLS 1.2 [RFC6347] and permits the use of DTLS 1.3 [RFC9147].

* [RFC8827]で指定されているように、DTLS [RFC6347] [RFC9147]またはDTLS-SRTP [RFC5763]を使用する必要があります。注:RFC 8827は、DTLS 1.2 [RFC6347]をサポートするための実装が必要であり、DTLS 1.3 [RFC9147]の使用を許可します。

The SDP security descriptions mechanism for Secure Real-time Transport Protocol (SRTP) keying [RFC4568] MUST NOT be used, as discussed in [RFC8827].

[RFC8827]で説明されているように、安全なリアルタイム輸送プロトコル(SRTP)キーイング[RFC4568]のセキュアリアルタイム輸送プロトコル(SRTP)キーイングのSDPセキュリティ記述メカニズムを使用してはなりません。

5.1.2. Profile Names and Interoperability
5.1.2. プロファイル名と相互運用性

For media "m=" sections, JSEP implementations MUST support the "UDP/TLS/RTP/SAVPF" profile specified in [RFC5764] as well as the "TCP/DTLS/RTP/SAVPF" profile specified in [RFC7850] and MUST indicate one of these profiles for each media "m=" line they produce in an offer. For data "m=" sections, implementations MUST support the "UDP/DTLS/SCTP" profile as well as the "TCP/DTLS/SCTP" profile and MUST indicate one of these profiles for each data "m=" line they produce in an offer. The exact profile to use is determined by the protocol associated with the current default or selected ICE candidate, as described in [RFC8839], Section 4.2.1.2.

メディアの「M =」セクションの場合、JSEP実装は[RFC5764]で指定された「UDP/TLS/RTP/SAVPF」プロファイルと[RFC7850]で指定された「TCP/DTLS/RTP/SAVPF」プロファイルをサポートする必要があり、示さなければならない必要があります。各メディアのこれらのプロファイルの1つは、オファーで作成する「m =」ライン。データ「m =」セクションの場合、実装は「udp/dtls/sctp」プロファイルと「tcp/dtls/sctp」プロファイルをサポートする必要があり、各データのこれらのプロファイルのいずれかを示す必要があります。提案。使用する正確なプロファイルは、[RFC8839]、セクション4.2.1.2で説明されているように、現在のデフォルトまたは選択されたICE候補に関連付けられたプロトコルによって決定されます。

Unfortunately, in an attempt at compatibility, some endpoints generate other profile strings even when they mean to support one of these profiles. For instance, an endpoint might generate "RTP/AVP" but supply "a=fingerprint" and "a=rtcp-fb" attributes, indicating its willingness to support "UDP/TLS/RTP/SAVPF" or "TCP/DTLS/RTP/SAVPF". In order to simplify compatibility with such endpoints, JSEP implementations MUST follow the following rules when processing the media "m=" sections in a received offer:

残念ながら、互換性を試みると、一部のエンドポイントは、これらのプロファイルのいずれかをサポートすることを意味する場合でも、他のプロファイル文字列を生成します。たとえば、エンドポイントは「RTP/AVP」を生成しますが、「A =指紋」と「A = RTCP-FB」属性を提供し、「UDP/TLS/RTP/SAVPF」または「TCP/DTLS/RTPをサポートする意欲を示しています。/savpf "。このようなエンドポイントとの互換性を簡素化するには、JSEPの実装は、受信したオファーのメディア「m =」セクションを処理する際に次のルールに従う必要があります。

* Any profile in the offer matching one of the following MUST be accepted:

* 以下のいずれかに一致するオファー内のプロファイルは、受け入れなければなりません。

- "RTP/AVP" (defined in [RFC4566], Section 8.2.2)

- 「RTP/AVP」([RFC4566]、セクション8.2.2で定義)

- "RTP/AVPF" (defined in [RFC4585], Section 9)

- 「RTP/AVPF」([RFC4585]、セクション9で定義)

- "RTP/SAVP" (defined in [RFC3711], Section 12)

- 「RTP/SAVP」([RFC3711]、セクション12で定義)

- "RTP/SAVPF" (defined in [RFC5124], Section 6)

- 「rtp/savpf」([rfc5124]、セクション6で定義)

- "TCP/DTLS/RTP/SAVP" (defined in [RFC7850], Section 3.4)

- 「TCP/DTLS/RTP/SAVP」([RFC7850]、セクション3.4で定義)

- "TCP/DTLS/RTP/SAVPF" (defined in [RFC7850], Section 3.5)

- 「TCP/DTLS/RTP/SAVPF」([RFC7850]、セクション3.5で定義)

- "UDP/TLS/RTP/SAVP" (defined in [RFC5764], Section 9)

- 「UDP/TLS/RTP/SAVP」([RFC5764]、セクション9で定義)

- "UDP/TLS/RTP/SAVPF" (defined in [RFC5764], Section 9)

- 「UDP/TLS/RTP/SAVPF」([RFC5764]、セクション9で定義)

* The profile in any "m=" line in any generated answer MUST exactly match the profile provided in the offer.

* 生成された回答の「m =」行のプロファイルは、オファーで提供されるプロファイルと正確に一致する必要があります。

* Because DTLS-SRTP is REQUIRED, the choice of SAVP or AVP has no effect; support for DTLS-SRTP is determined by the presence of one or more "a=fingerprint" attributes. Note that lack of an "a=fingerprint" attribute will lead to negotiation failure.

* DTLS-SRTPが必要なため、SAVPまたはAVPの選択は効果がありません。DTLS-SRTPのサポートは、1つ以上の「a =指紋」属性の存在によって決定されます。「a =フィンガープリント」属性の欠如は、交渉の失敗につながることに注意してください。

* The use of AVPF or AVP simply controls the timing rules used for RTCP feedback. If AVPF is provided or an "a=rtcp-fb" attribute is present, assume AVPF timing, i.e., a default value of "trr-int=0". Otherwise, assume that AVPF is being used in an AVP-compatible mode and use a value of "trr-int=4000".

* AVPFまたはAVPの使用は、RTCPフィードバックに使用されるタイミングルールを単純に制御します。AVPFが提供されている場合、または「A = RTCP-FB」属性が存在する場合、AVPFタイミング、つまり「TRR-INT = 0」のデフォルト値を仮定します。それ以外の場合は、AVPFがAVP互換モードで使用されており、「TRR-INT = 4000」の値を使用していると仮定します。

* For data "m=" sections, implementations MUST support receiving the "UDP/DTLS/SCTP", "TCP/DTLS/SCTP", or "DTLS/SCTP" (for backwards compatibility) profiles.

* データ「M =」セクションの場合、実装は「UDP/DTLS/SCTP」、「TCP/DTLS/SCTP」、または「DTLS/SCTP」(後方互換性の場合)プロファイルの受信をサポートする必要があります。

Note that re-offers by JSEP implementations MUST use the correct profile strings even if the initial offer/answer exchange used an (incorrect) older profile string. This simplifies JSEP behavior, with minimal downside, as any remote endpoint that fails to handle such a re-offer will also fail to handle a JSEP endpoint's initial offer.

JSEPの実装による再フローは、最初のオファー/回答交換が(誤った)古いプロファイル文字列を使用した場合でも、正しいプロファイル文字列を使用する必要があることに注意してください。これにより、このようなリフォームを処理できないリモートエンドポイントは、JSEPエンドポイントの初期オファーを処理できないため、JSEPの動作が最小限の欠点で簡素化されます。

5.2. Constructing an Offer
5.2. オファーの構築

When createOffer is called, a new SDP description MUST be created that includes the functionality specified in [RFC8834]. The exact details of this process are explained below.

CreateOfferが呼び出される場合、[RFC8834]で指定された機能を含む新しいSDP説明を作成する必要があります。このプロセスの正確な詳細については、以下に説明します。

5.2.1. Initial Offers
5.2.1. 最初のオファー

When createOffer is called for the first time, the result is known as the initial offer.

CreateOfferが初めて呼び出されると、結果は初期オファーとして知られています。

The first step in generating an initial offer is to generate session-level attributes, as specified in [RFC4566], Section 5. Specifically:

最初のオファーを生成する最初のステップは、[RFC4566]、セクション5で指定されているように、セッションレベルの属性を生成することです。

* The first SDP line MUST be "v=0" as defined in [RFC4566], Section 5.1.

* 最初のSDPラインは、[rfc4566]で定義されている「v = 0」でなければなりません。セクション5.1です。

* The second SDP line MUST be an "o=" line as defined in [RFC4566], Section 5.2. The value of the <username> field SHOULD be "-". The <sess-id> MUST be representable by a 64-bit signed integer, and the value MUST be less than (2^63)-1. This is to ensure that the <sess-id> value, when expressed as a string, is always a non-negative integer, as some SDP parsers may fail to parse a negative <sess-id>. It is RECOMMENDED that the <sess-id> be constructed by generating a 64-bit quantity with the highest bit set to zero and the remaining 63 bits being cryptographically random. The value of the <nettype> <addrtype> <unicast-address> tuple SHOULD be set to a non-meaningful address, such as IN IP4 0.0.0.0, to prevent leaking a local IP address in this field; this problem is discussed in [RFC8828]. As mentioned in [RFC4566], the entire "o=" line needs to be unique, but selecting a random number for <sess-id> is sufficient to accomplish this.

* 2番目のSDP行は、[RFC4566]で定義されている「O =」線である必要があります。セクション5.2。<username>フィールドの値は「 - 」でなければなりません。<sess-id>は、64ビットの署名された整数で表現できる必要があり、値は(2^63)-1未満でなければなりません。これは、一部のSDPパーサーがネガティブ<sess-id>を解析できない可能性があるため、文字列として表現された場合、<sess-id>値が常に非陰性整数であることを保証するためです。<sess-id>は、最高ビットがゼロに設定され、残りの63ビットが暗号的にランダムになる64ビット数量を生成することにより構築することをお勧めします。このフィールドのローカルIPアドレスの漏れを防ぐために、<nettype> <addrtype> <unicast-address>タプルの値は、IP4 0.0.0.0などの非意味のアドレスに設定する必要があります。この問題は[RFC8828]で説明されています。[rfc4566]で述べたように、「o =」行全体は一意である必要がありますが、<sess-id>の乱数を選択するだけでこれを達成するのに十分です。

* The third SDP line MUST be a "s=" line as defined in [RFC4566], Section 5.3; to match the "o=" line, a single dash SHOULD be used as the session name, e.g., "s=-". Note that this differs from the advice in [RFC4566], which proposes a single space, but as both "o=" and "s=" are meaningless in JSEP, having the same meaningless value seems clearer.

* 3番目のSDP行は、[RFC4566]で定義されている「S =」線でなければなりません。セクション5.3。「o =」行に一致するには、セッション名として単一のダッシュを使用する必要があります。たとえば、「s = - 」。これは、単一のスペースを提案する[RFC4566]のアドバイスとは異なることに注意してください。

* Session Information ("i="), URI ("u="), Email Address ("e="), Phone Number ("p="), Repeat Times ("r="), and Time Zones ("z=") lines are not useful in this context and SHOULD NOT be included.

* セッション情報( "i =")、uri( "u =")、電子メールアドレス( "e =")、電話番号( "p =")、リピート時間( "r =")、およびタイムゾーン( "z z= ")行はこのコンテキストでは役に立たず、含めるべきではありません。

* Encryption Keys ("k=") lines do not provide sufficient security and MUST NOT be included.

* 暗号化キー( "k =")ラインは、十分なセキュリティを提供せず、含める必要はありません。

* A "t=" line MUST be added, as specified in [RFC4566], Section 5.9; both <start-time> and <stop-time> SHOULD be set to zero, e.g., "t=0 0".

* [RFC4566]で指定されているように、「t =」行を追加する必要があります。セクション5.9。<開始時刻>と<ストップタイム>の両方をゼロ、たとえば「t = 0 0」に設定する必要があります。

* An "a=ice-options" line with the "trickle" and "ice2" options MUST be added, as specified in [RFC8840], Section 4.1.1 and [RFC8445], Section 10.

* [RFC8840]、セクション4.1.1および[RFC8445]、セクション10で指定されているように、「トリクル」および「ICE2」オプションを備えた「A = ICE-Options」線を追加する必要があります。

* If WebRTC identity is being used, an "a=identity" line MUST be added, as described in [RFC8827], Section 5.

* weBRTCのアイデンティティが使用されている場合、[rfc8827]、セクション5で説明されているように、「a = ID」行を追加する必要があります。

The next step is to generate "m=" sections, as specified in [RFC4566], Section 5.14. An "m=" section is generated for each RtpTransceiver that has been added to the PeerConnection, excluding any stopped RtpTransceivers; this is done in the order the RtpTransceivers were added to the PeerConnection. If there are no such RtpTransceivers, no "m=" sections are generated; more can be added later, as discussed in [RFC3264], Section 5.

次のステップは、[RFC4566]で指定されている「M =」セクションを生成することです。セクション5.14です。停止したrtptransceiverを除く、ピーエルコネクションに追加された各rtptransceiverに対して「m =」セクションが生成されます。これは、RTPTransceiverがPeerConnectionに追加された順序で行われます。そのようなrtptransceiversがない場合、「m =」セクションは生成されません。[RFC3264]、セクション5で説明したように、後でさらに追加できます。

For each "m=" section generated for an RtpTransceiver, establish a mapping between the transceiver and the index of the generated "m=" section.

rtptransceiver用に生成された各「m =」セクションについて、生成された「m =」セクションのインデックスとインデックスの間にマッピングを確立します。

Each "m=" section, provided it is not marked as bundle-only, MUST contain a unique set of ICE credentials and a unique set of ICE candidates. Bundle-only "m=" sections MUST NOT contain any ICE credentials and MUST NOT gather any candidates.

バンドルのみとしてマークされていない場合は、各「m =」セクションには、一意の氷の資格情報と一意の氷の候補セットが含まれている必要があります。Bundleのみの「M =」セクションには、氷の資格情報が含まれていないため、候補者を集めてはなりません。

For DTLS, all "m=" sections MUST use any and all certificates that have been specified for the PeerConnection; as a result, they MUST all have the same fingerprint value or values [RFC8122], or these values MUST be session-level attributes.

DTLSの場合、すべての「m =」セクションは、PeerConnectionに指定されたすべての証明書を使用する必要があります。その結果、それらはすべて同じ指紋値または値[RFC8122]を持っている必要があります。そうしないと、これらの値はセッションレベルの属性でなければなりません。

Each "m=" section MUST be generated as specified in [RFC4566], Section 5.14. For the "m=" line itself, the following rules MUST be followed:

各「m =」セクションは、[RFC4566]、セクション5.14で指定されているように生成する必要があります。「m =」行自体の場合、次のルールに従う必要があります。

* If the "m=" section is marked as bundle-only, then the <port> value MUST be set to zero. Otherwise, the <port> value is set to the port of the default ICE candidate for this "m=" section, but given that no candidates are available yet, the default <port> value of 9 (Discard) MUST be used, as indicated in [RFC8840], Section 4.1.1.

* 「m =」セクションがバンドルのみとしてマークされている場合、<port>値はゼロに設定する必要があります。それ以外の場合、<port>値はこの「m =」セクションのデフォルトのアイス候補のポートに設定されますが、候補者がまだ利用できないことを考えると、デフォルトの<port>値は9(discard)を使用する必要があります。[RFC8840]、セクション4.1.1に示されています。

* To properly indicate use of DTLS, the <proto> field MUST be set to "UDP/TLS/RTP/SAVPF", as specified in [RFC5764], Section 8.

* DTLの使用を適切に示すには、[RFC5764]で指定されているように、<プロト>フィールドを「UDP/TLS/RTP/SAVPF」に設定する必要があります。

* If codec preferences have been set for the associated transceiver, media formats MUST be generated in the corresponding order and MUST exclude any codecs not present in the codec preferences.

* 関連するトランシーバーに対してコーデック設定が設定されている場合、メディア形式は対応する順序で生成され、コーデックの好みに存在しないコーデックを除外する必要があります。

* Unless excluded by the above restrictions, the media formats MUST include the mandatory audio/video codecs as specified in [RFC7874], Section 3 and [RFC7742], Section 5.

* 上記の制限で除外されない限り、メディア形式は、[RFC7874]、セクション3および[RFC7742]で指定されているように、必須のオーディオ/ビデオコーデックをセクション5に含める必要があります。

The "m=" line MUST be followed immediately by a "c=" line, as specified in [RFC4566], Section 5.7. Again, as no candidates are available yet, the "c=" line MUST contain the default value "IN IP4 0.0.0.0", as defined in [RFC8840], Section 4.1.1.

[rfc4566]、セクション5.7で指定されているように、「m =」行の後に「c =」行が続く必要があります。繰り返しますが、候補者はまだ利用できないため、[RFC8840]で定義されているように、「C =」行はIP4 0.0.0.0 "にデフォルト値を含める必要があります。セクション4.1.1。

[RFC8859] groups SDP attributes into different categories. To avoid unnecessary duplication when bundling, attributes of category IDENTICAL or TRANSPORT MUST NOT be repeated in bundled "m=" sections, repeating the guidance from [RFC9143], Section 7.1.3. This includes "m=" sections for which bundling has been negotiated and is still desired, as well as "m=" sections marked as bundle-only.

[RFC8859] SDP属性をさまざまなカテゴリにグループ化します。バンドリング時に不必要な複製を避けるために、カテゴリの属性同一または輸送の属性を「M =」セクションで束ねて、[RFC9143]からのガイダンスを繰り返して、セクション7.1.3で繰り返してはなりません。これには、バンドリングが交渉され、まだ望まれている「m =」セクション、およびバンドルのみとしてマークされた「m =」セクションが含まれます。

The following attributes, which are of a category other than IDENTICAL or TRANSPORT, MUST be included in each "m=" section:

同一または輸送以外のカテゴリの次の属性は、各「m =」セクションに含める必要があります。

* An "a=mid" line, as specified in [RFC5888], Section 4. All MID values MUST be generated in a fashion that does not leak user information, e.g., randomly or using a per-PeerConnection counter, and SHOULD be 3 bytes or less, to allow them to efficiently fit into the RTP header extension defined in [RFC9143], Section 15.2. Note that this does not set the RtpTransceiver mid property, as that only occurs when the description is applied. The generated MID value can be considered a "proposed" MID at this point.

* [RFC5888]で指定されている「A = MID」行。セクション4では、すべてのMID値は、たとえば、ランダムにまたは使用ごとのカウンターを使用して、ユーザー情報をリークしない方法で生成する必要があります。以下、[RFC9143]で定義されているRTPヘッダー拡張に効率的に適合できるようにするために、セクション15.2。これは、説明が適用されたときにのみ発生するため、rtptransceiver Midプロパティを設定しないことに注意してください。生成された中間値は、この時点で「提案された」中間と見なすことができます。

* A direction attribute that is the same as that of the associated transceiver.

* 関連するトランシーバーの方向属性と同じ方向属性。

* For each media format on the "m=" line, "a=rtpmap" and "a=fmtp" lines, as specified in [RFC4566], Section 6 and [RFC3264], Section 5.1.

* [rfc4566]、セクション6および[rfc3264]で指定されているように、「m = "line、" a = rtpmap "および「a = fmtp」行の各メディア形式について、セクション5.1。

* For each primary codec where RTP retransmission should be used, a corresponding "a=rtpmap" line indicating "rtx" with the clock rate of the primary codec and an "a=fmtp" line that references the payload type of the primary codec, as specified in [RFC4588], Section 8.1.

* RTPの再送信を使用する必要がある各プライマリコーデックについては、プライマリコーデックのクロックレートと「RTX」を示す対応する「a = rtpmap」行と、プライマリコーデックのペイロードタイプを参照する「a = fmtp」行、[RFC4588]、セクション8.1で指定されています。

* For each Forward Error Correction (FEC) mechanism supported by the application, "a=rtpmap" and "a=fmtp" lines, as specified in [RFC4566], Section 6. The FEC mechanisms that MUST be supported are specified in [RFC8854], Section 7, and specific usage for each media type is outlined in Sections 4 and 5 of [RFC8854].

* [RFC4566]で指定されているように、アプリケーションでサポートされている各フォワードエラー補正(FEC)メカニズム「A = RTPMAP」および「A = FMTP」ライン。、セクション7、および各メディアタイプの特定の使用法は、[RFC8854]のセクション4および5で概説されています。

* If this "m=" section is for media with configurable durations of media per packet, e.g., audio, an "a=maxptime" line, indicating the maximum amount of media, specified in milliseconds, that can be encapsulated in each packet, as specified in [RFC4566], Section 6. This value is set to the smallest of the maximum duration values across all the codecs included in the "m=" section.

* この「m =」セクションは、パケットごとのメディアの構成可能な期間を備えたメディア用である場合、たとえばオーディオ、「a = maxptime」ラインで、ミリ秒単位で指定されたメディアの最大量を示します。[RFC4566]、セクション6で指定されています。この値は、「m =」セクションに含まれるすべてのコーデックにわたって最小期間値の最小値に設定されています。

* If this "m=" section is for video media and there are known limitations on the size of images that can be decoded, an "a=imageattr" line, as specified in Section 3.6.

* この「m =」セクションはビデオメディア用であり、セクション3.6で指定されているように、デコードできる画像のサイズに既知の制限がある場合、「a = imageattr」行です。

* For each RTP header extension supported by the application, an "a=extmap" line, as specified in [RFC5285], Section 5. The list of header extensions that SHOULD/MUST be supported is specified in [RFC8834], Section 5.2. Any header extensions that require encryption MUST be specified as indicated in [RFC6904], Section 4.

* アプリケーションでサポートされている各RTPヘッダー拡張機能については、[RFC5285]で指定されている「A = extMap」行5、セクション5に、[RFC8834]、セクション5.2で指定されているヘッダー拡張機能のリストがあります。暗号化を必要とするヘッダー拡張機能は、[RFC6904]、セクション4に示されているように指定する必要があります。

* For each RTCP feedback mechanism supported by the application, an "a=rtcp-fb" line, as specified in [RFC4585], Section 4.2. The list of RTCP feedback mechanisms that SHOULD/MUST be supported is specified in [RFC8834], Section 5.1.

* アプリケーションでサポートされる各RTCPフィードバックメカニズムについて、[RFC4585]で指定されている「A = RTCP-FB」ライン、セクション4.2。サポートする必要があるRTCPフィードバックメカニズムのリストは、[RFC8834]、セクション5.1で指定されています。

* If the RtpTransceiver has a "sendrecv" or "sendonly" direction:

* rtptransceiverに「sendrecv」または「sendonly」方向がある場合:

- For each MediaStream that was associated with the transceiver when it was created via addTrack or addTransceiver, an "a=msid" line, as specified in [RFC8830], Section 2, but omitting the "appdata" field.

- [RFC8830]で指定されているように、「appData」フィールドを省略した「a = sid」線であるaddtrackまたはaddtransceiverを介して作成されたときに、トランシーバーに関連付けられた各メディアストリームについて。

* If the RtpTransceiver has a "sendrecv" or "sendonly" direction, and the application has specified a rid-id for an encoding, or has specified more than one encoding in the RtpSenders's parameters, an "a=rid" line for each encoding specified. The "a=rid" line is specified in [RFC8851], and its direction MUST be "send". If the application has chosen a rid-id, it MUST be used; otherwise, a rid-id MUST be generated by the implementation. rid-ids MUST be generated in a fashion that does not leak user information, e.g., randomly or using a per-PeerConnection counter (see guidance at the end of [RFC8852], Section 3.3), and SHOULD be 3 bytes or less, to allow them to efficiently fit into the RTP header extensions defined in [RFC8852], Section 3.3. If no encodings have been specified, or only one encoding is specified but without a rid-id, then no "a=rid" lines are generated.

* rtptransceiverに「sendrecv」または「sendonly」方向があり、アプリケーションがエンコード用のRID-IDを指定した場合、またはRTPSENDERSのパラメーターで複数のエンコードを指定した場合、指定された各エンコードの「A = RID」ラインを指定しました。。「a = red」行は[rfc8851]で指定されており、その方向は「送信」でなければなりません。アプリケーションがRID-IDを選択した場合、使用する必要があります。それ以外の場合は、実装によってRID-IDを生成する必要があります。RID-IDは、ユーザー情報を漏れない方法で生成する必要があります。たとえば、ランダムに、または1ペーの皮膚接続ごとのカウンターを使用します([RFC8852]、セクション3.3の最後のガイダンスを参照)、3バイト以下である必要があります。[RFC8852]、セクション3.3で定義されているRTPヘッダー拡張機能に効率的に適合するようにします。エンコーディングが指定されていない場合、または1つのエンコードのみが指定されているが、Rid-IDがない場合、「a = red」行は生成されません。

* If the RtpTransceiver has a "sendrecv" or "sendonly" direction and more than one "a=rid" line has been generated, an "a=simulcast" line, with direction "send", as defined in [RFC8853], Section 5.1. The associated set of rid-ids MUST include all of the rid-ids used in the "a=rid" lines for this "m=" section.

* rtptransceiverに「sendrecv」または「sendonly」方向があり、複数の「rid」行が生成された場合、[rfc8853]で定義されているように、「a = simulcast」行、方向「send」とともに、「a = simulcast」行が生成された場合、セクション5.1。関連するRID-IDのセットには、この「M =」セクションの「A = RID」行で使用されるすべてのRID-IDを含める必要があります。

* If (1) the bundle policy for this PeerConnection is set to "must-bundle" and this is not the first "m=" section or (2) the bundle policy is set to "balanced" and this is not the first "m=" section for this media type, an "a=bundle-only" line.

* (1)このPeerConnectionのバンドルポリシーが「必見」に設定されている場合、これは最初の「M =」セクションではないか、(2)バンドルポリシーは「バランス」に設定されており、これは最初の「Mではありません。= "このメディアタイプのセクション、「a = bundleのみ」行。

The following attributes, which are of category IDENTICAL or TRANSPORT, MUST appear only in "m=" sections that either have a unique address or are associated with the BUNDLE-tag. (In initial offers, this means those "m=" sections that do not contain an "a=bundle-only" attribute.)

カテゴリの同一またはトランスポートの次の属性は、一意のアドレスを持つか、バンドルタグに関連付けられている「m =」セクションにのみ表示する必要があります。(最初のオファーでは、これは「a = bundleのみ」属性を含まない「m =」セクションを意味します。)

* "a=ice-ufrag" and "a=ice-pwd" lines, as specified in [RFC8839], Section 5.4.

* [rfc8839]で指定されている「a = ice-ufrag」および「a = ice-pwd」線、セクション5.4。

* For each desired digest algorithm, one or more "a=fingerprint" lines for each of the endpoint's certificates, as specified in [RFC8122], Section 5.

* 必要なダイジェストアルゴリズムごとに、[RFC8122]で指定されているエンドポイントの各証明書の1つまたは複数の「a =指紋」行。セクション5。

* An "a=setup" line, as specified in [RFC4145], Section 4 and clarified for use in DTLS-SRTP scenarios in [RFC5763], Section 5. The role value in the offer MUST be "actpass".

* [rfc4145]で指定されている「a = setup」行、セクション4、[RFC5763]のDTLS-SRTPシナリオで使用するために明確にされ、セクション5.オファーの役割値は「ActPass」でなければなりません。

* An "a=tls-id" line, as specified in [RFC8842], Section 5.2.

* [RFC8842]で指定されている「A = TLS-ID」行、セクション5.2。

* An "a=rtcp" line, as specified in [RFC3605], Section 2.1, containing the default value "9 IN IP4 0.0.0.0", because no candidates have yet been gathered.

* [RFC3605]で指定されている「A = RTCP」行、セクション2.1、候補者がまだ収集されていないため、デフォルト値「IP4 0.0.0.0」にデフォルト値が含まれています。

* An "a=rtcp-mux" line, as specified in [RFC5761], Section 5.1.3.

* [rfc5761]で指定されている「a = rtcp-mux」線、セクション5.1.3。

* If the RTP/RTCP multiplexing policy is "require", an "a=rtcp-mux-only" line, as specified in [RFC8858], Section 4.

* RTP/RTCPマルチプレックスポリシーが「要求」である場合、[RFC8858]で指定されているように、「A = RTCP-Muxのみの」行、セクション4です。

* An "a=rtcp-rsize" line, as specified in [RFC5506], Section 5.

* [RFC5506]で指定されている「a = rtcp-rsize」線、セクション5。

Lastly, if a data channel has been created, an "m=" section MUST be generated for data. The <media> field MUST be set to "application", and the <proto> field MUST be set to "UDP/DTLS/SCTP" [RFC8841]. The <fmt> value MUST be set to "webrtc-datachannel" as specified in [RFC8841], Section 4.4.2.

最後に、データチャネルが作成されている場合、データに対して「m =」セクションを生成する必要があります。<media>フィールドは「アプリケーション」に設定する必要があり、<proto>フィールドは「udp/dtls/sctp」[rfc8841]に設定する必要があります。<fmt>値は、[rfc8841]、セクション4.4.2で指定されている「webrtc-datachannel」に設定する必要があります。

Within the data "m=" section, an "a=mid" line MUST be generated and included as described above, along with an "a=sctp-port" line referencing the SCTP port number, as defined in [RFC8841], Section 5.1; and, if appropriate, an "a=max-message-size" line, as defined in [RFC8841], Section 6.1.

データ "m ="セクション内で、[rfc8841]で定義されているように、sctpポート番号を参照する「a = sctp-ポート」行とともに、上記のように「a = mid」行を生成して含める必要があります。5.1;必要に応じて、[rfc8841]で定義されている「a = max-message-size」線、セクション6.1。

As discussed above, the following attributes of category IDENTICAL or TRANSPORT are included only if the data "m=" section either has a unique address or is associated with the BUNDLE-tag (e.g., if it is the only "m=" section):

上記で説明したように、データ「m =」セクションに一意のアドレスがあるか、バンドルタグに関連付けられている場合(例:唯一の「m =」セクションである場合にのみ、カテゴリの次の属性が含まれます。:

* "a=ice-ufrag"

* 「a = ice-ufrag」

* "a=ice-pwd"

* 「a = ice-pwd」

* "a=fingerprint"

* 「A =指紋」

* "a=setup"

* 「A =セットアップ」

* "a=tls-id"

* 「a = tls-id」

Once all "m=" sections have been generated, a session-level "a=group" attribute MUST be added as specified in [RFC5888]. This attribute MUST have semantics "BUNDLE" and MUST include the MID identifiers of each "m=" section. The effect of this is that the JSEP implementation offers all "m=" sections as one bundle group. However, whether the "m=" sections are bundle-only or not depends on the bundle policy.

すべての「m =」セクションが生成されると、[RFC5888]で指定されているように、セッションレベルの「a =グループ」属性を追加する必要があります。この属性にはセマンティクス「バンドル」が必要で、各「m =」セクションの中間識別子を含める必要があります。これの効果は、JSEP実装がすべての「m =」セクションを1つのバンドルグループとして提供することです。ただし、「m =」セクションがバンドルのみであるかどうかは、バンドルポリシーに依存します。

The next step is to generate session-level lip sync groups as defined in [RFC5888], Section 7. For each MediaStream referenced by more than one RtpTransceiver (by passing those MediaStreams as arguments to the addTrack and addTransceiver methods), a group of type "LS" MUST be added that contains the MID values for each RtpTransceiver.

次のステップは、[RFC5888]、セクション7で定義されているセッションレベルのLIP同期グループを生成することです。複数のrtptransceiverによって参照される各メディアストリームについて(これらのメディアストリームを追加とaddtrackおよびaddtransceiverメソッドに渡すことにより)タイプのグループであるタイプのグループです。各rtptransceiverの中間値を含む「ls」を追加する必要があります。

Attributes that SDP permits to be at either the session level or the media level SHOULD generally be at the media level even if they are identical. This assists development and debugging by making it easier to understand individual media sections, especially if one of a set of initially identical attributes is subsequently changed. However, implementations MAY choose to aggregate attributes at the session level, and JSEP implementations MUST be prepared to receive attributes in either location.

SDPがセッションレベルまたはメディアレベルのいずれかで許可する属性は、たとえ同一であっても、メディアレベルにあるはずです。これにより、特に一連の最初の同一属性の1つがその後変更された場合、個々のメディアセクションを理解しやすくすることで、開発とデバッグを支援します。ただし、実装はセッションレベルで属性を集約することを選択する場合があり、JSEPの実装は、いずれの場所で属性を受信するために準備する必要があります。

Attributes other than the ones specified above MAY be included, except for the following attributes, which are specifically incompatible with the requirements of [RFC8834] and MUST NOT be included:

上記の属性以外の属性は、[RFC8834]の要件と特異的に互換性のない次の属性を除き、上記の属性を含めることができます。

* "a=crypto"

* 「A = Crypto」

* "a=key-mgmt"

* 「a = key-mgmt」

* "a=ice-lite"

* 「a =アイスライト」

Note that when bundle is used, any additional attributes that are added MUST follow the advice in [RFC8859] on how those attributes interact with bundle.

バンドルを使用する場合、追加された追加の属性は、それらの属性がバンドルとどのように相互作用するかについての[RFC8859]のアドバイスに従う必要があることに注意してください。

Note that these requirements are in some cases stricter than those of SDP. Implementations MUST be prepared to accept compliant SDP even if it would not conform to the requirements for generating SDP in this specification.

これらの要件は、場合によってはSDPの要件よりも厳しいことに注意してください。この仕様でSDPを生成するための要件に準拠していなくても、準拠したSDPを受け入れるために実装を準備する必要があります。

5.2.2. Subsequent Offers
5.2.2. 後続のオファー

When createOffer is called a second (or later) time or is called after a local description has already been installed, the processing is somewhat different than for an initial offer.

CreateOfferが2回目(またはそれ以降の)と呼ばれる場合、またはローカル説明が既にインストールされていた後に呼び出される場合、処理は初期オファーとは多少異なります。

If the previous offer was not applied using setLocalDescription, meaning the PeerConnection is still in the "stable" state, the steps for generating an initial offer MUST be followed, subject to the following restriction:

以前のオファーがsetlocaldescriptionを使用して適用されなかった場合、ピーエルコネクションがまだ「安定した」状態にあることを意味する場合、以下の制限に従って、初期オファーを生成する手順に従う必要があります。

* The fields of the "o=" line MUST stay the same except for the <session-version> field, which MUST increment by one on each call to createOffer if the offer might differ from the output of the previous call to createOffer; implementations MAY opt to increment <session-version> on every call. The value of the generated <session-version> is independent of the <session-version> of the current local description; in particular, in the case where the current version is N, an offer is created and applied with version N+1, and then that offer is rolled back so that the current version is again N, the next generated offer will still have version N+2.

* 「o =」行のフィールドは、<session-version>フィールドを除いて同じままでなければなりません。これは、オファーが以前の呼び出しの出力とCreateOfferに異なる場合に、各コールで1つずつcreateOfferに増分する必要があります。実装は、すべての呼び出しで<session-version>を増やすことを選択できます。生成された<session-version>の値は、現在のローカル説明の<session-version>に依存しません。特に、現在のバージョンがnである場合、オファーが作成され、バージョンn+1で適用され、そのオファーが巻き戻され、現在のバージョンが再びnになるように、次の生成されたオファーにはバージョンnがあります。+2。

Note that if the application creates an offer by reading currentLocalDescription instead of calling createOffer, the returned SDP may be different than when setLocalDescription was originally called, due to the addition of gathered ICE candidates, but the <session-version> will not have changed. There are no known scenarios in which this causes problems, but if this is a concern, the solution is simply to use createOffer to ensure a unique <session-version>.

アプリケーションがCreateOfferを呼び出す代わりにCurrentLocalDescriptionを読んでオファーを作成した場合、返されたSDPは、集められたICE候補の追加により、SetlocalDescriptionが元々呼ばれたときとは異なる場合がありますが、<セッションバージョン>は変更されていません。これが問題を引き起こす既知のシナリオはありませんが、これが懸念事項である場合、解決策は単にCreateOfferを使用して一意の<セッションバージョン>を確保することです。

If the previous offer was applied using setLocalDescription, but a corresponding answer from the remote side has not yet been applied, meaning the PeerConnection is still in the "have-local-offer" state, an offer is generated by following the steps in the "stable" state above, along with these exceptions:

以前のオファーがsetlocaldescriptionを使用して適用されたが、リモート側からの対応する回答がまだ適用されていない場合、ピーコネクションはまだ「局所的なもの」状態にあることを意味します。これらの例外とともに、上記の安定した状態:

* The "s=" and "t=" lines MUST stay the same.

* 「s =」と「t =」行は同じままでなければなりません。

* If any RtpTransceiver has been added and there exists an "m=" section with a zero port in the current local description or the current remote description, that "m=" section MUST be recycled by generating an "m=" section for the added RtpTransceiver as if the "m=" section were being added to the session description (including a new MID value) and placing it at the same index as the "m=" section with a zero port.

* rtptransceiverが追加されており、現在のローカル説明または現在のリモート説明にゼロポートがある「m =」セクションが存在する場合、追加の「m =」セクションをリサイクルする必要があります。rtptransceiver「m =」セクションがセッションの説明(新しい中値を含む)に追加され、ゼロポートのある「m =」セクションと同じインデックスに配置されているかのように。

* If an RtpTransceiver is stopped and is not associated with an "m=" section, an "m=" section MUST NOT be generated for it. This prevents adding back RtpTransceivers whose "m=" sections were recycled and used for a new RtpTransceiver in a previous offer/ answer exchange, as described above.

* rtptransceiverが停止し、「m =」セクションに関連付けられていない場合、「m =」セクションを生成してはなりません。これにより、上記のように、以前のオファー/回答交換で「m =」セクションがリサイクルされ、新しいrtptransceiverに使用されたrtptransceiversの追加を防ぎます。

* If an RtpTransceiver has been stopped and is associated with an "m=" section, and the "m=" section is not being recycled as described above, an "m=" section MUST be generated for it with the port set to zero and all "a=msid" lines removed.

* rtptransceiverが停止し、「m =」セクションに関連付けられており、「m =」セクションが上記のようにリサイクルされていない場合、ポートをゼロに設定して「m =」セクションを生成する必要があります。すべての「a = msid」線が削除されました。

* For RtpTransceivers that are not stopped, the "a=msid" line or lines MUST stay the same if they are present in the current description, regardless of changes to the transceiver's direction or track. If no "a=msid" line is present in the current description, "a=msid" line(s) MUST be generated according to the same rules as for an initial offer.

* 停止されていないrtptransceiverの場合、トランシーバーの方向またはトラックの変更に関係なく、「a = sid」行または線は現在の説明に存在する場合は同じままでなければなりません。現在の説明に「a = msid」行が存在しない場合、「a = msid」行は、初期オファーと同じルールに従って生成する必要があります。

* Each "m=" and "c=" line MUST be filled in with the port, relevant RTP profile, and address of the default candidate for the "m=" section, as described in [RFC8839], Section 4.2.1.2 and clarified in Section 5.1.2. If no RTP candidates have yet been gathered, default values MUST still be used, as described above.

* 各「m =」および「c =」行は、[RFC8839]、セクション4.2.1.2に記載されている「m =」セクションのデフォルト候補のポート、関連するRTPプロファイル、およびアドレスで記入する必要があります。セクション5.1.2で。RTP候補がまだ収集されていない場合、上記のように、デフォルト値を使用する必要があります。

* Each "a=mid" line MUST stay the same.

* 各「a = mid」行は同じままでなければなりません。

* Each "a=ice-ufrag" and "a=ice-pwd" line MUST stay the same, unless the ICE configuration has changed (e.g., changes to either the supported STUN/TURN servers or the ICE candidate policy) or the IceRestart option (Section 5.2.3.1) was specified. If the "m=" section is bundled into another "m=" section, it still MUST NOT contain any ICE credentials.

* ICE構成が変更されていない限り(サポートされているスタン/ターンサーバーまたはICE候補ポリシーのいずれかに変更)またはIcerestARTオプションを変更しない限り、各「A = ICE-UFRAG」および「A = ICE-PWD」ラインは同じままでなければなりません。(セクション5.2.3.1)が指定されました。「m =」セクションが別の「m =」セクションにバンドルされている場合、氷の資格情報を含めてはなりません。

* If the "m=" section is not bundled into another "m=" section, its "a=rtcp" attribute line MUST be filled in with the port and address of the default RTCP candidate, as indicated in [RFC5761], Section 5.1.3. If no RTCP candidates have yet been gathered, default values MUST be used, as described in Section 5.2.1 above.

* 「m =」セクションが別の「m =」セクションにバンドルされていない場合、[rfc5761]に示されているように、その「a = rtcp」属性行は、デフォルトのRTCP候補のポートとアドレスで記入する必要があります。セクション5.1.3。上記のセクション5.2.1で説明されているように、RTCP候補がまだ収集されていない場合は、デフォルト値を使用する必要があります。

* If the "m=" section is not bundled into another "m=" section, for each candidate that has been gathered during the most recent gathering phase (see Section 3.5.1), an "a=candidate" line MUST be added, as defined in [RFC8839], Section 5.1. If candidate gathering for the section has completed, an "a=end-of-candidates" attribute MUST be added, as described in [RFC8840], Section 8.2. If the "m=" section is bundled into another "m=" section, both "a=candidate" and "a=end-of-candidates" MUST be omitted.

* 「m =」セクションが別の「m =」セクションにバンドルされていない場合、最新の収集段階で収集された各候補(セクション3.5.1を参照)、「a =候補」行を追加する必要があります。[RFC8839]で定義されているように、セクション5.1。[RFC8840]、セクション8.2に記載されているように、セクションの候補者の収集が完了した場合、「a = condididates」属性を追加する必要があります。「m =」セクションが別の「m =」セクションにバンドルされている場合、「a =候補」と「a =キャンディデートの終了」の両方を省略する必要があります。

* For RtpTransceivers that are still present, the "a=rid" lines MUST stay the same.

* まだ存在しているrtptransceiverの場合、「a = red」行は同じままでなければなりません。

* For RtpTransceivers that are still present, any "a=simulcast" line MUST stay the same.

* まだ存在しているrtptransceiverの場合、「a = simulcast」行は同じままでなければなりません。

If the previous offer was applied using setLocalDescription, and a corresponding answer from the remote side has been applied using setRemoteDescription, meaning the PeerConnection is in the "have-remote-pranswer" state or the "stable" state, an offer is generated based on the negotiated session descriptions by following the steps mentioned for the "have-local-offer" state above.

以前のオファーがsetlocaldescriptionを使用して適用され、リモート側からの対応する回答がsetRemotedescriptionを使用して適用されている場合、ピーコネクションは「remote pranswer」状態または「安定した」状態にあることを意味します。上記の「局所的な」状態について言及された手順に従って、交渉されたセッションの説明。

In addition, for each existing, non-recycled, non-rejected "m=" section in the new offer, the following adjustments are made based on the contents of the corresponding "m=" section in the current local or remote description, as appropriate:

さらに、新しいオファーの既存の、リサイクルされていない、拒否されていない「M =」セクションごとに、現在のローカルまたはリモートの説明の対応する「m =」セクションの内容に基づいて、次の調整が行われます。適切な:

* The "m=" line and corresponding "a=rtpmap" and "a=fmtp" lines MUST only include media formats that have not been excluded by the codec preferences of the associated transceiver and also MUST include all currently available formats. Media formats that were previously offered but are no longer available (e.g., a shared hardware codec) MAY be excluded.

* 「m = "行および対応する" a = rtpmap "および「a = fmtp」行には、関連するトランシーバーのコーデック選好によって除外されていないメディア形式のみを含める必要があり、現在利用可能なすべての形式も含める必要があります。以前に提供されていたが利用できなくなったメディア形式(たとえば、共有ハードウェアコーデックなど)は除外される場合があります。

* Unless codec preferences have been set for the associated transceiver, the media formats on the "m=" line MUST be generated in the same order as in the most recent answer. Any media formats that were not present in the most recent answer MUST be added after all existing formats.

* 関連するトランシーバーに対してコーデックの設定が設定されていない限り、「m =」行のメディア形式は、最新の回答と同じ順序で生成する必要があります。最新の回答に存在しなかったメディア形式は、すべての既存の形式の後に追加する必要があります。

* The RTP header extensions MUST only include those that are supported by the application on the associated transceiver.

* RTPヘッダー拡張機能には、関連するトランシーバーのアプリケーションによってサポートされているもののみを含める必要があります。

* The RTCP feedback mechanisms MUST only include those that are supported by the application on the associated transceiver.

* RTCPフィードバックメカニズムには、関連するトランシーバーのアプリケーションによってサポートされているもののみを含める必要があります。

* The "a=rtcp" line MUST NOT be added if the most recent answer included an "a=rtcp-mux" line.

* 最新の回答に「a = rtcp-mux」行が含まれている場合、「a = rtcp」行を追加しないでください。

* The "a=rtcp-mux" line MUST be the same as that in the most recent answer.

* 「a = rtcp-mux」行は、最新の回答と同じでなければなりません。

* The "a=rtcp-mux-only" line MUST NOT be added.

* 「a = rtcp-muxのみ」行を追加してはなりません。

* The "a=rtcp-rsize" line MUST NOT be added unless present in the most recent answer.

* 最新の回答に存在しない限り、「a = rtcp-rsize」行を追加しないでください。

* An "a=bundle-only" line, as defined in [RFC9143], Section 6, MUST NOT be added. Instead, JSEP implementations MUST simply omit parameters in the IDENTICAL and TRANSPORT categories for bundled "m=" sections, as described in [RFC9143], Section 7.1.3.

* [RFC9143]で定義されている「a = bundleのみ」行をセクション6に追加してはなりません。代わりに、JSEP実装は、[RFC9143]、セクション7.1.3で説明されているように、バンドルされた「M =」セクションの同一および輸送カテゴリのパラメーターを単純に省略する必要があります。

* Note that if media "m=" sections are bundled into a data "m=" section, then certain TRANSPORT and IDENTICAL attributes may appear in the data "m=" section even if they would otherwise only be appropriate for a media "m=" section (e.g., "a=rtcp-mux"). This cannot happen in initial offers because in the initial offer JSEP implementations always list media "m=" sections (if any) before the data "m=" section (if any), and at least one of those media "m=" sections will not have the "a=bundle-only" attribute. Therefore, in initial offers, any "a=bundle-only" "m=" sections will be bundled into a preceding non-bundle-only media "m=" section.

* メディア「m =」セクションがデータ "m ="セクションにバンドルされている場合、特定のトランスポートと同一の属性がデータに表示される場合があります。「セクション( "a = rtcp-mux")。JSEP実装では、JSEP実装が常にメディア「M =」セクション(存在する場合)が「m =」セクション(もしあれば)、およびそれらのメディア「m =」セクションの少なくとも1つを常にリストするため、これは初期オファーでは発生することはできません。「a = bundleのみ」属性はありません。したがって、最初のオファーでは、「a = bundleのみ」「m =」セクションは、前のバンドルのみのメディア「m =」セクションにバンドルされます。

The "a=group:BUNDLE" attribute MUST include the MID identifiers specified in the bundle group in the most recent answer, minus any "m=" sections that have been marked as rejected, plus any newly added or re-enabled "m=" sections. In other words, the bundle attribute MUST contain all "m=" sections that were previously bundled, as long as they are still alive, as well as any new "m=" sections.

「A =グループ:バンドル」属性には、最新の回答でバンドルグループで指定された中間識別子を含める必要があります。「セクション。言い換えれば、バンドル属性には、まだ生きている限り、以前にバンドルされたすべての「m =」セクションと、新しい「m =」セクションを含める必要があります。

Note that if bundling has been negotiated, unbundling is no longer possible, and media sections will not be marked as bundle-only. Although this is by design, it could cause issues in the rare case of sending a subsequent offer as an initial offer to a non-bundle-aware endpoint via Third Party Call Control (3PCC), as discussed in [RFC9143], Section 7.6.

バンドリングが交渉された場合、アンバンドリングはもはや不可能であり、メディアセクションはバンドルのみとしてマークされないことに注意してください。これは設計によるものですが、[RFC9143]で説明されているように、サードパーティコールコントロール(3PCC)を介してバンドルを認識していないエンドポイントへの初期オファーとしてその後のオファーを送信するまれなケースで問題を引き起こす可能性があります。

"a=group:LS" attributes are generated in the same way as for initial offers, with the additional stipulation that any lip sync groups that were present in the most recent answer MUST continue to exist and MUST contain any previously existing MID identifiers, as long as the identified "m=" sections still exist and are not rejected, and the group still contains at least two MID identifiers. This ensures that any synchronized "recvonly" "m=" sections continue to be synchronized in the new offer.

「A =グループ:LS」属性は、最初のオファーと同じ方法で生成されます。最新の回答に存在するLIP同期グループは存在し続け、以前に既存のMID識別子を含む必要があるという追加の規定があります。特定された「m =」セクションがまだ存在し、拒否されておらず、グループには少なくとも2つの中間識別子が含まれている限り。これにより、同期された「recvonly」「m =」セクションが引き続き新しいオファーで同期されることが保証されます。

5.2.3. Options Handling
5.2.3. オプション処理

The createOffer method takes as a parameter an RTCOfferOptions object. Special processing is performed when generating an SDP description if the following options are present.

CreateOfferメソッドは、パラメーターとしてRTCofferoptionsオブジェクトを取ります。次のオプションが存在する場合、SDP説明を生成するときに特別な処理が実行されます。

5.2.3.1. IceRestart
5.2.3.1. Icerestart

If the IceRestart option is specified, with a value of "true", the offer MUST indicate an ICE restart by generating new ICE ufrag and pwd attributes, as specified in [RFC8839], Section 4.4.1.1.1. If this option is specified on an initial offer, it has no effect (since a new ICE ufrag and pwd are already generated). Similarly, if the ICE configuration has changed, this option has no effect, since new ufrag and pwd attributes will be generated automatically. This option is primarily useful for reestablishing connectivity in cases where failures are detected by the application.

[True]の値でIcerestartオプションが指定されている場合、[RFC8839]で指定されているように、新しいICE UFRAGおよびPWD属性を生成することにより、オファーはICEの再起動を示す必要があります。セクション4.4.1.1.1。このオプションが初期オファーで指定されている場合、効果はありません(新しいICE UFRAGとPWDがすでに生成されているため)。同様に、新しいUFRAGおよびPWD属性が自動的に生成されるため、ICE構成が変更された場合、このオプションは効果がありません。このオプションは、アプリケーションによって障害が検出された場合の接続性を再確立するために主に役立ちます。

5.2.3.2. VoiceActivityDetection
5.2.3.2. voiceactivitydetection

Silence suppression, also known as discontinuous transmission ("DTX"), can reduce the bandwidth used for audio by switching to a special encoding when voice activity is not detected, at the cost of some fidelity.

不連続伝送(「DTX」)とも呼ばれる沈黙抑制は、音声アクティビティが検出されないときにある程度の忠実度を犠牲にして、特別なエンコードに切り替えることにより、オーディオに使用される帯域幅を減らすことができます。

If the VoiceActivityDetection option is specified, with a value of "true", the offer MUST indicate support for silence suppression in the audio it receives by including comfort noise ("CN") codecs for each offered audio codec, as specified in [RFC3389], Section 5.1, except for codecs that have their own internal silence suppression support. For codecs that have their own internal silence suppression support, the appropriate fmtp parameters for each such codec MUST be specified to indicate that silence suppression for received audio is desired. For example, when using the Opus codec [RFC6716], the "usedtx=1" parameter, specified in [RFC7587], would be used in the offer.

「真」の値でvoicectivitydetectionオプションが指定されている場合、[RFC3389]で指定されているように、提供された各オーディオコーデックのコンフォートノイズ(「CN」)コーデックを含めることにより、受信する音声の沈黙抑制のサポートを示す必要があります。、セクション5.1、独自の内部沈黙抑制サポートを備えたコーデックを除きます。独自の内部沈黙抑制サポートを備えたコーデックの場合、受信したオーディオの沈黙抑制が望ましいことを示すために、各コーデックの適切なFMTPパラメーターを指定する必要があります。たとえば、Opus Codec [RFC6716]を使用する場合、[RFC7587]で指定された「UsedTx = 1」パラメーターがオファーで使用されます。

If the VoiceActivityDetection option is specified, with a value of "false", the JSEP implementation MUST NOT emit "CN" codecs. For codecs that have their own internal silence suppression support, the appropriate fmtp parameters for each such codec MUST be specified to indicate that silence suppression for received audio is not desired. For example, when using the Opus codec, the "usedtx=0" parameter would be specified in the offer. In addition, the implementation MUST NOT use silence suppression for media it generates, regardless of whether the "CN" codecs or related fmtp parameters appear in the peer's description. The impact of these rules is that silence suppression in JSEP depends on mutual agreement of both sides, which ensures consistent handling regardless of which codec is used.

「false」の値を使用して、voicectivitydetectionオプションが指定されている場合、JSEP実装は「CN」コーデックを発してはなりません。独自の内部沈黙抑制サポートを備えたコーデックの場合、受信したオーディオの沈黙抑制が望まれないことを示すために、各コーデックの適切なFMTPパラメーターを指定する必要があります。たとえば、OPUSコーデックを使用する場合、「Usedtx = 0」パラメーターがオファーで指定されます。さらに、「CN」コーデックまたは関連するFMTPパラメーターがピアの説明に表示されるかどうかにかかわらず、実装は、生成するメディアに沈黙抑制を使用してはなりません。これらの規則の影響は、JSEPの沈黙抑制は、どのコーデックが使用されているかに関係なく、一貫した処理を保証する両側の相互一致に依存することです。

The VoiceActivityDetection option does not have any impact on the setting of the "vad" value in the signaling of the client-to-mixer audio level header extension described in [RFC6464], Section 4.

[rfc6464]、セクション4で説明されているクライアントからミクサーへのオーディオレベルヘッダー拡張機能のシグナリングにおいて、voicectivitydetectionオプションは「VAD」値の設定に影響を与えません。

5.3. Generating an Answer
5.3. 答えを生成します

When createAnswer is called, a new SDP description MUST be created that is compatible with the supplied remote description as well as the requirements specified in [RFC8834]. The exact details of this process are explained below.

CreateAnswerが呼び出される場合、[RFC8834]で指定された要件と同様に、付属のリモート説明と互換性のある新しいSDP説明を作成する必要があります。このプロセスの正確な詳細については、以下に説明します。

5.3.1. Initial Answers
5.3.1. 最初の回答

When createAnswer is called for the first time after a remote description has been provided, the result is known as the initial answer. If no remote description has been installed, an answer cannot be generated, and an error MUST be returned.

Createanswerがリモートの説明が提供された後に初めて呼び出されると、結果は最初の答えとして知られています。リモートの説明がインストールされていない場合、回答を生成することはできず、エラーを返す必要があります。

Note that the remote description SDP may not have been created by a JSEP endpoint and may not conform to all the requirements listed in Section 5.2. For many cases, this is not a problem. However, if any mandatory SDP attributes are missing or functionality listed as mandatory-to-use above is not present, this MUST be treated as an error and MUST cause the affected "m=" sections to be marked as rejected.

リモート説明SDPは、JSEPエンドポイントによって作成されていない可能性があり、セクション5.2にリストされているすべての要件に準拠していない場合があることに注意してください。多くの場合、これは問題ではありません。ただし、必須のSDP属性が欠落しているか、上記の必須としてリストされている機能が存在しない場合、これはエラーとして扱われ、影響を受ける「M =」セクションを拒否されたとマークする必要があります。

The first step in generating an initial answer is to generate session-level attributes. The process here is identical to that indicated in Section 5.2.1 above, except that the "a=ice-options" line, with the "trickle" option as specified in [RFC8840], Section 4.1.3 and the "ice2" option as specified in [RFC8445], Section 10, is only included if such an option was present in the offer.

最初の回答を生成する最初のステップは、セッションレベルの属性を生成することです。ここでのプロセスは、上記のセクション5.2.1で示されているプロセスと同じですが、「a = ice-options」行で、[RFC8840]、セクション4.1.3、および「ICE2」オプションで指定されている「トリクル」オプションがあります。[RFC8445]で指定されているように、セクション10は、そのようなオプションがオファーに存在した場合にのみ含まれています。

The next step is to generate session-level lip sync groups, as defined in [RFC5888], Section 7. For each group of type "LS" present in the offer, select the local RtpTransceivers that are referenced by the MID values in the specified group, and determine which of them either reference a common local MediaStream (specified in the calls to addTrack/addTransceiver used to create them) or have no MediaStream to reference because they were not created by addTrack/ addTransceiver. If at least two such RtpTransceivers exist, a group of type "LS" with the MID values of these RtpTransceivers MUST be added. Otherwise, the offered "LS" group MUST be ignored and no corresponding group generated in the answer.

次のステップは、[RFC5888]、セクション7で定義されているセッションレベルのLIP同期グループを生成することです。グループ、およびそれらのどれが一般的なローカルメディアストリーム(それらを作成するために使用されるAddTrack/ AddTransceiverの呼び出しで指定)を参照するか、AddTrack/ AddTransceiverによって作成されていないため、参照するMediaStreamがありません。少なくとも2つのそのようなRTPTransceiverが存在する場合、これらのRTPTransceiverの中間値を持つタイプ「LS」のグループを追加する必要があります。それ以外の場合、提供された「LS」グループは無視する必要があり、回答では対応するグループが生成されません。

As a simple example, consider the following offer of a single audio and single video track contained in the same MediaStream. SDP lines not relevant to this example have been removed for clarity. As explained in Section 5.2, a group of type "LS" has been added that references each track's RtpTransceiver.

簡単な例として、同じMediaStreamに含まれる単一のオーディオと単一のビデオトラックの以下の提供を検討してください。この例に関連しないSDPラインは、明確にするために削除されました。セクション5.2で説明したように、各トラックのrtptransceiverを参照するタイプ「LS」のグループが追加されました。

             a=group:LS a1 v1
             m=audio 10000 UDP/TLS/RTP/SAVPF 0
             a=mid:a1
             a=msid:ms1
             m=video 10001 UDP/TLS/RTP/SAVPF 96
             a=mid:v1
             a=msid:ms1
        

If the answerer uses a single MediaStream when it adds its tracks, both of its transceivers will reference this stream, and so the subsequent answer will contain a "LS" group identical to that in the offer, as shown below:

回答者がトラックを追加するときに単一のMediaStreamを使用する場合、そのトランシーバーの両方がこのストリームを参照するため、以下に示すように、その後の回答には、オファーの「LS」グループが同一の「LS」グループが含まれます。

             a=group:LS a1 v1
             m=audio 20000 UDP/TLS/RTP/SAVPF 0
             a=mid:a1
             a=msid:ms2
             m=video 20001 UDP/TLS/RTP/SAVPF 96
             a=mid:v1
             a=msid:ms2
        

However, if the answerer groups its tracks into separate MediaStreams, its transceivers will reference different streams, and so the subsequent answer will not contain a "LS" group.

ただし、Answererがトラックを別々のMediaStreamsにグループ化する場合、そのトランシーバーは異なるストリームを参照するため、その後の回答には「LS」グループは含まれません。

             m=audio 20000 UDP/TLS/RTP/SAVPF 0
             a=mid:a1
             a=msid:ms2a
             m=video 20001 UDP/TLS/RTP/SAVPF 96
             a=mid:v1
             a=msid:ms2b
        

Finally, if the answerer does not add any tracks, its transceivers will not reference any MediaStreams, causing the preferences of the offerer to be maintained, and so the subsequent answer will contain an identical "LS" group.

最後に、回答者がトラックを追加しない場合、そのトランシーバーはMediaStreamsを参照せず、オファーの好みを維持するため、その後の回答には同一の「LS」グループが含まれます。

             a=group:LS a1 v1
             m=audio 20000 UDP/TLS/RTP/SAVPF 0
             a=mid:a1
             a=recvonly
             m=video 20001 UDP/TLS/RTP/SAVPF 96
             a=mid:v1
             a=recvonly
        

The example in Section 7.2 shows a more involved case of "LS" group generation.

セクション7.2の例は、「LS」グループ生成のより複雑なケースを示しています。

The next step is to generate an "m=" section for each "m=" section that is present in the remote offer, as specified in [RFC3264], Section 6. For the purposes of this discussion, any session-level attributes in the offer that are also valid as media-level attributes are considered to be present in each "m=" section. Each offered "m=" section will have an associated RtpTransceiver, as described in Section 5.10. If there are more RtpTransceivers than there are "m=" sections, the unmatched RtpTransceivers will need to be associated in a subsequent offer.

次のステップは、[RFC3264]、セクション6に指定されているリモートオファーに存在する各「m =」セクションの「m =」セクションを生成することです。この議論の目的で、セッションレベルの属性はメディアレベルの属性としても有効なオファーは、各「m =」セクションに存在すると見なされます。セクション5.10で説明されているように、それぞれ提供される「M =」セクションには、関連するRTPTransceiverがあります。「m =」セクションよりも多くのrtptransceiverがある場合、比類のないrtptransceiverは、その後のオファーに関連付けられる必要があります。

For each offered "m=" section, if any of the following conditions are true, the corresponding "m=" section in the answer MUST be marked as rejected by setting the <port> in the "m=" line to zero, as indicated in [RFC3264], Section 6, and further processing for this "m=" section can be skipped:

提供される「m =」セクションごとに、次の条件のいずれかが真である場合、回答の対応する「m =」セクションは、「m =」行の<port>をゼロに設定することで拒否されたとマークする必要があります。[RFC3264]、セクション6、およびこの「M =」セクションのさらなる処理に示されています。

* The associated RtpTransceiver has been stopped.

* 関連するrtptransceiverは停止しました。

* There is no offered media format that is both supported and, if applicable, allowed by codec preferences.

* サポートされており、該当する場合はコーデックの好みによって許可されている提供されたメディア形式はありません。

* The bundle policy is "must-bundle", and this is not the first "m=" section or in the same bundle group as the first "m=" section.

* バンドルポリシーは「必見」であり、これは最初の「M =」セクションではなく、最初の「M =」セクションと同じバンドルグループではありません。

* The bundle policy is "balanced", and this is not the first "m=" section for this media type or in the same bundle group as the first "m=" section for this media type.

* バンドルポリシーは「バランス」であり、これはこのメディアタイプの最初の「m =」セクションではなく、このメディアタイプの最初の「m =」セクションと同じバンドルグループではありません。

* This "m=" section is in a bundle group, and the group's offerer tagged "m=" section is being rejected due to one of the above reasons. This requires all "m=" sections in the bundle group to be rejected, as specified in [RFC9143], Section 7.3.3.

* この「m =」セクションはバンドルグループにあり、「m =」セクションがタグ付けされたグループのオファー担当者は、上記の理由の1つにより拒否されています。これには、[RFC9143]で指定されているように、セクション7.3.3で指定されているように、バンドルグループ内のすべての「M =」セクションを拒否する必要があります。

Otherwise, each "m=" section in the answer MUST then be generated as specified in [RFC3264], Section 6.1. For the "m=" line itself, the following rules MUST be followed:

それ以外の場合、回答の各「m =」セクションは、[RFC3264]、セクション6.1で指定されているように生成する必要があります。「m =」行自体の場合、次のルールに従う必要があります。

* The <port> value would normally be set to the port of the default ICE candidate for this "m=" section, but given that no candidates are available yet, the default <port> value of 9 (Discard) MUST be used, as indicated in [RFC8840], Section 4.1.1.

* <port>値は通常、この「m =」セクションのデフォルトのアイス候補のポートに設定されますが、候補者がまだ利用できないことを考えると、デフォルトの<port>値は9(discard)を使用する必要があります。[RFC8840]、セクション4.1.1に示されています。

* The <proto> field MUST be set to exactly match the <proto> field for the corresponding "m=" line in the offer.

* <proto>フィールドは、オファーの対応する「m =」行の<proto>フィールドと正確に一致するように設定する必要があります。

* If codec preferences have been set for the associated transceiver, media formats MUST be generated in the corresponding order, regardless of what was offered, and MUST exclude any codecs not present in the codec preferences.

* 関連するトランシーバーに対してコーデック設定が設定されている場合、提供されたものに関係なく、メディア形式を対応する順序で生成する必要があり、コーデックの好みに存在しないコーデックを除外する必要があります。

* Otherwise, the media formats on the "m=" line MUST be generated in the same order as those offered in the current remote description, excluding any currently unsupported formats. Any currently available media formats that are not present in the current remote description MUST be added after all existing formats.

* それ以外の場合、「m =」行のメディア形式は、現在のサポートされていない形式を除く現在のリモート説明で提供されているものと同じ順序で生成する必要があります。現在のリモート説明に存在しない現在利用可能なメディア形式は、すべての既存の形式の後に追加する必要があります。

* In either case, the media formats in the answer MUST include at least one format that is present in the offer but MAY include formats that are locally supported but not present in the offer, as mentioned in [RFC3264], Section 6.1. If no common format exists, the "m=" section is rejected as described above.

* どちらの場合でも、回答のメディア形式には、オファーに存在するが、[RFC3264]に記載されているように、オファーには存在しない形式を含めることができますが、セクション6.1を含めることができます。一般的な形式が存在しない場合、「m =」セクションは上記のように拒否されます。

The "m=" line MUST be followed immediately by a "c=" line, as specified in [RFC4566], Section 5.7. Again, as no candidates are available yet, the "c=" line MUST contain the default value "IN IP4 0.0.0.0", as defined in [RFC8840], Section 4.1.3.

[rfc4566]、セクション5.7で指定されているように、「m =」行の後に「c =」行が続く必要があります。繰り返しますが、候補者はまだ利用できないため、[rfc8840]で定義されているように、「c =」行はIP4 0.0.0.0 "にデフォルト値を含める必要があります。セクション4.1.3。

If the offer supports bundle, all "m=" sections to be bundled MUST use the same ICE credentials and candidates; all "m=" sections not being bundled MUST use unique ICE credentials and candidates. Each "m=" section MUST contain the following attributes (which are of attribute types other than IDENTICAL or TRANSPORT):

オファーがバンドルをサポートする場合、バンドルされるすべての「m =」セクションは、同じ氷の資格情報と候補者を使用する必要があります。バンドルされていないすべての「m =」セクションは、一意の氷の資格情報と候補者を使用する必要があります。各「m =」セクションには、次の属性(同一または輸送以外の属性タイプのもの)を含める必要があります。

* If and only if present in the offer, an "a=mid" line, as specified in [RFC5888], Section 9.1. The MID value MUST match that specified in the offer.

* オファーに存在する場合のみ、[rfc5888]で指定されている「a = mid」行、セクション9.1。中間値は、オファーで指定されているものと一致する必要があります。

* A direction attribute, determined by applying the rules regarding the offered direction specified in [RFC3264], Section 6.1, and then intersecting with the direction of the associated RtpTransceiver. For example, in the case where an "m=" section is offered as "sendonly" and the local transceiver is set to "sendrecv", the result in the answer is a "recvonly" direction.

* [RFC3264]、セクション6.1で指定された提供された方向に関するルールを適用し、関連するRTPTransceiverの方向と交差する方向属性属性。たとえば、「m =」セクションが「sendonly」として提供され、ローカルトランシーバーが「sendrecv」に設定されている場合、答えの結果は「recvonly」方向です。

* For each media format on the "m=" line, "a=rtpmap" and "a=fmtp" lines, as specified in [RFC4566], Section 6 and [RFC3264], Section 6.1.

* [rfc4566]、セクション6および[rfc3264]で指定されているように、「m = "line、" a = rtpmap "および「a = fmtp」行の各メディア形式について、セクション6.1。

* If "rtx" is present in the offer, for each primary codec where RTP retransmission should be used, a corresponding "a=rtpmap" line indicating "rtx" with the clock rate of the primary codec and an "a=fmtp" line that references the payload type of the primary codec, as specified in [RFC4588], Section 8.1.

* 「RTX」がオファーに存在する場合、RTPの再送信を使用する各プライマリコーデック、対応する「A = RTPMAP」行は、プライマリコーデックのクロックレートと「A = FMTP」ラインで「RTX」を示す「RTPMAP」行を示します。[RFC4588]で指定されているプライマリコーデックのペイロードタイプ、セクション8.1を参照してください。

* For each FEC mechanism supported by the application, "a=rtpmap" and "a=fmtp" lines, as specified in [RFC4566], Section 6. The FEC mechanisms that MUST be supported are specified in [RFC8854], Section 7, and specific usage for each media type is outlined in Sections 4 and 5 of [RFC8854].

* [RFC4566]で指定されているように、アプリケーションでサポートされている各FECメカニズム、「A = RTPMAP」および「A = FMTP」線。各メディアタイプの特定の使用法は、[RFC8854]のセクション4および5で概説されています。

* If this "m=" section is for media with configurable durations of media per packet, e.g., audio, an "a=maxptime" line, as described in Section 5.2.

* この「m =」セクションは、セクション5.2で説明されているように、「m =」セクションがパケットごとにメディアの構成可能な期間、たとえば「a = maxptime」行です。

* If this "m=" section is for video media and there are known limitations on the size of images that can be decoded, an "a=imageattr" line, as specified in Section 3.6.

* この「m =」セクションはビデオメディア用であり、セクション3.6で指定されているように、デコードできる画像のサイズに既知の制限がある場合、「a = imageattr」行です。

* For each RTP header extension supported by the application and present in the offer, an "a=extmap" line, as specified in [RFC5285], Section 5. The list of header extensions that SHOULD/ MUST be supported is specified in [RFC8834], Section 5.2. Any header extensions that require encryption MUST be specified as indicated in [RFC6904], Section 4.

* アプリケーションでサポートされ、オファーに存在する各RTPヘッダー拡張機能について、[RFC5285]で指定されている「A = extmap」行5のセクション5について、サポートすべきヘッダー拡張機能のリストは[RFC8834]で指定されています。、セクション5.2。暗号化を必要とするヘッダー拡張機能は、[RFC6904]、セクション4に示されているように指定する必要があります。

* For each RTCP feedback mechanism supported by the application and present in the offer, an "a=rtcp-fb" line, as specified in [RFC4585], Section 4.2. The list of RTCP feedback mechanisms that SHOULD/MUST be supported is specified in [RFC8834], Section 5.1.

* [RFC4585]で指定されているように、アプリケーションによってサポートされ、オファーに存在する各RTCPフィードバックメカニズムについて、「A = RTCP-FB」ライン、セクション4.2。サポートする必要があるRTCPフィードバックメカニズムのリストは、[RFC8834]、セクション5.1で指定されています。

* If the RtpTransceiver has a "sendrecv" or "sendonly" direction:

* rtptransceiverに「sendrecv」または「sendonly」方向がある場合:

- For each MediaStream that was associated with the transceiver when it was created via addTrack or addTransceiver, an "a=msid" line, as specified in [RFC8830], Section 2, but omitting the "appdata" field.

- [RFC8830]で指定されているように、「appData」フィールドを省略した「a = sid」線であるaddtrackまたはaddtransceiverを介して作成されたときに、トランシーバーに関連付けられた各メディアストリームについて。

Each "m=" section that is not bundled into another "m=" section MUST contain the following attributes (which are of category IDENTICAL or TRANSPORT):

別の「m =」セクションにバンドルされていない各「m =」セクションには、次の属性(カテゴリが同一または輸送)を含める必要があります。

* "a=ice-ufrag" and "a=ice-pwd" lines, as specified in [RFC8839], Section 5.4.

* [rfc8839]で指定されている「a = ice-ufrag」および「a = ice-pwd」線、セクション5.4。

* For each desired digest algorithm, one or more "a=fingerprint" lines for each of the endpoint's certificates, as specified in [RFC8122], Section 5.

* 必要なダイジェストアルゴリズムごとに、[RFC8122]で指定されているエンドポイントの各証明書の1つまたは複数の「a =指紋」行。セクション5。

* An "a=setup" line, as specified in [RFC4145], Section 4 and clarified for use in DTLS-SRTP scenarios in [RFC5763], Section 5. The role value in the answer MUST be "active" or "passive". When the offer contains the "actpass" value, as will always be the case with JSEP endpoints, the answerer SHOULD use the "active" role. Offers from non-JSEP endpoints MAY send other values for "a=setup", in which case the answer MUST use a value consistent with the value in the offer.

* [RFC4145]で指定されている「A =セットアップ」行、セクション4、[RFC5763]のDTLS-SRTPシナリオで使用するために明確にされた。オファーに「ActPass」値が含まれている場合、JSEPエンドポイントの場合は常にそうであるように、回答者は「アクティブ」ロールを使用する必要があります。非JSEPエンドポイントからのオファーは、「a = setup」の他の値を送信する場合があります。その場合、答えはオファーの値と一致する値を使用する必要があります。

* An "a=tls-id" line, as specified in [RFC8842], Section 5.3.

* [RFC8842]で指定されている「A = TLS-ID」行、セクション5.3。

* If present in the offer, an "a=rtcp-mux" line, as specified in [RFC5761], Section 5.1.3. Otherwise, an "a=rtcp" line, as specified in [RFC3605], Section 2.1, containing the default value "9 IN IP4 0.0.0.0" (because no candidates have yet been gathered).

* オファーに存在する場合、[rfc5761]で指定されている「a = rtcp-mux」行、セクション5.1.3。それ以外の場合は、[RFC3605]で指定されている「a = rtcp」行、セクション2.1、デフォルト値「9」を含むセクション2.1(候補者はまだ収集されていないため)。

* If present in the offer, an "a=rtcp-rsize" line, as specified in [RFC5506], Section 5.

* オファーに存在する場合、[RFC5506]で指定されている「a = rtcp-rsize」線、セクション5。

If a data channel "m=" section has been offered, an "m=" section MUST also be generated for data. The <media> field MUST be set to "application", and the <proto> and <fmt> fields MUST be set to exactly match the fields in the offer.

データチャネル「m =」セクションが提供されている場合、データに対して「m =」セクションも生成する必要があります。<media>フィールドは「アプリケーション」に設定する必要があり、<proto>および<fmt>フィールドは、オファーのフィールドと正確に一致するように設定する必要があります。

Within the data "m=" section, an "a=mid" line MUST be generated and included as described above, along with an "a=sctp-port" line referencing the SCTP port number, as defined in [RFC8841], Section 5.1; and, if appropriate, an "a=max-message-size" line, as defined in [RFC8841], Section 6.1.

データ "m ="セクション内で、[rfc8841]で定義されているように、sctpポート番号を参照する「a = sctp-ポート」行とともに、上記のように「a = mid」行を生成して含める必要があります。5.1;必要に応じて、[rfc8841]で定義されている「a = max-message-size」線、セクション6.1。

As discussed above, the following attributes of category IDENTICAL or TRANSPORT are included only if the data "m=" section is not bundled into another "m=" section:

上記で説明したように、データ「m =」セクションが別の「m =」セクションにバンドルされていない場合にのみ、同一またはトランスポートのカテゴリの次の属性が含まれています。

* "a=ice-ufrag"

* 「a = ice-ufrag」

* "a=ice-pwd"

* 「a = ice-pwd」

* "a=fingerprint"

* 「A =指紋」

* "a=setup"

* 「A =セットアップ」

* "a=tls-id"

* 「a = tls-id」

Note that if media "m=" sections are bundled into a data "m=" section, then certain TRANSPORT and IDENTICAL attributes may also appear in the data "m=" section even if they would otherwise only be appropriate for a media "m=" section (e.g., "a=rtcp-mux").

メディア「m =」セクションがデータ「m = "セクションにバンドルされている場合、特定のトランスポートと同一の属性がデータに表示される場合があります。= "セクション(例:" a = rtcp-mux ")。

If "a=group" attributes with semantics "BUNDLE" are offered, corresponding session-level "a=group" attributes MUST be added as specified in [RFC5888]. These attributes MUST have semantics "BUNDLE" and MUST include all MID identifiers from the offered bundle groups that have not been rejected. Note that regardless of the presence of "a=bundle-only" in the offer, all "m=" sections in the answer MUST NOT have an "a=bundle-only" line.

「a = group」属性を持つ「バンドル」属性が提供される場合、[RFC5888]で指定されているように、対応するセッションレベルの「A =グループ」属性を追加する必要があります。これらの属性にはセマンティクス「バンドル」が必要であり、拒否されていない提供されていないバンドルグループのすべての中間識別子を含める必要があります。オファーに「a = bundleのみ」の存在に関係なく、回答のすべての「m =」セクションには「a = bundleのみ」行がないことに注意してください。

Attributes that are common between all "m=" sections MAY be moved to the session level if explicitly defined to be valid at the session level.

すべての「m =」セクションの間で一般的な属性は、セッションレベルで有効であると明示的に定義されている場合、セッションレベルに移動できます。

The attributes prohibited in the creation of offers are also prohibited in the creation of answers.

オファーの作成に禁止されている属性も、回答の作成では禁止されています。

5.3.2. Subsequent Answers
5.3.2. 後続の回答

When createAnswer is called a second (or later) time or is called after a local description has already been installed, the processing is somewhat different than for an initial answer.

CreateAnswerが2回目(またはそれ以降の)と呼ばれる場合、またはローカル説明が既にインストールされている後に呼び出される場合、処理は最初の回答とは多少異なります。

If the previous answer was not applied using setLocalDescription, meaning the PeerConnection is still in the "have-remote-offer" state, the steps for generating an initial answer MUST be followed, subject to the following restriction:

以前の回答がsetlocaldescriptionを使用して適用されなかった場合、ピーエルコネクションがまだ「remoteofotofolofolof」状態にあることを意味する場合、以下の制限を条件として、最初の回答を生成する手順に従う必要があります。

* The fields of the "o=" line MUST stay the same except for the <session-version> field, which MUST increment if the session description changes in any way from the previously generated answer.

* 「o =」行のフィールドは、<session-version>フィールドを除いて同じままでなければなりません。これは、セッションの説明が以前に生成された回答から何らかの方法で変更された場合に増分する必要があります。

If any session description was previously supplied to setLocalDescription, an answer is generated by following the steps in the "have-remote-offer" state above, along with these exceptions:

セッションの説明が以前にsetlocaldescriptionに提供された場合、これらの例外とともに、上記の「remoteofofotofofofof」状態のステップに従うことにより、回答が生成されます。

* The "s=" and "t=" lines MUST stay the same.

* 「s =」と「t =」行は同じままでなければなりません。

* Each "m=" and "c=" line MUST be filled in with the port and address of the default candidate for the "m=" section, as described in [RFC8839], Section 4.2.1.2. Note that in certain cases, the "m=" line protocol may not match that of the default candidate, because the "m=" line protocol value MUST match what was supplied in the offer, as described above.

* [RFC8839]、セクション4.2.1.2に記載されているように、各「M =」および「C =」行は、「M =」セクションのデフォルト候補のポートとアドレスを記入する必要があります。特定の場合、「M =」ラインプロトコルは、「M =」ラインプロトコル値は、上記のように、オファーで提供されたものと一致する必要があるため、「M =」ラインプロトコルはデフォルト候補のプロトコルと一致しない可能性があることに注意してください。

* Each "a=ice-ufrag" and "a=ice-pwd" line MUST stay the same, unless the "m=" section is restarting, in which case new ICE credentials MUST be created as specified in [RFC8839], Section 4.4.1.1.1. If the "m=" section is bundled into another "m=" section, it still MUST NOT contain any ICE credentials.

* 各「a = ice-ufrag」および「a = ice-pwd」行は同じままでなければなりません。「m =」セクションが再起動しない限り、[RFC8839]、セクション4.4で指定されているように、新しいアイス資格情報を作成する必要があります。.1.1.1。「m =」セクションが別の「m =」セクションにバンドルされている場合、氷の資格情報を含めてはなりません。

* Each "a=tls-id" line MUST stay the same, unless the offerer's "a=tls-id" line changed, in which case a new tls-id value MUST be created, as described in [RFC8842], Section 5.2.

* [A = TLS-ID]行は、[RFC8842]、セクション5.2に記載されているように、提供者の「A = TLS-ID」行が変更されない限り、[A = TLS-ID]行が変更されない限り、同じままでなければなりません。

* Each "a=setup" line MUST use an "active" or "passive" role value consistent with the existing DTLS association, if the association is being continued by the offerer.

* 各「A =セットアップ」行は、協会が提供者によって継続されている場合、既存のDTLS協会と一致する「アクティブ」または「パッシブ」ロール値を使用する必要があります。

* RTCP multiplexing MUST be used, and an "a=rtcp-mux" line inserted if and only if the "m=" section previously used RTCP multiplexing.

* RTCPマルチプレックスを使用する必要があり、「m =」セクションが以前にRTCP多重化を使用していた場合にのみ、「a = rtcp-mux」ラインを挿入する必要があります。

* If the "m=" section is not bundled into another "m=" section and RTCP multiplexing is not active, an "a=rtcp" attribute line MUST be filled in with the port and address of the default RTCP candidate. If no RTCP candidates have yet been gathered, default values MUST be used, as described in Section 5.3.1 above.

* 「m =」セクションが別の「m =」セクションにバンドルされていない場合、RTCP多重化がアクティブではない場合、「a = rtcp」属性ラインは、デフォルトのRTCP候補のポートとアドレスで記入する必要があります。上記のセクション5.3.1で説明されているように、RTCP候補がまだ収集されていない場合は、デフォルト値を使用する必要があります。

* If the "m=" section is not bundled into another "m=" section, for each candidate that has been gathered during the most recent gathering phase (see Section 3.5.1), an "a=candidate" line MUST be added, as defined in [RFC8839], Section 5.1. If candidate gathering for the section has completed, an "a=end-of-candidates" attribute MUST be added, as described in [RFC8840], Section 8.2. If the "m=" section is bundled into another "m=" section, both "a=candidate" and "a=end-of-candidates" MUST be omitted.

* 「m =」セクションが別の「m =」セクションにバンドルされていない場合、最新の収集段階で収集された各候補(セクション3.5.1を参照)、「a =候補」行を追加する必要があります。[RFC8839]で定義されているように、セクション5.1。[RFC8840]、セクション8.2に記載されているように、セクションの候補者の収集が完了した場合、「a = condididates」属性を追加する必要があります。「m =」セクションが別の「m =」セクションにバンドルされている場合、「a =候補」と「a =キャンディデートの終了」の両方を省略する必要があります。

* For RtpTransceivers that are not stopped, the "a=msid" line(s) MUST stay the same, regardless of changes to the transceiver's direction or track. If no "a=msid" line is present in the current description, "a=msid" line(s) MUST be generated according to the same rules as for an initial answer.

* 停止しないrtptransceiverの場合、「a = msid」行は、トランシーバーの方向またはトラックの変更に関係なく、同じままでなければなりません。現在の説明に「a = msid」行が存在しない場合、「a = msid」行は、最初の回答と同じルールに従って生成する必要があります。

5.3.3. Options Handling
5.3.3. オプション処理

The createAnswer method takes as a parameter an RTCAnswerOptions object. The set of parameters for RTCAnswerOptions is different than those supported in RTCOfferOptions; the IceRestart option is unnecessary, as ICE credentials will automatically be changed for all "m=" sections where the offerer chose to perform ICE restart.

CreateAnswerメソッドは、パラメーターとしてrtcansweroptionsオブジェクトを取ります。rtcansweroptionsのパラメーターのセットは、rtcofferoptionsでサポートされているパラメーターとは異なります。ICERESTARTオプションは不要です。アイスクレデンシャルは、オファーがアイスの再起動を実行することを選択したすべての「m =」セクションに対して自動的に変更されるためです。

The following option is supported in RTCAnswerOptions.

次のオプションは、rtcansweroptionsでサポートされています。

5.3.3.1. VoiceActivityDetection
5.3.3.1. voiceactivitydetection

Silence suppression in the answer is handled as described in Section 5.2.3.2, with one exception: if support for silence suppression was not indicated in the offer, the VoiceActivityDetection parameter has no effect, and the answer MUST be generated as if VoiceActivityDetection was set to "false". This is done on a per-codec basis (e.g., if the offerer somehow offered support for CN but set "usedtx=0" for Opus, setting VoiceActivityDetection to "true" would result in an answer with "CN" codecs and "usedtx=0"). The impact of this rule is that an answerer will not try to use silence suppression with any endpoint that does not offer it, making silence suppression support bilateral even with non-JSEP endpoints.

回答の沈黙抑制は、セクション5.2.3.2で説明されているように処理されます。1つの例外を除きます。沈黙抑制のサポートがオファーに示されていない場合、voiceactivitydetectionパラメーターは効果がなく、回答はvoiceactivitydetectionがに設定されているかのように生成する必要があります。"間違い"。これは、CODECごとに行われます(たとえば、オファーが何らかの形でCNのサポートを提供したが、OPUSの「usedtx = 0」を設定した場合、voiceactivitydetectionを「true」に設定すると、「cn」コーデックと「usedtx = sudetx =0 ")。このルールの影響は、応答者がそれを提供しないエンドポイントで沈黙抑制を使用しようとしないことです。

5.4. Modifying an Offer or Answer
5.4. 申し出や回答の変更

The SDP returned from createOffer or createAnswer MUST NOT be changed before passing it to setLocalDescription. If precise control over the SDP is needed, the aforementioned createOffer/createAnswer options or RtpTransceiver APIs MUST be used.

createofferまたはcreateanswerから返されたSDPは、setlocaldescriptionに渡す前に変更してはなりません。SDPを正確に制御する必要がある場合、前述のCreateOffer/CreateAnswerオプションまたはRTPTransceiver APIを使用する必要があります。

After calling setLocalDescription with an offer or answer, the application MAY modify the SDP to reduce its capabilities before sending it to the far side, as long as it follows the rules above that define a valid JSEP offer or answer. Likewise, an application that has received an offer or answer from a peer MAY modify the received SDP, subject to the same constraints, before calling setRemoteDescription.

SetlocalDescriptionをオファーまたは回答で呼び出した後、アプリケーションは、有効なJSEPのオファーまたは回答を定義する上記のルールに従っている限り、SDPを遠くに送信する前にその機能を減らすためにSDPを変更する場合があります。同様に、ピアからオファーまたは回答を受け取ったアプリケーションは、setRemotedscriptionを呼び出す前に、同じ制約を条件として、受信したSDPを変更する場合があります。

As always, the application is solely responsible for what it sends to the other party, and all incoming SDP will be processed by the JSEP implementation to the extent of its capabilities. It is an error to assume that all SDP is well formed; however, one should be able to assume that any implementation of this specification will be able to process, as a remote offer or answer, unmodified SDP coming from any other implementation of this specification.

いつものように、アプリケーションは他者に送信するものに対して単独で責任を負い、すべての着信SDPはJSEPの実装によってその機能の範囲で処理されます。すべてのSDPが適切に形成されていると仮定するのはエラーです。ただし、この仕様の実装は、リモートオファーまたは回答として、この仕様の他の実装から提供されていないSDPを処理できると想定できるはずです。

5.5. Processing a Local Description
5.5. ローカル説明の処理

When a SessionDescription is supplied to setLocalDescription, the following steps MUST be performed:

SetlocalDescriptionにSessionDescriptionが提供される場合、次の手順を実行する必要があります。

* If the description is of type "rollback", follow the processing defined in Section 5.7 and skip the processing described in the rest of this section.

* 説明が「ロールバック」のタイプの場合、セクション5.7で定義されている処理に従い、このセクションの残りの部分で説明した処理をスキップします。

* Otherwise, the type of the SessionDescription is checked against the current state of the PeerConnection:

* それ以外の場合、sessiondesscriptionのタイプは、ピーコネクションの現在の状態に対してチェックされます。

- If the type is "offer", the PeerConnection state MUST be either "stable" or "have-local-offer".

- タイプが「オファー」の場合、ピーロネクションの状態は「安定」または「localferfer」のいずれかでなければなりません。

- If the type is "pranswer" or "answer", the PeerConnection state MUST be either "have-remote-offer" or "have-local-pranswer".

- タイプが「プランワー」または「回答」の場合、ピーエルクネクション状態は「remoteofofofofofof」または「have-local-pranswer」のいずれかでなければなりません。

* If the type is not correct for the current state, processing MUST stop and an error MUST be returned.

* 現在の状態のタイプが正しくない場合は、処理を停止する必要があり、エラーを返す必要があります。

* The SessionDescription is then checked to ensure that its contents are identical to those generated in the last call to createOffer/ createAnswer, and thus have not been altered, as discussed in Section 5.4; otherwise, processing MUST stop and an error MUST be returned.

* 次に、セッション説明をチェックして、セクション5.4で説明したように、CreateOffer/ CreateAnswerの最後の呼び出しで生成されたものと同一であることを確認します。それ以外の場合、処理は停止する必要があり、エラーを返す必要があります。

* Next, the SessionDescription is parsed into a data structure, as described in Section 5.8 below.

* 次に、以下のセクション5.8で説明されているように、SessionDescriptionはデータ構造に解析されます。

* Finally, the parsed SessionDescription is applied as described in Section 5.9 below.

* 最後に、以下のセクション5.9で説明されているように、解析されたセッション説明が適用されます。

5.6. Processing a Remote Description
5.6. リモート説明の処理

When a SessionDescription is supplied to setRemoteDescription, the following steps MUST be performed:

SetsRemoteDesscriptionにSessionDescriptionが提供される場合、次の手順を実行する必要があります。

* If the description is of type "rollback", follow the processing defined in Section 5.7 and skip the processing described in the rest of this section.

* 説明が「ロールバック」のタイプの場合、セクション5.7で定義されている処理に従い、このセクションの残りの部分で説明した処理をスキップします。

* Otherwise, the type of the SessionDescription is checked against the current state of the PeerConnection:

* それ以外の場合、sessiondesscriptionのタイプは、ピーコネクションの現在の状態に対してチェックされます。

- If the type is "offer", the PeerConnection state MUST be either "stable" or "have-remote-offer".

- タイプが「オファー」の場合、ピーロネクション状態は「安定」または「リモートオブファー」のいずれかでなければなりません。

- If the type is "pranswer" or "answer", the PeerConnection state MUST be either "have-local-offer" or "have-remote-pranswer".

- タイプが「プランザー」または「回答」の場合、ピーコネクション状態は「localferoffer」または「remote-pranswer」のいずれかでなければなりません。

* If the type is not correct for the current state, processing MUST stop and an error MUST be returned.

* 現在の状態のタイプが正しくない場合は、処理を停止する必要があり、エラーを返す必要があります。

* Next, the SessionDescription is parsed into a data structure, as described in Section 5.8 below. If parsing fails for any reason, processing MUST stop and an error MUST be returned.

* 次に、以下のセクション5.8で説明されているように、SessionDescriptionはデータ構造に解析されます。何らかの理由で解析が失敗した場合、処理は停止する必要があり、エラーを返す必要があります。

* Finally, the parsed SessionDescription is applied as described in Section 5.10 below.

* 最後に、以下のセクション5.10で説明されているように、解析されたセッション説明が適用されます。

5.7. Processing a Rollback
5.7. ロールバックの処理

A rollback may be performed if the PeerConnection is in any state except for "stable". This means that both offers and provisional answers can be rolled back. Rollback can only be used to cancel proposed changes; there is no support for rolling back from a "stable" state to a previous "stable" state. If a rollback is attempted in the "stable" state, processing MUST stop and an error MUST be returned. Note that this implies that once the answerer has performed setLocalDescription with its answer, this cannot be rolled back.

「安定」を除くピーロネクションがどの状態にある場合は、ロールバックを実行できます。これは、オファーと暫定的な回答の両方がロールバックできることを意味します。ロールバックは、提案された変更をキャンセルするためにのみ使用できます。「安定した」状態から以前の「安定した」状態へのロールバックに対するサポートはありません。「安定した」状態でロールバックが試行された場合、処理が停止し、エラーを返す必要があります。これは、回答者がその回答でsetlocaldescriptionを実行すると、これをロールバックできないことを意味することに注意してください。

The effect of rollback MUST be the same regardless of whether setLocalDescription or setRemoteDescription is called.

ロールバックの効果は、setlocaldescriptionまたはsetRemotedescriptionが呼び出されても同じでなければなりません。

In order to process rollback, a JSEP implementation abandons the current offer/answer transaction, sets the signaling state to "stable", and sets the pending local and/or remote description (see Sections 4.1.14 and 4.1.16) to null. Any resources or candidates that were allocated by the abandoned local description are discarded; any media that is received is processed according to the previous local and remote descriptions.

ロールバックを処理するために、JSEPの実装は現在のオファー/回答トランザクションを廃止し、シグナリング状態を「安定」に設定し、保留中のローカルおよび/またはリモートの説明を設定します(セクション4.1.14および4.1.16を参照)。放棄されたローカル説明によって割り当てられたリソースまたは候補者は廃棄されます。受信されたメディアは、以前のローカルおよびリモートの説明に従って処理されます。

A rollback disassociates any RtpTransceivers that were associated with "m=" sections by the application of the rolled-back session description (see Sections 5.10 and 5.9). This means that some RtpTransceivers that were previously associated will no longer be associated with any "m=" section; in such cases, the value of the RtpTransceiver's mid property MUST be set to null, and the mapping between the transceiver and its "m=" section index MUST be discarded. RtpTransceivers that were created by applying a remote offer that was subsequently rolled back MUST be stopped and removed from the PeerConnection. However, an RtpTransceiver MUST NOT be removed if a track was attached to the RtpTransceiver via the addTrack method. This is so that an application may call addTrack, then call setRemoteDescription with an offer, then roll back that offer, then call createOffer and have an "m=" section for the added track appear in the generated offer.

ロールバックは、ロールバックセッションの説明を適用することにより、「m =」セクションに関連付けられたrtptransceiverを分離します(セクション5.10および5.9を参照)。これは、以前に関連付けられていた一部のrtptransceiverが「m =」セクションに関連付けられなくなることを意味します。このような場合、rtptransceiverの中間プロパティの値はnullに設定する必要があり、トランシーバーとその「m =」セクションインデックスの間のマッピングを破棄する必要があります。その後ロールバックされたリモートオファーを適用することによって作成されたrtptransceiversは、停止して覗き込んで削除する必要があります。ただし、AddTrackメソッドを介してトラックがrtptransceiverに接続されている場合、rtptransceiverを削除しないでください。これは、アプリケーションがAddTrackを呼び出してから、オファーでSetRemotedEdscriptionを呼び出してから、そのオファーをロールバックし、CreateOfferを呼び出して、生成されたオファーに追加されたトラックの「M =」セクションを作成します。

5.8. Parsing a Session Description
5.8. セッションの説明を解析します

The SDP contained in the session description object consists of a sequence of text lines, each containing a key-value expression, as described in [RFC4566], Section 5. The SDP is read, line by line, and converted to a data structure that contains the deserialized information. However, SDP allows many types of lines, not all of which are relevant to JSEP applications. For each line, the implementation will first ensure that it is syntactically correct according to its defining ABNF, check that it conforms to the semantics used in [RFC4566] and [RFC3264], and then either parse and store or discard the provided value, as described below.

セッション説明オブジェクトに含まれるSDPは、[RFC4566]、セクション5に記載されているキー価値式を含む一連のテキスト行で構成されています。SDPは、線ごとに読み取り、行ごとに変換され、脱色情報が含まれています。ただし、SDPでは、すべてがJSEPアプリケーションに関連しているわけではなく、多くの種類のラインを許可します。各ラインについて、実装はまず、定義するABNFに従って構文的に正しいことを保証し、[RFC4566]および[RFC3264]で使用されているセマンティクスに適合し、次に提供された値を解析および保存または破棄します。以下で説明します。

If any line is not well formed or cannot be parsed as described, the parser MUST stop with an error and reject the session description, even if the value is to be discarded. This ensures that implementations do not accidentally misinterpret ambiguous SDP.

記載されているように、いずれかの行が十分に形成されていないか、解析できない場合、パーサーは、値を破棄する場合でも、エラーで停止し、セッションの説明を拒否する必要があります。これにより、実装があいまいなSDPを誤って誤解しないようにします。

5.8.1. Session-Level Parsing
5.8.1. セッションレベルの解析

First, the session-level lines are checked and parsed. These lines MUST occur in a specific order, and with a specific syntax, as defined in [RFC4566], Section 5. Note that while the specific line types (e.g., "v=", "c=") MUST occur in the defined order, lines of the same type (typically "a=") can occur in any order.

まず、セッションレベルの行がチェックされ、解析されます。これらの行は、[RFC4566]で定義されている特定の順序で、特定の構文で発生する必要があります。注文、同じタイプの行(通常は「a =」)は任意の順序で発生する可能性があります。

The following non-attribute lines are not meaningful in the JSEP context and MAY be discarded once they have been checked.

次の非aTtributeラインは、JSEPコンテキストでは意味がなく、チェックされると破棄される場合があります。

* The "c=" line MUST be checked for syntax, but its value is only used for ICE mismatch detection, as defined in [RFC8445], Section 5.4. Note that JSEP implementations should never encounter this condition because ICE is required for WebRTC.

* 「c =」行は構文をチェックする必要がありますが、その値は[RFC8445]、セクション5.4で定義されているように、氷の不一致の検出にのみ使用されます。WeBRTCには氷が必要であるため、JSEPの実装はこの状態に遭遇しないでください。

* The "i=", "u=", "e=", "p=", "t=", "r=", "z=", and "k=" lines MUST be checked for syntax, but their values are not otherwise used.

* "i ="、 "u ="、 "e ="、 "p ="、 "t ="、 "r ="、 "z ="、および "k ="行は構文をチェックする必要がありますが、それ以外の場合は、値は使用されません。

The remaining non-attribute lines are processed as follows:

残りの非aTtributeラインは次のように処理されます。

* The "v=" line MUST have a version of 0, as specified in [RFC4566], Section 5.1.

* 「v =」行には、[RFC4566]で指定されているように、セクション5.1で指定されている0のバージョンが必要です。

* The "o=" line MUST be parsed as specified in [RFC4566], Section 5.2.

* [o =]線は、[RFC4566]、セクション5.2で指定されているように解析する必要があります。

* The "b=" line, if present, MUST be parsed as specified in [RFC4566], Section 5.8, and the bwtype and bandwidth values stored.

* 「b =」行は、存在する場合は、[rfc4566]、セクション5.8、およびbwtypeおよび帯域幅の値で指定されているように解析する必要があります。

Finally, the attribute lines are processed. Specific processing MUST be applied for the following session-level attribute ("a=") lines:

最後に、属性行が処理されます。次のセッションレベル属性( "a =")行に特定の処理を適用する必要があります。

* Any "a=group" lines are parsed as specified in [RFC5888], Section 5, and the group's semantics and MID values are stored.

* 「a = group」行は[RFC5888]、セクション5で指定されているように解析され、グループのセマンティクスとミッド値は保存されます。

* If present, a single "a=ice-lite" line is parsed as specified in [RFC8839], Section 5.3, and a value indicating the presence of an "a=ice-lite" line is stored.

* 存在する場合、単一の「a =アイスライト」線が[RFC8839]で指定されているように解析され、セクション5.3、および「a = ice-lite」ラインの存在を示す値が保存されます。

* If present, a single "a=ice-ufrag" line is parsed as specified in [RFC8839], Section 5.4, and the ufrag value is stored.

* 存在する場合、単一の「a = ice-ufrag」ラインは[RFC8839]で指定されているように解析され、セクション5.4、UFRAG値が保存されます。

* If present, a single "a=ice-pwd" line is parsed as specified in [RFC8839], Section 5.4, and the password value is stored.

* 存在する場合、単一の「A = ICE-PWD」ラインは[RFC8839]、セクション5.4で指定されているように解析され、パスワード値が保存されます。

* If present, a single "a=ice-options" line is parsed as specified in [RFC8839], Section 5.6, and the set of specified options is stored.

* 存在する場合、単一の「a = ice-options」行は[rfc8839]で指定されているように解析され、セクション5.6、指定されたオプションのセットが保存されます。

* Any "a=fingerprint" lines are parsed as specified in [RFC8122], Section 5, and the set of fingerprint and algorithm values is stored.

* 「a =指紋」行は、[RFC8122]、セクション5で指定されているように解析され、指紋とアルゴリズムの値のセットが保存されます。

* If present, a single "a=setup" line is parsed as specified in [RFC4145], Section 4, and the setup value is stored.

* 存在する場合、単一の「a = setup」行は[rfc4145]で指定されているように解析され、セクション4、セットアップ値が保存されます。

* If present, a single "a=tls-id" line is parsed as specified in [RFC8842], Section 5, and the attribute value is stored.

* 存在する場合、単一の「a = tls-id」行は[rfc8842]で指定されているように解析され、セクション5、属性値が保存されます。

* Any "a=identity" lines are parsed and the identity values stored for subsequent verification, as specified in [RFC8827], Section 5.

* [A = ID]行は解析され、[RFC8827]で指定されているように、セクション5で指定されているように、その後の検証のためにID値が保存されます。

* Any "a=extmap" lines are parsed as specified in [RFC5285], Section 5, and their values are stored.

* 「a = extmap」行は、[rfc5285]、セクション5で指定されているように解析され、その値は保存されます。

Other attributes that are not relevant to JSEP may also be present, and implementations SHOULD process any that they recognize. As required by [RFC4566], Section 5.13, unknown attribute lines MUST be ignored.

JSEPに関連しない他の属性も存在する可能性があり、実装は認識されるものを処理する必要があります。[RFC4566]、セクション5.13、未知の属性行は無視する必要があります。

Once all the session-level lines have been parsed, processing continues with the lines in "m=" sections.

すべてのセッションレベルの行が解析されると、「m =」セクションのラインで処理が続きます。

5.8.2. Media Section Parsing
5.8.2. メディアセクション解析

Like the session-level lines, the media section lines MUST occur in the specific order and with the specific syntax defined in [RFC4566], Section 5.

セッションレベルの行と同様に、メディアセクションの行は特定の順序で、[RFC4566]、セクション5で定義されている特定の構文で発生する必要があります。

The "m=" line itself MUST be parsed as described in [RFC4566], Section 5.14, and the <media>, <port>, <proto>, and <fmt> values stored.

[M =]ライン自体は、[RFC4566]、セクション5.14、および<media>、<port>、<proto>、および<fmt>値に記載されているように解析する必要があります。

Following the "m=" line, specific processing MUST be applied for the following non-attribute lines:

「m =」行に続いて、次の非属性行に特定の処理を適用する必要があります。

* As with the "c=" line at the session level, the "c=" line MUST be parsed according to [RFC4566], Section 5.7, but its value is not used.

* セッションレベルの「c =」行と同様に、「c =」行は[RFC4566]、セクション5.7に従って解析する必要がありますが、その値は使用されません。

* The "b=" line, if present, MUST be parsed as specified in [RFC4566], Section 5.8, and the bwtype and bandwidth values stored.

* 「b =」行は、存在する場合は、[rfc4566]、セクション5.8、およびbwtypeおよび帯域幅の値で指定されているように解析する必要があります。

Specific processing MUST also be applied for the following attribute lines:

次の属性行にも特定の処理を適用する必要があります。

* If present, a single "a=ice-ufrag" line is parsed as specified in [RFC8839], Section 5.4, and the ufrag value is stored.

* 存在する場合、単一の「a = ice-ufrag」ラインは[RFC8839]で指定されているように解析され、セクション5.4、UFRAG値が保存されます。

* If present, a single "a=ice-pwd" line is parsed as specified in [RFC8839], Section 5.4, and the password value is stored.

* 存在する場合、単一の「A = ICE-PWD」ラインは[RFC8839]、セクション5.4で指定されているように解析され、パスワード値が保存されます。

* If present, a single "a=ice-options" line is parsed as specified in [RFC8839], Section 5.6, and the set of specified options is stored.

* 存在する場合、単一の「a = ice-options」行は[rfc8839]で指定されているように解析され、セクション5.6、指定されたオプションのセットが保存されます。

* Any "a=candidate" attributes MUST be parsed as specified in [RFC8839], Section 5.1, and their values stored.

* [A =候補]属性は、[RFC8839]、セクション5.1、およびその値で指定されているように解析する必要があります。

* Any "a=remote-candidates" attributes MUST be parsed as specified in [RFC8839], Section 5.2, but their values are ignored.

* [a = remote-candidates]属性は、[rfc8839]、セクション5.2で指定されているように解析する必要がありますが、その値は無視されます。

* If present, a single "a=end-of-candidates" attribute MUST be parsed as specified in [RFC8840], Section 8.1, and its presence or absence flagged and stored.

* 存在する場合、単一の「a = condidates」属性は、[RFC8840]、セクション8.1で指定されているように解析する必要があります。

* Any "a=fingerprint" lines are parsed as specified in [RFC8122], Section 5, and the set of fingerprint and algorithm values is stored.

* 「a =指紋」行は、[RFC8122]、セクション5で指定されているように解析され、指紋とアルゴリズムの値のセットが保存されます。

If the "m=" <proto> value indicates use of RTP, as described in Section 5.1.2 above, the following attribute lines MUST be processed:

上記のセクション5.1.2で説明されているように、「m =」<proto>値がRTPの使用を示している場合、次の属性行を処理する必要があります。

* The "m=" <fmt> value MUST be parsed as specified in [RFC4566], Section 5.14, and the individual values stored.

* 「m = "<fmt>値は、[RFC4566]、セクション5.14、および格納されている個々の値で指定されているように解析する必要があります。

* Any "a=rtpmap" or "a=fmtp" lines MUST be parsed as specified in [RFC4566], Section 6, and their values stored.

* 「a = rtpmap」または「a = fmtp」行は、[rfc4566]、セクション6で指定されているように解析する必要があります。

* If present, a single "a=ptime" line MUST be parsed as described in [RFC4566], Section 6, and its value stored.

* 存在する場合、[rfc4566]、セクション6、およびその値に記載されているように、単一の「a = ptime」行を解析する必要があります。

* If present, a single "a=maxptime" line MUST be parsed as described in [RFC4566], Section 6, and its value stored.

* 存在する場合、[RFC4566]、セクション6、およびその値に記載されているように、単一の「a = maxptime」行を解析する必要があります。

* If present, a single direction attribute line (e.g., "a=sendrecv") MUST be parsed as described in [RFC4566], Section 6, and its value stored.

* 存在する場合、[RFC4566]、セクション6、およびその値に記載されているように、単一の方向属性線( "a = sendrecv")を解析する必要があります。

* Any "a=ssrc" attributes MUST be parsed as specified in [RFC5576], Section 4.1, and their values stored.

* [A = SSRC]属性は、[RFC5576]、セクション4.1、およびそれらの値で指定されているように解析する必要があります。

* Any "a=extmap" attributes MUST be parsed as specified in [RFC5285], Section 5, and their values stored.

* [a = extmap]属性は、[rfc5285]、セクション5、およびそれらの値で指定されているように解析する必要があります。

* Any "a=rtcp-fb" attributes MUST be parsed as specified in [RFC4585], Section 4.2, and their values stored.

* [a = rtcp-fb]属性は、[rfc4585]、セクション4.2、およびそれらの値で指定されているように解析する必要があります。

* If present, a single "a=rtcp-mux" attribute MUST be parsed as specified in [RFC5761], Section 5.1.3, and its presence or absence flagged and stored.

* 存在する場合、単一の「a = rtcp-mux」属性は、[rfc5761]、セクション5.1.3で指定されているように解析する必要があります。

* If present, a single "a=rtcp-mux-only" attribute MUST be parsed as specified in [RFC8858], Section 3, and its presence or absence flagged and stored.

* 存在する場合、単一の「a = rtcp-muxのみ」属性を[rfc8858]、セクション3で指定し、その存在または不在がフラグを立てて保存するように解析する必要があります。

* If present, a single "a=rtcp-rsize" attribute MUST be parsed as specified in [RFC5506], Section 5, and its presence or absence flagged and stored.

* 存在する場合、単一の「a = rtcp-rsize」属性は、[RFC5506]、セクション5で指定されているように解析する必要があります。

* If present, a single "a=rtcp" attribute MUST be parsed as specified in [RFC3605], Section 2.1, but its value is ignored, as this information is superfluous when using ICE.

* 存在する場合、単一の「a = rtcp」属性は[rfc3605]、セクション2.1で指定されているように解析する必要がありますが、この情報はICEを使用する場合には不要であるため、その値は無視されます。

* If present, "a=msid" attributes MUST be parsed as specified in [RFC8830], Section 3.2, and their values stored, ignoring any "appdata" field. If no "a=msid" attributes are present, a random msid-id value is generated for a "default" MediaStream for the session, if not already present, and this value is stored.

* 存在する場合、[rfc8830]、セクション3.2で指定されているように「a = msid」属性を解析する必要があり、その値は「appdata」フィールドを無視して保存されます。「A = MSID」属性が存在しない場合、セッションの「デフォルト」MediaStreamに対してランダムなMSID-ID値が生成され、まだ存在していない場合、この値は保存されます。

* Any "a=imageattr" attributes MUST be parsed as specified in [RFC6236], Section 3, and their values stored.

* [A = ImageAttr]属性は、[RFC6236]、セクション3、およびその値で指定されているように解析する必要があります。

* Any "a=rid" lines MUST be parsed as specified in [RFC8851], Section 10, and their values stored.

* [a = red]線は、[rfc8851]、セクション10で指定されているように解析する必要があり、その値は保存されます。

* If present, a single "a=simulcast" line MUST be parsed as specified in [RFC8853], and its values stored.

* 存在する場合、単一の「A = Simulcast」行は[RFC8853]で指定されているように解析する必要があり、その値は保存されます。

Otherwise, if the "m=" <proto> value indicates use of SCTP, the following attribute lines MUST be processed:

それ以外の場合、「m =」<proto>値がSCTPの使用を示している場合、次の属性行を処理する必要があります。

* The "m=" <fmt> value MUST be parsed as specified in [RFC8841], Section 4.3, and the application protocol value stored.

* [M = "<FMT>値は、[RFC8841]、セクション4.3、およびアプリケーションプロトコル値で指定されているように解析する必要があります。

* An "a=sctp-port" attribute MUST be present, and it MUST be parsed as specified in [RFC8841], Section 5.2, and the value stored.

* 「a = sctp-port」属性が存在する必要があり、[rfc8841]、セクション5.2、および保存された値で指定されているように解析する必要があります。

* If present, a single "a=max-message-size" attribute MUST be parsed as specified in [RFC8841], Section 6, and the value stored. Otherwise, use the specified default.

* 存在する場合、単一の「a = max-message-size」属性は、[RFC8841]、セクション6、および保存された値で指定されているように解析する必要があります。それ以外の場合は、指定されたデフォルトを使用します。

Other attributes that are not relevant to JSEP may also be present, and implementations SHOULD process any that they recognize. As required by [RFC4566], Section 5.13, unknown attribute lines MUST be ignored.

JSEPに関連しない他の属性も存在する可能性があり、実装は認識されるものを処理する必要があります。[RFC4566]、セクション5.13、未知の属性行は無視する必要があります。

5.8.3. Semantics Verification
5.8.3. セマンティクス検証

Assuming that parsing completes successfully, the parsed description is then evaluated to ensure internal consistency as well as proper support for mandatory features. Specifically, the following checks are performed:

解析が正常に完了すると仮定すると、解析された説明が評価され、内部の一貫性と必須機能の適切なサポートを確保します。具体的には、次のチェックが実行されます。

* For each "m=" section, valid values for each of the mandatory-to-use features enumerated in Section 5.1.1 MUST be present. These values MAY be either present at the media level or inherited from the session level.

* 各「m =」セクションについて、セクション5.1.1で列挙されている必須の各機能の有効な値が存在する必要があります。これらの値は、メディアレベルに存在するか、セッションレベルから継承される場合があります。

- ICE ufrag and password values, which MUST comply with the size limits specified in [RFC8839], Section 5.4.

- ICE UFRAGおよびパスワード値。[RFC8839]で指定されたサイズ制限、セクション5.4に準拠する必要があります。

- A tls-id value, which MUST be set according to [RFC8842], Section 5. If this is a re-offer or a response to a re-offer and the tls-id value is different from that presently in use, the DTLS connection is not being continued and the remote description MUST be part of an ICE restart, together with new ufrag and password values.

- [RFC8842]、セクション5に従って設定する必要があります。接続は継続されておらず、リモートの説明は新しいUFRAGおよびパスワード値とともに、ICE再起動の一部でなければなりません。

- A DTLS setup value, which MUST be set according to the rules specified in [RFC5763], Section 5 and MUST be consistent with the selected role of the current DTLS connection, if one exists and is being continued.

- [RFC5763]で指定されたルールに従って設定する必要があります。セクション5では、現在のDTLS接続の選択された役割と一致する必要があります。

- DTLS fingerprint values, where at least one fingerprint MUST be present.

- DTLS指紋値。少なくとも1つの指紋が存在する必要があります。

* All rid-ids referenced in an "a=simulcast" line MUST exist as "a=rid" lines.

* 「a = simulcast」行で参照されるすべてのrid-idは、「a = rid」行として存在する必要があります。

* Each "m=" section is also checked to ensure that prohibited features are not used.

* 各「m =」セクションもチェックされて、禁止された機能が使用されないことを確認します。

* If the RTP/RTCP multiplexing policy is "require", each "m=" section MUST contain an "a=rtcp-mux" attribute. If an "m=" section contains an "a=rtcp-mux-only" attribute, that section MUST also contain an "a=rtcp-mux" attribute.

* RTP/RTCP多重化ポリシーが「要求」の場合、各「M =」セクションには「A = RTCP-Mux」属性が含まれている必要があります。「m =」セクションに「a = rtcp-muxのみ」属性が含まれている場合、そのセクションには「a = rtcp-mux」属性も含まれている必要があります。

* If an "m=" section was present in the previous answer, the state of RTP/RTCP multiplexing MUST match what was previously negotiated.

* 「m =」セクションが前の回答に存在していた場合、RTP/RTCP多重化の状態は、以前に交渉されたものと一致する必要があります。

If this session description is of type "pranswer" or "answer", the following additional checks are applied:

このセッションの説明が「Pranswer」または「Answer」というタイプの場合、次の追加チェックが適用されます。

* The session description MUST follow the rules defined in [RFC3264], Section 6, including the requirement that the number of "m=" sections MUST exactly match the number of "m=" sections in the associated offer.

* セッションの説明は、「m =」セクションの数が関連するオファーの「m =」セクションの数と正確に一致する必要があるという要件を含む、セクション6で定義されているルールに従う必要があります。

* For each "m=" section, the media type and protocol values MUST exactly match the media type and protocol values in the corresponding "m=" section in the associated offer.

* 各「m =」セクションについて、メディアタイプとプロトコルの値は、関連するオファーの対応する「m =」セクションのメディアタイプとプロトコルの値と正確に一致する必要があります。

If any of the preceding checks failed, processing MUST stop and an error MUST be returned.

前述のチェックのいずれかが失敗した場合、処理は停止する必要があり、エラーを返す必要があります。

5.9. Applying a Local Description
5.9. ローカル説明を適用します

The following steps are performed at the media engine level to apply a local description. If an error is returned, the session MUST be restored to the state it was in before performing these steps.

メディアエンジンレベルで次の手順を実行して、ローカル説明を適用します。エラーが返された場合、これらの手順を実行する前に、セッションを状態に復元する必要があります。

First, "m=" sections are processed. For each "m=" section, the following steps MUST be performed; if any parameters are out of bounds or cannot be applied, processing MUST stop and an error MUST be returned.

最初に、「m =」セクションが処理されます。各「m =」セクションについて、次の手順を実行する必要があります。パラメーターが範囲外であるか、適用できない場合は、処理を停止する必要があり、エラーを返す必要があります。

* If this "m=" section is new, begin gathering candidates for it, as defined in [RFC8445], Section 5.1.1, unless it is definitively being bundled (either (1) this is an offer and the "m=" section is marked as bundle-only or (2) it is an answer and the "m=" section is bundled into another "m=" section).

* この「m =」セクションが新しい場合は、[rfc8445]で定義されているように、セクション5.1.1で定義されているように、候補者の収集を開始します。バンドルのみとしてマークされているか、(2)回答であり、「m =」セクションは別の「m =」セクションにバンドルされます)。

* Or, if the ICE ufrag and password values have changed, trigger the ICE agent to start an ICE restart as described in [RFC8445], Section 9, and begin gathering new candidates for the "m=" section. If this description is an answer, also start checks on that media section.

* または、ICE UFRAGとパスワード値が変更された場合、[RFC8445]、セクション9で説明されているようにアイスエージェントをトリガーしてアイス再起動を開始し、「M =」セクションの新しい候補者の収集を開始します。この説明が回答である場合は、そのメディアセクションのチェックを開始します。

* If the "m=" section <proto> value indicates use of RTP:

* 「m =」セクション<proto>値がRTPの使用を示している場合:

- If there is no RtpTransceiver associated with this "m=" section, find one and associate it with this "m=" section according to the following steps. Note that this situation will only occur when applying an offer.

- この「m =」セクションに関連付けられているrtptransceiverがない場合は、次の手順に従って、この「m =」セクションを見つけて、この「m =」セクションに関連付けます。この状況は、オファーを適用するときにのみ発生することに注意してください。

o Find the RtpTransceiver that corresponds to this "m=" section, using the mapping between transceivers and "m=" section indices established when creating the offer.

o この「m =」セクションに対応するrtptransceiverを見つけて、オファーを作成するときに確立された「m =」セクションインデックスの間のマッピングを使用します。

o Set the value of this RtpTransceiver's mid property to the MID of the "m=" section.

o このrtptransceiverの中間プロパティの値を「m =」セクションの中間に設定します。

- If RTCP mux is indicated, prepare to demux RTP and RTCP from the RTP ICE component, as specified in [RFC5761], Section 5.1.3.

- RTCP MUXが示されている場合は、[RFC5761]で指定されているように、RTP ICEコンポーネントからDEMUX RTPとRTCPを準備します。セクション5.1.3。

- For each specified RTP header extension, establish a mapping between the extension ID and URI, as described in [RFC5285], Section 6.

- 指定された各RTPヘッダー拡張機能について、[RFC5285]、セクション6で説明されているように、拡張IDとURIの間にマッピングを確立します。

- If the MID header extension is supported, prepare to demux RTP streams intended for this "m=" section based on the MID header extension, as described in [RFC9143], Section 15.

- ミッドヘッダー拡張機能がサポートされている場合は、[RFC9143]、セクション15で説明されているように、ミッドヘッダー拡張に基づいて、この「M =」セクションを意図したDEMUX RTPストリームに準備します。

- For each specified media format, establish a mapping between the payload type and the actual media format, as described in [RFC3264], Section 6.1. In addition, prepare to demux RTP streams intended for this "m=" section based on the media formats supported by this "m=" section, as described in [RFC9143], Section 9.2.

- 指定されたメディア形式ごとに、[RFC3264]、セクション6.1で説明されているように、ペイロードタイプと実際のメディア形式の間のマッピングを確立します。さらに、[RFC9143]で説明されているこの「M =」セクションでサポートされているメディア形式に基づいて、この「M =」セクションを目的としたDEMUX RTPストリームを準備します。セクション9.2。

- For each specified "rtx" media format, establish a mapping between the RTX payload type and its associated primary payload type, as described in Sections 8.6 and 8.7 of [RFC4588].

- 指定された各「RTX」メディア形式について、[RFC4588]のセクション8.6および8.7で説明されているように、RTXペイロードタイプとそれに関連するプライマリペイロードタイプの間のマッピングを確立します。

- If the direction attribute is of type "sendrecv" or "recvonly", enable receipt and decoding of media.

- 方向属性が「sendrecv」または「recvonly」タイプである場合、メディアの受領とデコードを有効にします。

Finally, if this description is of type "pranswer" or "answer", follow the processing defined in Section 5.11 below.

最後に、この説明が「Pranswer」または「Answer」というタイプの場合、以下のセクション5.11で定義されている処理に従ってください。

5.10. Applying a Remote Description
5.10. リモートの説明を適用します

The following steps are performed to apply a remote description. If an error is returned, the session MUST be restored to the state it was in before performing these steps.

リモートの説明を適用するために、次の手順が実行されます。エラーが返された場合、これらの手順を実行する前に、セッションを状態に復元する必要があります。

If the answer contains any "a=ice-options" attributes where "trickle" is listed as an attribute, update the PeerConnection canTrickleIceCandidates property to be "true". Otherwise, set this property to "false".

回答に「a = ice-options」属性が含まれている場合、「トリクル」が属性としてリストされている場合は、peerconnection cantrickleicecandidatesプロパティを「真」に更新します。それ以外の場合は、このプロパティを「false」に設定します。

The following steps MUST be performed for attributes at the session level; if any parameters are out of bounds or cannot be applied, processing MUST stop and an error MUST be returned.

セッションレベルでの属性に対して、次の手順を実行する必要があります。パラメーターが範囲外であるか、適用できない場合は、処理を停止する必要があり、エラーを返す必要があります。

* For any specified "CT" bandwidth value, set this value as the limit for the maximum total bitrate for all "m=" sections, as specified in [RFC4566], Section 5.8. Within this overall limit, the implementation can dynamically decide how to best allocate the available bandwidth between "m=" sections, respecting any specific limits that have been specified for individual "m=" sections.

* 指定された「CT」帯域幅値の場合、[RFC4566]で指定されているように、すべての「M =」セクションの最大総ビットレートの制限としてこの値を設定します。セクション5.8。この全体的な制限内で、実装は、個々の「M =」セクションに指定された特定の制限を尊重する「M =」セクション間で利用可能な帯域幅を最適に割り当てる方法を動的に決定できます。

* For any specified "RR" or "RS" bandwidth values, handle as specified in [RFC3556], Section 2.

* 指定された「RR」または「RS」帯域幅値の場合、[RFC3556]で指定されているように、セクション2で指定されています。

* Any "AS" bandwidth value ([RFC4566], Section 5.8) MUST be ignored, as the meaning of this construct at the session level is not well defined.

* セッションレベルでのこのコンストラクトの意味が明確に定義されていないため、「as as」帯域幅値([RFC4566]、セクション5.8)は無視する必要があります。

For each "m=" section, the following steps MUST be performed; if any parameters are out of bounds or cannot be applied, processing MUST stop and an error MUST be returned.

各「m =」セクションについて、次の手順を実行する必要があります。パラメーターが範囲外であるか、適用できない場合は、処理を停止する必要があり、エラーを返す必要があります。

* If the ICE ufrag or password changed from the previous remote description:

* ICE UFRAGまたはパスワードが前のリモート説明から変更された場合:

- If the description is of type "offer", the implementation MUST note that an ICE restart is needed, as described in [RFC8839], Section 4.4.1.1.1.

- 説明が「オファー」のタイプの場合、[RFC8839]、セクション4.4.1.1.1に記載されているように、実装はアイス再起動が必要であることに注意する必要があります。

- If the description is of type "answer" or "pranswer", then check to see if the current local description is an ICE restart, and if not, generate an error. If the PeerConnection state is "have-remote-pranswer" and the ICE ufrag or password changed from the previous provisional answer, then signal the ICE agent to discard any previous ICE checklist state for the "m=" section. Finally, signal the ICE agent to begin checks.

- 説明が「Answer」または「Pranswer」というタイプの場合は、現在のローカル説明がICEの再起動であるかどうかを確認し、そうでない場合はエラーを生成します。ピーコネクション状態が「remote-pranswerを持っている」場合、氷のufragまたはパスワードが以前の暫定回答から変更された場合は、氷剤にシグナルに「m =」セクションの以前のアイスチェックリスト状態を破棄します。最後に、チェックを開始するように氷剤に信号を送ります。

* If the current local description indicates an ICE restart but neither the ICE ufrag nor the password has changed from the previous remote description (as prescribed by [RFC8445], Section 9), generate an error.

* 現在のローカル説明がICEの再起動を示しているが、ICE UFRAGもパスワードも以前のリモート説明([RFC8445]で規定されているように)から変更されていない場合、エラーを生成します。

* Configure the ICE components associated with this media section to use the supplied ICE remote ufrag and password for their connectivity checks.

* このメディアセクションに関連付けられたアイスコンポーネントを構成して、接続された氷のリモートUFRAGとパスワードを使用して、接続チェックにパスワードを使用します。

* Pair any supplied ICE candidates with any gathered local candidates, as described in [RFC8445], Section 6.1.2, and start connectivity checks with the appropriate credentials.

* [RFC8445]、セクション6.1.2に記載されているように、供給された氷の候補者と集められた地元の候補者とペアリングし、適切な資格情報で接続性チェックを開始します。

* If an "a=end-of-candidates" attribute is present, process the end-of-candidates indication as described in [RFC8838], Section 14.

* [a = and-of-condidates]属性が存在する場合は、[RFC8838]、セクション14に記載されているように、キャンディデートの終了指示を処理します。

* If the "m=" section <proto> value indicates use of RTP:

* 「m =」セクション<proto>値がRTPの使用を示している場合:

- If the "m=" section is being recycled (see Section 5.2.2), disassociate the currently associated RtpTransceiver by setting its mid property to null, and discard the mapping between the transceiver and its "m=" section index.

- 「m =」セクションがリサイクルされている場合(セクション5.2.2を参照)、現在関連付けられているrtptransceiverを分離して、中間プロパティをnullに設定し、トランシーバーと「m =」セクションインデックスのマッピングを破棄します。

- If the "m=" section is not associated with any RtpTransceiver (possibly because it was disassociated in the previous step), either find an RtpTransceiver or create one according to the following steps:

- 「m =」セクションがrtptransceiverに関連付けられていない場合(おそらく前のステップで分離されたため)、rtptransceiverを見つけるか、次の手順に従って作成します。

o If the "m=" section is "sendrecv" or "recvonly", and there are RtpTransceivers of the same type that were added to the PeerConnection by addTrack and are not associated with any "m=" section and are not stopped, find the first (according to the canonical order described in Section 5.2.1) such RtpTransceiver.

o 「m =」セクションは「sendrecv」または「recvonly」であり、AddTrackによってPeerconnectionに追加された同じタイプのrtptransceiverがあり、「m =」セクションに関連付けられておらず、停止しない場合、最初(セクション5.2.1で説明されている標準的な順序による)そのようなrtptransceiver。

o If no RtpTransceiver was found in the previous step, create one with a "recvonly" direction.

o 前のステップでrtptransceiverが見つからなかった場合は、「recvonly」方向のあるステップを作成します。

o Associate the found or created RtpTransceiver with the "m=" section by setting the value of the RtpTransceiver's mid property to the MID of the "m=" section, and establish a mapping between the transceiver and the index of the "m=" section. If the "m=" section does not include a MID (i.e., the remote endpoint does not support the MID extension), generate a value for the RtpTransceiver mid property, following the guidance for "a=mid" mentioned in Section 5.2.1.

o rtptransceiverの中間プロパティの値を「m =」セクションの中間に設定し、「m =」セクションと「m =」セクションのインデックスの間のマッピングを確立することにより、見つかったまたは作成されたrtptransceiverを「m =」セクションに関連付けます。。「m =」セクションに中間が含まれていない場合(つまり、リモートエンドポイントがMID拡張機能をサポートしていない)、セクション5.2.1で言及されている「A = MID」のガイダンスに従って、RTPTransceiver MIDプロパティの値を生成します。。

- For each specified media format that is also supported by the local application, establish a mapping between the specified payload type and the media format, as described in [RFC3264], Section 6.1. Specifically, this means that the implementation records the payload type to be used in outgoing RTP packets when sending each specified media format, as well as the relative preference for each format that is indicated in their ordering. If any indicated media format is not supported by the local application, it MUST be ignored.

- ローカルアプリケーションでもサポートされている指定されたメディア形式ごとに、[RFC3264]、セクション6.1で説明されているように、指定されたペイロードタイプとメディア形式の間のマッピングを確立します。具体的には、これは、実装が、指定された各メディア形式を送信するときに発信されるRTPパケットで使用されるペイロードタイプを記録することと、注文で示されている各形式の相対的な選好を記録することを意味します。指定されたメディア形式がローカルアプリケーションによってサポートされていない場合は、無視する必要があります。

- For each specified "rtx" media format, establish a mapping between the RTX payload type and its associated primary payload type, as described in [RFC4588], Section 4. If any referenced primary payload types are not present, this MUST result in an error. Note that RTX payload types may refer to primary payload types that are not supported by the local media implementation, in which case the RTX payload type MUST also be ignored.

- 指定された「RTX」メディア形式ごとに、[RFC4588]、セクション4で説明されているように、RTXペイロードタイプと関連するプライマリペイロードタイプの間にマッピングを確立します。。RTXペイロードタイプは、ローカルメディアの実装によってサポートされていないプライマリペイロードタイプを指す場合があることに注意してください。この場合、RTXペイロードタイプも無視する必要があります。

- For each specified fmtp parameter that is supported by the local application, enable them on the associated media formats.

- ローカルアプリケーションでサポートされている指定されたFMTPパラメーターごとに、関連するメディア形式でそれらを有効にします。

- For each specified Synchronization Source (SSRC) that is signaled in the "m=" section, prepare to demux RTP streams intended for this "m=" section using that SSRC, as described in [RFC9143], Section 9.2.

- [m = "セクションで信号された指定された同期ソース(SSRC)について、[RFC9143]で説明されているように、このSSRCを使用したこの「M =」セクションを意図したDEMUX RTPストリームに準備します。セクション9.2。

- For each specified RTP header extension that is also supported by the local application, establish a mapping between the extension ID and URI, as described in [RFC5285], Section 5. Specifically, this means that the implementation records the extension ID to be used in outgoing RTP packets when sending each specified header extension. If any indicated RTP header extension is not supported by the local application, it MUST be ignored.

- ローカルアプリケーションでもサポートされている指定された各RTPヘッダー拡張機能について、[RFC5285]、セクション5で説明されているように、拡張機能IDとURI間のマッピングを確立します。具体的には、これは実装が使用される拡張機能IDを記録することを意味します。指定された各ヘッダー拡張子を送信するときの発信RTPパケット。示されたRTPヘッダー拡張機能がローカルアプリケーションによってサポートされていない場合は、無視する必要があります。

- For each specified RTCP feedback mechanism that is also supported by the local application, enable them on the associated media formats.

- ローカルアプリケーションによってもサポートされている指定されたRTCPフィードバックメカニズムごとに、関連するメディア形式でそれらを有効にします。

- For any specified "TIAS" ("Transport Independent Application Specific (maximum)") bandwidth value, set this value as a constraint on the maximum RTP bitrate to be used when sending media, as specified in [RFC3890]. If a "TIAS" value is not present but an "AS" value is specified, generate a "TIAS" value using this formula:

- 指定された「TIAS」(「Transport Independent Application固有(最大)」帯域幅値の場合、[RFC3890]で指定されているように、メディアを送信するときに使用する最大RTPビットレートの制約としてこの値を設定します。「TIAS」値が存在しないが、「値が指定されている」の場合、この式を使用して「TIAS」値を生成します。

TIAS = AS * 1000 * 0.95 - (50 * 40 * 8)

tias = as * 1000 * 0.95-(50 * 40 * 8)

The 1000 changes the unit from kbps to bps (as required by TIAS), and the 0.95 is to allocate 5% to RTCP. An estimate of header overhead is then subtracted out, in which the 50 is based on 50 packets per second, the 40 is based on typical header size (in bytes), and the 8 converts bytes to bits. Note that "TIAS" is preferred over "AS" because it provides more accurate control of bandwidth.

1000は、ユニットをKBPからBPSに変更し(TIASで要求されています)、0.95は5%をRTCPに割り当てることです。次に、ヘッダーオーバーヘッドの推定値が差し引かれます。50は50秒あたり50パケットに基づいており、40は典型的なヘッダーサイズ(バイト)に基づいており、8はバイトをビットに変換します。「Tias」は「帯域幅のより正確な制御を提供するため、「Tias」が好まれていることに注意してください。

- For any "RR" or "RS" bandwidth values, handle as specified in [RFC3556], Section 2.

- [RR]または「RS」帯域幅値の場合、[RFC3556]で指定されているように、セクション2で指定されています。

- Any specified "CT" bandwidth value MUST be ignored, as the meaning of this construct at the media level is not well defined.

- メディアレベルでのこのコンストラクトの意味が明確に定義されていないため、指定された「CT」帯域幅値は無視する必要があります。

- If the "m=" section is of type "audio":

- 「m =」セクションがタイプ「オーディオ」の場合:

o For each specified "CN" media format, configure silence suppression for all supported media formats with the same clock rate, as described in [RFC3389], Section 5, except for formats that have their own internal silence suppression mechanisms. Silence suppression for such formats (e.g., Opus) is controlled via fmtp parameters, as discussed in Section 5.2.3.2.

o 指定された各「CN」メディア形式について、[RFC3389]、セクション5に記載されているように、同じクロックレートでサポートされているすべてのメディア形式の沈黙抑制を構成します。セクション5.2.3.2で説明したように、このような形式(OPUSなど)の沈黙抑制は、FMTPパラメーターを介して制御されます。

o For each specified "telephone-event" media format, enable dual-tone multifrequency (DTMF) transmission for all supported media formats with the same clock rate, as described in [RFC4733], Section 2.5.1.2. If there are any supported media formats that do not have a corresponding telephone-event format, disable DTMF transmission for those formats.

o 指定された各「電話イベント」メディア形式について、[RFC4733]、セクション2.5.1.2に記載されているように、同じクロックレートでサポートされているすべてのメディア形式に対してデュアルトーンマルチフェーク(DTMF)伝送を有効にします。対応する電話イベント形式を持たないサポートされているメディア形式がある場合は、これらの形式のDTMF送信を無効にします。

o For any specified "ptime" value, configure the available media formats to use the specified packet size when sending. If the specified size is not supported for a media format, use the next closest value instead.

o 指定された「PTIME」値については、送信時に指定されたパケットサイズを使用するように使用可能なメディア形式を構成します。指定されたサイズがメディア形式でサポートされていない場合は、代わりに次に最も近い値を使用します。

Finally, if this description is of type "pranswer" or "answer", follow the processing defined in Section 5.11 below.

最後に、この説明が「Pranswer」または「Answer」というタイプの場合、以下のセクション5.11で定義されている処理に従ってください。

5.11. Applying an Answer
5.11. 答えを適用します

In addition to the steps mentioned above for processing a local or remote description, the following steps are performed when processing a description of type "pranswer" or "answer".

ローカルまたはリモートの説明を処理するための上記の手順に加えて、タイプ「Pranswer」または「Answer」の説明を処理するときに次の手順が実行されます。

For each "m=" section, the following steps MUST be performed:

各「m =」セクションについて、次の手順を実行する必要があります。

* If the "m=" section has been rejected (i.e., the <port> value is set to zero in the answer), stop any reception or transmission of media for this section, and, unless a non-rejected "m=" section is bundled with this "m=" section, discard any associated ICE components, as described in the second bullet item in [RFC8839], Section 4.4.3.1.

* 「m =」セクションが拒否された場合(つまり、<port>値が回答でゼロに設定されています)、このセクションのメディアの受信または送信を停止し、拒否されていない「m =」セクションを除き、この「M =」セクションにバンドルされ、[RFC8839]の2番目の弾丸項目、セクション4.4.3.1に記載されているように、関連する氷成分を破棄します。

* If the remote DTLS fingerprint has been changed or the value of the "a=tls-id" attribute has changed, tear down the DTLS connection. This includes the case when the PeerConnection state is "have-remote-pranswer". If a DTLS connection needs to be torn down but the answer does not indicate an ICE restart or, in the case of "have-remote-pranswer", new ICE credentials, an error MUST be generated. If an ICE restart is performed without a change in the tls-id value or fingerprint, then the same DTLS connection is continued over the new ICE channel. Note that although JSEP requires that answerers change the tls-id value if and only if the offerer does, non-JSEP answerers are permitted to change the tls-id value as long as the offer contained an ICE restart. Thus, JSEP implementations that process DTLS data prior to receiving an answer MUST be prepared to receive either a ClientHello or data from the previous DTLS connection.

* リモートDTLS指紋が変更された場合、または「A = TLS-ID」属性の値が変更された場合、DTLS接続を取り壊します。これには、PeerConnection状態が「Remote-Pranswerを持っている」場合が含まれます。DTLS接続を取り壊す必要があるが、答えがICEの再起動を示すものではない場合、または「Remote-Pranswerを持っている」場合、新しいICE資格の場合、エラーを生成する必要があります。TLS-ID値または指紋を変更せずにICE再起動が実行される場合、新しいICEチャネルで同じDTLS接続が継続されます。JSEPでは、オファーがそうする場合にのみ、応答者がオファーにアイス再起動が含まれている限り、TLS-ID値を変更することが許可されている場合にのみ、回答者がTLS-ID値を変更することを要求していますが。したがって、回答を受信する前にDTLSデータを処理するJSEP実装は、以前のDTLS接続からクライアントヘロまたはデータを受信するために準備する必要があります。

* If no valid DTLS connection exists, prepare to start a DTLS connection, using the specified roles and fingerprints, on any underlying ICE components, once they are active.

* 有効なDTLS接続が存在しない場合は、指定された役割と指紋を使用して、アクティブになったら、指定された役割と指紋を使用してDTLS接続を開始する準備をします。

* If the "m=" section <proto> value indicates use of RTP:

* 「m =」セクション<proto>値がRTPの使用を示している場合:

- If the "m=" section references RTCP feedback mechanisms that were not present in the corresponding "m=" section in the offer, this indicates a negotiation problem and MUST result in an error. However, new media formats and new RTP header extension values are permitted in the answer, as described in [RFC3264], Section 7 and [RFC5285], Section 6.

- 「m =」セクションが、オファーの対応する「m =」セクションに存在しなかったRTCPフィードバックメカニズムを参照する場合、これは交渉の問題を示し、エラーをもたらす必要があります。ただし、[RFC3264]、セクション7および[RFC5285]、セクション6で説明されているように、新しいメディア形式と新しいRTPヘッダー拡張値が回答で許可されています。

- If the "m=" section has RTCP mux enabled, discard the RTCP ICE component, if one exists, and begin or continue muxing RTCP over the RTP ICE component, as specified in [RFC5761], Section 5.1.3. Otherwise, prepare to transmit RTCP over the RTCP ICE component; if no RTCP ICE component exists because RTCP mux was previously enabled, this MUST result in an error.

- 「m =」セクションにRTCP muxが有効になっている場合、[rfc5761]で指定されているように、rtcpアイスコンポーネントを存在する場合はrtcpアイスコンポーネントを破棄し、RTPアイスコンポーネント上でRTCPをMuxingにします。セクション5.1.3。それ以外の場合は、RTCP ICEコンポーネントを介してRTCPを送信する準備をします。RTCP MUXが以前に有効になっていたためにRTCP ICEコンポーネントが存在しない場合、これはエラーになる必要があります。

- If the "m=" section has Reduced-Size RTCP enabled, configure the RTCP transmission for this "m=" section to use Reduced-Size RTCP, as specified in [RFC5506].

- 「M =」セクションに縮小サイズのRTCPが有効になっている場合、[RFC5506]で指定されているように、この「M =」セクションのRTCP伝送を設定して、縮小サイズのRTCPを使用します。

- If the direction attribute in the answer indicates that the JSEP implementation should be sending media ("sendonly" for local answers, "recvonly" for remote answers, or "sendrecv" for either type of answer), choose the media format to send as the most preferred media format from the remote description that is also locally supported, as discussed in Sections 6.1 and 7 of [RFC3264], and start transmitting RTP media using that format once the underlying transport layers have been established. If an SSRC has not already been chosen for this outgoing RTP stream, choose a unique random one. If media is already being transmitted, the same SSRC SHOULD be used unless the clock rate of the new codec is different, in which case a new SSRC MUST be chosen, as specified in [RFC7160], Section 4.1.

- 回答の方向属性が、JSEP実装がメディア(ローカルの回答の「sendonly」、リモートの回答の「recvonly」、またはいずれかの回答の「sendrecv」を送信する必要があることを示している場合、メディア形式を選択して送信するメディア形式を選択します。[RFC3264]のセクション6.1および7で説明されているように、ローカルでサポートされているリモート説明から最も優先されるメディア形式で、基礎となる輸送層が確立されたら、その形式を使用してRTPメディアの送信を開始します。この発信RTPストリームにSSRCがまだ選択されていない場合は、一意のランダムなストリームを選択します。メディアが既に送信されている場合、新しいコーデックのクロックレートが異なっていない限り、同じSSRCを使用する必要があります。その場合、[RFC7160]で指定されているように、新しいSSRCを選択する必要があります。セクション4.1。

- The payload type mapping from the remote description is used to determine payload types for the outgoing RTP streams, including the payload type for the send media format chosen above. Any RTP header extensions that were negotiated should be included in the outgoing RTP streams, using the extension mapping from the remote description. If the MID header extension has been negotiated, include it in the outgoing RTP streams, as indicated in [RFC9143], Section 15. If the RtpStreamId or RepairedRtpStreamId header extensions have been negotiated and rid-ids have been established, include these header extensions in the outgoing RTP streams, as indicated in [RFC8851], Section 4.

- リモート説明からのペイロードタイプマッピングは、上記の送信メディア形式のペイロードタイプを含む、発信RTPストリームのペイロードタイプを決定するために使用されます。ネゴシエートされたRTPヘッダー拡張機能は、リモート説明からの拡張マッピングを使用して、発信RTPストリームに含める必要があります。[RFC9143]、セクション15に示されているように、ミッドヘッダー拡張がネゴシエートされた場合は、発信RTPストリームに含めます。RTPSTREMIDまたはREPAREEDRTPSTREAMIDヘッダー拡張が交渉され、RID-IDが確立されている場合、これらのヘッダー拡張を含めてこれらのヘッダー拡張を含めます。[RFC8851]、セクション4に示されているように、発信RTPストリーム。

- If the "m=" section is of type "audio", and silence suppression was (1) configured for the send media format as a result of processing the remote description and (2) also enabled for that format in the local description, use silence suppression for outgoing media, in accordance with the guidance in Section 5.2.3.2. If these conditions are not met, silence suppression MUST NOT be used for outgoing media.

- 「m =」セクションがタイプ「オーディオ」であり、沈黙抑制が(1)リモートの説明を処理した結果として送信メディア形式用に構成されている場合、(2)ローカル説明でその形式も有効になっている場合、使用してください。セクション5.2.3.2のガイダンスに従って、発信メディアの沈黙抑制。これらの条件が満たされない場合、沈黙の抑制を発信メディアに使用してはなりません。

- If simulcast has been negotiated, send the appropriate number of Source RTP Streams as specified in [RFC8853], Section 5.3.3.

- Simulcastが交渉されている場合は、[RFC8853]で指定されている適切な数のソースRTPストリームを送信します。セクション5.3.3。

- If the send media format chosen above has a corresponding "rtx" media format or a FEC mechanism has been negotiated, establish a redundancy RTP stream with a unique random SSRC for each Source RTP Stream, and start or continue transmitting RTX/FEC packets as needed.

- 上記の送信メディア形式に対応する「RTX」メディア形式がある場合、またはFECメカニズムがネゴシエートされている場合、各ソースRTPストリームの一意のランダムSSRCを使用して冗長性RTPストリームを確立し、必要に応じてRTX/FECパケットを開始または続行し続けます。

- If the send media format chosen above has a corresponding "red" media format of the same clock rate, allow redundant encoding using the specified format for resiliency purposes, as discussed in [RFC8854], Section 3.2. Note that unlike RTX or FEC media formats, the "red" format is transmitted on the Source RTP Stream, not the redundancy RTP stream.

- 上記の送信メディア形式に同じクロックレートの対応する「赤」メディア形式がある場合、[RFC8854]、セクション3.2で説明しているように、回復力のために指定された形式を使用して冗長エンコードを許可します。RTXまたはFECメディア形式とは異なり、冗長性RTPストリームではなく、ソースRTPストリームに「赤」形式が送信されることに注意してください。

- Enable the RTCP feedback mechanisms referenced in the media section for all Source RTP Streams using the specified media formats. Specifically, begin or continue sending the requested feedback types and reacting to received feedback, as specified in [RFC4585], Section 4.2. When sending RTCP feedback, follow the rules and recommendations from [RFC8108], Section 5.4.1 to select which SSRC to use.

- 指定されたメディア形式を使用して、すべてのソースRTPストリームのメディアセクションで参照されているRTCPフィードバックメカニズムを有効にします。具体的には、[RFC4585]で指定されているように、要求されたフィードバックタイプを開始または継続して、受信したフィードバックに反応します。セクション4.2。RTCPフィードバックを送信するときは、[RFC8108]のルールと推奨事項に従ってセクション5.4.1に従って、使用するSSRCを選択します。

- If the direction attribute in the answer indicates that the JSEP implementation should not be sending media ("recvonly" for local answers, "sendonly" for remote answers, or "inactive" for either type of answer), stop transmitting all RTP media, but continue sending RTCP, as described in [RFC3264], Section 5.1.

- 回答の方向属性が、JSEPの実装がメディア(ローカルの回答のために「recvonly」、リモートの回答の「recvonly」、またはいずれかの回答の「非アクティブ」)を送信してはならないことを示している場合、すべてのRTPメディアの送信を停止しますが、[RFC3264]、セクション5.1で説明されているように、RTCPの送信を続けます。

* If the "m=" section <proto> value indicates use of SCTP:

* 「m =」セクション<proto>値がSCTPの使用を示している場合:

- If an SCTP association exists and the remote SCTP port has changed, discard the existing SCTP association. This includes the case when the PeerConnection state is "have-remote-pranswer".

- SCTP協会が存在し、リモートSCTPポートが変更された場合、既存のSCTP協会を廃棄します。これには、PeerConnection状態が「Remote-Pranswerを持っている」場合が含まれます。

- If no valid SCTP association exists, prepare to initiate an SCTP association over the associated ICE component and DTLS connection, using the local SCTP port value from the local description and the remote SCTP port value from the remote description, as described in [RFC8841], Section 10.2.

- 有効なSCTP協会が存在しない場合は、[RFC8841]に記載されているように、ローカル説明からローカルSCTPポート値とリモートSCTPポート値をリモートSCTPポート値を使用して、関連するICEコンポーネントとDTLS接続を介してSCTPアソシエーションを開始する準備をします。セクション10.2。

If the answer contains valid bundle groups, discard any ICE components for the "m=" sections that will be bundled onto the primary ICE components in each bundle, and begin muxing these "m=" sections accordingly, as described in [RFC9143], Section 7.4.

回答に有効なバンドルグループが含まれている場合は、各バンドルの主要な氷成分にバンドルされる「m =」セクションの氷コンポーネントを破棄し、[rfc9143]で説明しているように、これらの「m =」セクションのマクシングを開始します。セクション7.4。

If the description is of type "answer" and there are still remaining candidates in the ICE candidate pool, discard them.

説明が「回答」のタイプであり、ICE候補プールにまだ残っている候補者がいる場合は、それらを捨ててください。

6. Processing RTP/RTCP
6. RTP/RTCPの処理

When bundling, associating incoming RTP/RTCP with the proper "m=" section is defined in [RFC9143], Section 9.2. When not bundling, the proper "m=" section is clear from the ICE component over which the RTP/RTCP is received.

バンドリングの場合、着信RTP/RTCPを適切な「m =」セクションに関連付けることは、[RFC9143]、セクション9.2で定義されています。バンドリングしていない場合、RTP/RTCPが受信される氷成分から適切な「m =」セクションがクリアされます。

Once the proper "m=" section or sections are known, RTP/RTCP is delivered to the RtpTransceiver(s) associated with the "m=" section(s) and further processing of the RTP/RTCP is done at the RtpTransceiver level. This includes using the RID mechanism [RFC8851] and its associated RtpStreamId and RepairedRtpStreamId identifiers to distinguish between multiple encoded streams and determine which Source RTP Stream should be repaired by a given redundancy RTP stream.

適切な「m =」セクションまたはセクションがわかったら、rtp/rtcpが「m =」セクションに関連付けられたrtptransceiverに配信され、rtp/rtcpのさらなる処理がrtptransceiverレベルで行われます。これには、RIDメカニズム[RFC8851]とそれに関連するRTPSTREAMIDおよびREPAREDRTPSTREAMID IDを使用して、複数のエンコードされたストリームを区別し、特定の冗長性RTPストリームによってどのソースRTPストリームを修復するかを決定することが含まれます。

7. Examples
7. 例

Note that this example section shows several SDP fragments. To accommodate RFC line-length restrictions, some of the SDP lines have been split into multiple lines, where leading whitespace indicates that a line is a continuation of the previous line. In addition, some blank lines have been added to improve readability but are not valid in SDP.

この例セクションには、いくつかのSDPフラグメントが表示されていることに注意してください。RFCラインの長さの制限に対応するために、SDPラインの一部は複数のラインに分割されています。ここでは、先頭の白人は、ラインが前のラインの継続であることを示しています。さらに、読みやすさを改善するためにいくつかの空白線が追加されていますが、SDPでは有効ではありません。

More examples of SDP for WebRTC call flows, including examples with IPv6 addresses, can be found in [SDP4WebRTC].

IPv6アドレスを含む例を含むWeBRTCコールフローのSDPのより多くの例は、[sdp4webrtc]にあります。

7.1. Simple Example
7.1. 簡単な例

This section shows a very simple example that sets up a minimal audio/video call between two JSEP endpoints without using Trickle ICE. The example in the following section provides a more detailed example of what could happen in a JSEP session.

このセクションでは、トリクルアイスを使用せずに2つのJSEPエンドポイント間に最小限のオーディオ/ビデオ通話をセットアップする非常に簡単な例を示しています。次のセクションの例は、JSEPセッションで何が起こるかのより詳細な例を示します。

The code flow below shows Alice's endpoint initiating the session to Bob's endpoint. The messages from the JavaScript application in Alice's browser to the JavaScript in Bob's browser, abbreviated as "AliceJS" and "BobJS", respectively, are assumed to flow over some signaling protocol via a web server. The JavaScript on both Alice's side and Bob's side waits for all candidates before sending the offer or answer, so the offers and answers are complete; Trickle ICE is not used. The user agents (JSEP implementations) in Alice's and Bob's browsers, abbreviated as "AliceUA" and "BobUA", respectively, are both using the default bundle policy of "balanced" and the default RTCP mux policy of "require".

以下のコードフローは、アリスのエンドポイントがボブのエンドポイントにセッションを開始することを示しています。AliceのブラウザでのJavaScriptアプリケーションから、それぞれ「Alicejs」と「Bobjs」と略されたBobのブラウザのJavaScriptへのメッセージは、Webサーバーを介して一部のシグナル伝達プロトコルを越えて流れると想定されています。アリスの側とボブの両方のJavaScriptは、オファーや回答を送信する前にすべての候補者を待っているので、申し出と回答が完了します。トリクルアイスは使用されていません。それぞれ「Aliceua」と「Bobua」と略されたAlice'sおよびBobのブラウザのユーザーエージェント(JSEP実装)は、両方とも「バランス」のデフォルトのバンドルポリシーと「要求」のデフォルトのRTCP MUXポリシーを使用しています。

   //                  set up local media state
   AliceJS->AliceUA:   create new PeerConnection
   AliceJS->AliceUA:   addTrack with two tracks: audio and video
   AliceJS->AliceUA:   createOffer to get offer
   AliceJS->AliceUA:   setLocalDescription with offer
   AliceUA->AliceJS:   multiple onicecandidate events with candidates

   //                  wait for ICE gathering to complete
   AliceUA->AliceJS:   onicecandidate event with null candidate
   AliceJS->AliceUA:   get |offer-A1| from pendingLocalDescription

   //                  |offer-A1| is sent over signaling protocol to Bob
   AliceJS->WebServer: signaling with |offer-A1|
   WebServer->BobJS:   signaling with |offer-A1|

   //                  |offer-A1| arrives at Bob
   BobJS->BobUA:       create a PeerConnection
   BobJS->BobUA:       setRemoteDescription with |offer-A1|
   BobUA->BobJS:       ontrack events for audio and video tracks

   //                  Bob accepts call
   BobJS->BobUA:       addTrack with local tracks
   BobJS->BobUA:       createAnswer
   BobJS->BobUA:       setLocalDescription with answer
   BobUA->BobJS:       multiple onicecandidate events with candidates

   //                  wait for ICE gathering to complete
   BobUA->BobJS:       onicecandidate event with null candidate
   BobJS->BobUA:       get |answer-A1| from currentLocalDescription

   //                  |answer-A1| is sent over signaling protocol
   //                  to Alice
   BobJS->WebServer:   signaling with |answer-A1|
   WebServer->AliceJS: signaling with |answer-A1|

   //                  |answer-A1| arrives at Alice
   AliceJS->AliceUA:   setRemoteDescription with |answer-A1|
   AliceUA->AliceJS:   ontrack events for audio and video tracks

   //                  media flows
   BobUA->AliceUA:     media sent from Bob to Alice
   AliceUA->BobUA:     media sent from Alice to Bob
        

The SDP for |offer-A1| looks like:

| offer-a1 |のSDP見た目:

   v=0
   o=- 4962303333179871722 1 IN IP4 0.0.0.0
   s=-
   t=0 0
   a=ice-options:trickle ice2
   a=group:BUNDLE a1 v1
   a=group:LS a1 v1

   m=audio 10100 UDP/TLS/RTP/SAVPF 96 0 8 97 98
   c=IN IP4 203.0.113.100
   a=mid:a1
   a=sendrecv
   a=rtpmap:96 opus/48000/2
   a=rtpmap:0 PCMU/8000
   a=rtpmap:8 PCMA/8000
   a=rtpmap:97 telephone-event/8000
   a=rtpmap:98 telephone-event/48000
   a=fmtp:97 0-15
   a=fmtp:98 0-15
   a=maxptime:120
   a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid
   a=extmap:2 urn:ietf:params:rtp-hdrext:ssrc-audio-level
   a=msid:47017fee-b6c1-4162-929c-a25110252400
   a=ice-ufrag:ETEn
   a=ice-pwd:OtSK0WpNtpUjkY4+86js7ZQl
   a=fingerprint:sha-256
                 19:E2:1C:3B:4B:9F:81:E6:B8:5C:F4:A5:A8:D8:73:04:
                 BB:05:2F:70:9F:04:A9:0E:05:E9:26:33:E8:70:88:A2
   a=setup:actpass
   a=tls-id:91bbf309c0990a6bec11e38ba2933cee
   a=rtcp:10101 IN IP4 203.0.113.100
   a=rtcp-mux
   a=rtcp-rsize
   a=candidate:1 1 udp 2113929471 203.0.113.100 10100 typ host
   a=candidate:1 2 udp 2113929470 203.0.113.100 10101 typ host
   a=end-of-candidates

   m=video 10102 UDP/TLS/RTP/SAVPF 100 101 102 103
   c=IN IP4 203.0.113.100
   a=mid:v1
   a=sendrecv
   a=rtpmap:100 VP8/90000
   a=rtpmap:101 H264/90000
   a=fmtp:101 packetization-mode=1;profile-level-id=42e01f
   a=rtpmap:102 rtx/90000
   a=fmtp:102 apt=100
   a=rtpmap:103 rtx/90000
   a=fmtp:103 apt=101
   a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid
   a=extmap:3 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id
   a=rtcp-fb:100 ccm fir
   a=rtcp-fb:100 nack
   a=rtcp-fb:100 nack pli
   a=msid:47017fee-b6c1-4162-929c-a25110252400
   a=ice-ufrag:BGKk
   a=ice-pwd:mqyWsAjvtKwTGnvhPztQ9mIf
   a=fingerprint:sha-256
                 19:E2:1C:3B:4B:9F:81:E6:B8:5C:F4:A5:A8:D8:73:04:
                 BB:05:2F:70:9F:04:A9:0E:05:E9:26:33:E8:70:88:A2
   a=setup:actpass
   a=tls-id:91bbf309c0990a6bec11e38ba2933cee
   a=rtcp:10103 IN IP4 203.0.113.100
   a=rtcp-mux
   a=rtcp-rsize
   a=candidate:1 1 udp 2113929471 203.0.113.100 10102 typ host
   a=candidate:1 2 udp 2113929470 203.0.113.100 10103 typ host
   a=end-of-candidates
        

The SDP for |answer-A1| looks like:

| Answer-A1 |のSDP見た目:

   v=0
   o=- 6729291447651054566 1 IN IP4 0.0.0.0
   s=-
   t=0 0
   a=ice-options:trickle ice2
   a=group:BUNDLE a1 v1
   a=group:LS a1 v1

   m=audio 10200 UDP/TLS/RTP/SAVPF 96 0 8 97 98
   c=IN IP4 203.0.113.200
   a=mid:a1
   a=sendrecv
   a=rtpmap:96 opus/48000/2
   a=rtpmap:0 PCMU/8000
   a=rtpmap:8 PCMA/8000
   a=rtpmap:97 telephone-event/8000
   a=rtpmap:98 telephone-event/48000
   a=fmtp:97 0-15
   a=fmtp:98 0-15
   a=maxptime:120
   a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid
   a=extmap:2 urn:ietf:params:rtp-hdrext:ssrc-audio-level
   a=msid:61317484-2ed4-49d7-9eb7-1414322a7aae
   a=ice-ufrag:6sFv
   a=ice-pwd:cOTZKZNVlO9RSGsEGM63JXT2
   a=fingerprint:sha-256
                 6B:8B:F0:65:5F:78:E2:51:3B:AC:6F:F3:3F:46:1B:35:
                 DC:B8:5F:64:1A:24:C2:43:F0:A1:58:D0:A1:2C:19:08
   a=setup:active
   a=tls-id:eec3392ab83e11ceb6a0990c903fbb19
   a=rtcp-mux
   a=rtcp-rsize
   a=candidate:1 1 udp 2113929471 203.0.113.200 10200 typ host
   a=end-of-candidates

   m=video 10200 UDP/TLS/RTP/SAVPF 100 101 102 103
   c=IN IP4 203.0.113.200
   a=mid:v1
   a=sendrecv
   a=rtpmap:100 VP8/90000
   a=rtpmap:101 H264/90000
   a=fmtp:101 packetization-mode=1;profile-level-id=42e01f
   a=rtpmap:102 rtx/90000
   a=fmtp:102 apt=100
   a=rtpmap:103 rtx/90000
   a=fmtp:103 apt=101
   a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid
   a=extmap:3 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id
   a=rtcp-fb:100 ccm fir
   a=rtcp-fb:100 nack
   a=rtcp-fb:100 nack pli
   a=msid:61317484-2ed4-49d7-9eb7-1414322a7aae
        
7.2. Detailed Example
7.2. 詳細な例

This section shows a more involved example of a session between two JSEP endpoints. Trickle ICE is used in full trickle mode, with a bundle policy of "must-bundle", an RTCP mux policy of "require", and a single TURN server. Initially, both Alice and Bob establish an audio channel and a data channel. Later, Bob adds two video flows -- one for his video feed and one for screen sharing, both supporting FEC -- with the video feed configured for simulcast. Alice accepts these video flows but does not add video flows of her own, so they are handled as "recvonly". Alice also specifies a maximum video decoder resolution.

このセクションは、2つのJSEPエンドポイント間のセッションのより複雑な例を示しています。Trickle Iceは、「必須バンドル」のバンドルポリシー、RTCP MUXポリシー「Require」、および単一のターンサーバーを備えたフルトリクルモードで使用されます。当初、アリスとボブの両方がオーディオチャネルとデータチャネルを確立しました。その後、ボブは2つのビデオフローを追加します - 1つはビデオフィード用とスクリーン共有用の1つは、両方ともFECをサポートしています。アリスはこれらのビデオフローを受け入れますが、自分のビデオフローを追加しないため、「Recvonly」として処理されます。アリスは、最大ビデオデコーダー解像度も指定しています。

   //                  set up local media state
   AliceJS->AliceUA:   create new PeerConnection
   AliceJS->AliceUA:   addTrack with an audio track
   AliceJS->AliceUA:   createDataChannel to get data channel
   AliceJS->AliceUA:   createOffer to get |offer-B1|
   AliceJS->AliceUA:   setLocalDescription with |offer-B1|

   //                  |offer-B1| is sent over signaling protocol to Bob
   AliceJS->WebServer: signaling with |offer-B1|
   WebServer->BobJS:   signaling with |offer-B1|

   //                  |offer-B1| arrives at Bob
   BobJS->BobUA:       create a PeerConnection
   BobJS->BobUA:       setRemoteDescription with |offer-B1|
   BobUA->BobJS:       ontrack event with audio track from Alice

   //                  candidates are sent to Bob
   AliceUA->AliceJS:   onicecandidate (host) |offer-B1-candidate-1|
   AliceJS->WebServer: signaling with |offer-B1-candidate-1|
   AliceUA->AliceJS:   onicecandidate (srflx) |offer-B1-candidate-2|
   AliceJS->WebServer: signaling with |offer-B1-candidate-2|
   AliceUA->AliceJS:   onicecandidate (relay) |offer-B1-candidate-3|
   AliceJS->WebServer: signaling with |offer-B1-candidate-3|

   WebServer->BobJS:   signaling with |offer-B1-candidate-1|
   BobJS->BobUA:       addIceCandidate with |offer-B1-candidate-1|
   WebServer->BobJS:   signaling with |offer-B1-candidate-2|
   BobJS->BobUA:       addIceCandidate with |offer-B1-candidate-2|
   WebServer->BobJS:   signaling with |offer-B1-candidate-3|
   BobJS->BobUA:       addIceCandidate with |offer-B1-candidate-3|

   //                  Bob accepts call
   BobJS->BobUA:       addTrack with local audio
   BobJS->BobUA:       createDataChannel to get data channel
   BobJS->BobUA:       createAnswer to get |answer-B1|
   BobJS->BobUA:       setLocalDescription with |answer-B1|

   //                  |answer-B1| is sent to Alice
   BobJS->WebServer:   signaling with |answer-B1|
   WebServer->AliceJS: signaling with |answer-B1|
   AliceJS->AliceUA:   setRemoteDescription with |answer-B1|
   AliceUA->AliceJS:   ontrack event with audio track from Bob

   //                  candidates are sent to Alice
   BobUA->BobJS:       onicecandidate (host) |answer-B1-candidate-1|
   BobJS->WebServer:   signaling with |answer-B1-candidate-1|
   BobUA->BobJS:       onicecandidate (srflx) |answer-B1-candidate-2|
   BobJS->WebServer:   signaling with |answer-B1-candidate-2|
   BobUA->BobJS:       onicecandidate (relay) |answer-B1-candidate-3|
   BobJS->WebServer:   signaling with |answer-B1-candidate-3|

   WebServer->AliceJS: signaling with |answer-B1-candidate-1|
   AliceJS->AliceUA:   addIceCandidate with |answer-B1-candidate-1|
   WebServer->AliceJS: signaling with |answer-B1-candidate-2|
   AliceJS->AliceUA:   addIceCandidate with |answer-B1-candidate-2|
   WebServer->AliceJS: signaling with |answer-B1-candidate-3|
   AliceJS->AliceUA:   addIceCandidate with |answer-B1-candidate-3|

   //                  data channel opens
   BobUA->BobJS:       ondatachannel event
   AliceUA->AliceJS:   ondatachannel event
   BobUA->BobJS:       onopen
   AliceUA->AliceJS:   onopen

   //                  media is flowing between endpoints
   BobUA->AliceUA:     audio+data sent from Bob to Alice
   AliceUA->BobUA:     audio+data sent from Alice to Bob

   //                  some time later, Bob adds two video streams
   //                  note: no candidates exchanged, because of bundle
   BobJS->BobUA:       addTrack with first video stream
   BobJS->BobUA:       addTrack with second video stream
   BobJS->BobUA:       createOffer to get |offer-B2|
   BobJS->BobUA:       setLocalDescription with |offer-B2|

   //                  |offer-B2| is sent to Alice
   BobJS->WebServer:   signaling with |offer-B2|
   WebServer->AliceJS: signaling with |offer-B2|
   AliceJS->AliceUA:   setRemoteDescription with |offer-B2|
   AliceUA->AliceJS:   ontrack event with first video track
   AliceUA->AliceJS:   ontrack event with second video track
   AliceJS->AliceUA:   createAnswer to get |answer-B2|
   AliceJS->AliceUA:   setLocalDescription with |answer-B2|

   //                  |answer-B2| is sent over signaling protocol
   //                  to Bob
   AliceJS->WebServer: signaling with |answer-B2|
   WebServer->BobJS:   signaling with |answer-B2|
   BobJS->BobUA:       setRemoteDescription with |answer-B2|

   //                  media is flowing between endpoints
   BobUA->AliceUA:     audio+video+data sent from Bob to Alice
   AliceUA->BobUA:     audio+video+data sent from Alice to Bob
        

The SDP for |offer-B1| looks like:

| offer-b1 |のSDP見た目:

   v=0
   o=- 4962303333179871723 1 IN IP4 0.0.0.0
   s=-
   t=0 0
   a=ice-options:trickle ice2
   a=group:BUNDLE a1 d1

   m=audio 9 UDP/TLS/RTP/SAVPF 96 0 8 97 98
   c=IN IP4 0.0.0.0
   a=mid:a1
   a=sendrecv
   a=rtpmap:96 opus/48000/2
   a=rtpmap:0 PCMU/8000
   a=rtpmap:8 PCMA/8000
   a=rtpmap:97 telephone-event/8000
   a=rtpmap:98 telephone-event/48000
   a=fmtp:97 0-15
   a=fmtp:98 0-15
   a=maxptime:120
   a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid
   a=extmap:2 urn:ietf:params:rtp-hdrext:ssrc-audio-level
   a=msid:57017fee-b6c1-4162-929c-a25110252400
   a=ice-ufrag:ATEn
   a=ice-pwd:AtSK0WpNtpUjkY4+86js7ZQl
   a=fingerprint:sha-256
                 29:E2:1C:3B:4B:9F:81:E6:B8:5C:F4:A5:A8:D8:73:04:
                 BB:05:2F:70:9F:04:A9:0E:05:E9:26:33:E8:70:88:A2
   a=setup:actpass
   a=tls-id:17f0f4ba8a5f1213faca591b58ba52a7
   a=rtcp-mux
   a=rtcp-mux-only
   a=rtcp-rsize

   m=application 0 UDP/DTLS/SCTP webrtc-datachannel
   c=IN IP4 0.0.0.0
   a=mid:d1
   a=sctp-port:5000
   a=max-message-size:65536
   a=bundle-only
        

|offer-B1-candidate-1| looks like:

| offer-b1-candidate-1 |見た目:

   ufrag ATEn
   index 0
   mid   a1
   attr  candidate:1 1 udp 2113929471 203.0.113.100 10100 typ host
        

|offer-B1-candidate-2| looks like:

| offer-b1-candidate-2 |見た目:

   ufrag ATEn
   index 0
   mid   a1
   attr  candidate:1 1 udp 1845494015 198.51.100.100 11100 typ srflx
                   raddr 203.0.113.100 rport 10100
        

|offer-B1-candidate-3| looks like:

| offer-b1-candidate-3 |見た目:

   ufrag ATEn
   index 0
   mid   a1
   attr  candidate:1 1 udp 255 192.0.2.100 12100 typ relay
                   raddr 198.51.100.100 rport 11100
        

The SDP for |answer-B1| looks like:

|回答-B1 |のSDP見た目:

   v=0
   o=- 7729291447651054566 1 IN IP4 0.0.0.0
   s=-
   t=0 0
   a=ice-options:trickle ice2
   a=group:BUNDLE a1 d1

   m=audio 9 UDP/TLS/RTP/SAVPF 96 0 8 97 98
   c=IN IP4 0.0.0.0
   a=mid:a1
   a=sendrecv
   a=rtpmap:96 opus/48000/2
   a=rtpmap:0 PCMU/8000
   a=rtpmap:8 PCMA/8000
   a=rtpmap:97 telephone-event/8000
   a=rtpmap:98 telephone-event/48000
   a=fmtp:97 0-15
   a=fmtp:98 0-15
   a=maxptime:120
   a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid
   a=extmap:2 urn:ietf:params:rtp-hdrext:ssrc-audio-level
   a=msid:71317484-2ed4-49d7-9eb7-1414322a7aae
   a=ice-ufrag:7sFv
   a=ice-pwd:dOTZKZNVlO9RSGsEGM63JXT2
   a=fingerprint:sha-256
                 7B:8B:F0:65:5F:78:E2:51:3B:AC:6F:F3:3F:46:1B:35:
                 DC:B8:5F:64:1A:24:C2:43:F0:A1:58:D0:A1:2C:19:08
   a=setup:active
   a=tls-id:7a25ab85b195acaf3121f5a8ab4f0f71
   a=rtcp-mux
   a=rtcp-mux-only
   a=rtcp-rsize

   m=application 9 UDP/DTLS/SCTP webrtc-datachannel
   c=IN IP4 0.0.0.0
   a=mid:d1
   a=sctp-port:5000
   a=max-message-size:65536
        

|answer-B1-candidate-1| looks like:

| Answer-B1-Candidate-1 |見た目:

   ufrag 7sFv
   index 0
   mid   a1
   attr  candidate:1 1 udp 2113929471 203.0.113.200 10200 typ host
        

|answer-B1-candidate-2| looks like:

| Answer-B1-candidate-2 |見た目:

   ufrag 7sFv
   index 0
   mid   a1
   attr  candidate:1 1 udp 1845494015 198.51.100.200 11200 typ srflx
                   raddr 203.0.113.200 rport 10200
        

|answer-B1-candidate-3| looks like:

| Answer-B1-candidate-3 |見た目:

   ufrag 7sFv
   index 0
   mid   a1
   attr  candidate:1 1 udp 255 192.0.2.200 12200 typ relay
                   raddr 198.51.100.200 rport 11200
        

The SDP for |offer-B2| is shown below. In addition to the new "m=" sections for video, both of which are offering FEC and one of which is offering simulcast, note the increment of the version number in the "o=" line; changes to the "c=" line, indicating the local candidate that was selected; and the inclusion of gathered candidates as "a=candidate" lines.

| offer-b2 |のSDP以下に示されています。ビデオ用の新しい「M =」セクションに加えて、どちらもFECを提供しており、そのうちの1つはSimulcastを提供しています。「O =」行のバージョン番号の増分に注意してください。「c =」行の変更。選択されたローカル候補を示します。集められた候補者を「a =候補」の行として含めること。

   v=0
   o=- 7729291447651054566 2 IN IP4 0.0.0.0
   s=-
   t=0 0
   a=ice-options:trickle ice2
   a=group:BUNDLE a1 d1 v1 v2
   a=group:LS a1 v1

   m=audio 12200 UDP/TLS/RTP/SAVPF 96 0 8 97 98
   c=IN IP4 192.0.2.200
   a=mid:a1
   a=sendrecv
   a=rtpmap:96 opus/48000/2
   a=rtpmap:0 PCMU/8000
   a=rtpmap:8 PCMA/8000
   a=rtpmap:97 telephone-event/8000
   a=rtpmap:98 telephone-event/48000
   a=fmtp:97 0-15
   a=fmtp:98 0-15
   a=maxptime:120
   a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid
   a=extmap:2 urn:ietf:params:rtp-hdrext:ssrc-audio-level
   a=msid:71317484-2ed4-49d7-9eb7-1414322a7aae
   a=ice-ufrag:7sFv
   a=ice-pwd:dOTZKZNVlO9RSGsEGM63JXT2
   a=fingerprint:sha-256
                 7B:8B:F0:65:5F:78:E2:51:3B:AC:6F:F3:3F:46:1B:35:
                 DC:B8:5F:64:1A:24:C2:43:F0:A1:58:D0:A1:2C:19:08
   a=setup:actpass
   a=tls-id:7a25ab85b195acaf3121f5a8ab4f0f71
   a=rtcp-mux
   a=rtcp-mux-only
   a=rtcp-rsize
   a=candidate:1 1 udp 2113929471 203.0.113.200 10200 typ host
   a=candidate:1 1 udp 1845494015 198.51.100.200 11200 typ srflx
               raddr 203.0.113.200 rport 10200
   a=candidate:1 1 udp 255 192.0.2.200 12200 typ relay
               raddr 198.51.100.200 rport 11200
   a=end-of-candidates

   m=application 12200 UDP/DTLS/SCTP webrtc-datachannel
   c=IN IP4 192.0.2.200
   a=mid:d1
   a=sctp-port:5000
   a=max-message-size:65536

   m=video 12200 UDP/TLS/RTP/SAVPF 100 101 102 103 104
   c=IN IP4 192.0.2.200
   a=mid:v1
   a=sendrecv
   a=rtpmap:100 VP8/90000
   a=rtpmap:101 H264/90000
   a=fmtp:101 packetization-mode=1;profile-level-id=42e01f
   a=rtpmap:102 rtx/90000
   a=fmtp:102 apt=100
   a=rtpmap:103 rtx/90000
   a=fmtp:103 apt=101
   a=rtpmap:104 flexfec/90000
   a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid
   a=extmap:3 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id
   a=rtcp-fb:100 ccm fir
   a=rtcp-fb:100 nack
   a=rtcp-fb:100 nack pli
   a=msid:71317484-2ed4-49d7-9eb7-1414322a7aae
   a=rid:1 send
   a=rid:2 send
   a=rid:3 send
   a=simulcast:send 1;2;3

   m=video 12200 UDP/TLS/RTP/SAVPF 100 101 102 103 104
   c=IN IP4 192.0.2.200
   a=mid:v2
   a=sendrecv
   a=rtpmap:100 VP8/90000
   a=rtpmap:101 H264/90000
   a=fmtp:101 packetization-mode=1;profile-level-id=42e01f
   a=rtpmap:102 rtx/90000
   a=fmtp:102 apt=100
   a=rtpmap:103 rtx/90000
   a=fmtp:103 apt=101
   a=rtpmap:104 flexfec/90000
   a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid
   a=extmap:3 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id
   a=rtcp-fb:100 ccm fir
   a=rtcp-fb:100 nack
   a=rtcp-fb:100 nack pli
   a=msid:81317484-2ed4-49d7-9eb7-1414322a7aae
        

The SDP for |answer-B2| is shown below. In addition to the acceptance of the video "m=" sections, the use of "a=recvonly" to indicate one-way video, and the use of "a=imageattr" to limit the received resolution, note the use of "a=setup:passive" to maintain the existing DTLS roles.

|回答-B2 |のSDP以下に示されています。ビデオ「m =」セクションの受け入れに加えて、「a = recvonly」の使用を行うための一方向のビデオを示すこと、および受信した解像度を制限するための「a = imageattr」の使用に加えて、「a」の使用に注意してください。=セットアップ:既存のDTLSロールを維持するためのパッシブ」。

   v=0
   o=- 4962303333179871723 2 IN IP4 0.0.0.0
   s=-
   t=0 0
   a=ice-options:trickle ice2
   a=group:BUNDLE a1 d1 v1 v2
   a=group:LS a1 v1

   m=audio 12100 UDP/TLS/RTP/SAVPF 96 0 8 97 98
   c=IN IP4 192.0.2.100
   a=mid:a1
   a=sendrecv
   a=rtpmap:96 opus/48000/2
   a=rtpmap:0 PCMU/8000
   a=rtpmap:8 PCMA/8000
   a=rtpmap:97 telephone-event/8000
   a=rtpmap:98 telephone-event/48000
   a=fmtp:97 0-15
   a=fmtp:98 0-15
   a=maxptime:120
   a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid
   a=extmap:2 urn:ietf:params:rtp-hdrext:ssrc-audio-level
   a=msid:57017fee-b6c1-4162-929c-a25110252400
   a=ice-ufrag:ATEn
   a=ice-pwd:AtSK0WpNtpUjkY4+86js7ZQl
   a=fingerprint:sha-256
                 29:E2:1C:3B:4B:9F:81:E6:B8:5C:F4:A5:A8:D8:73:04:
                 BB:05:2F:70:9F:04:A9:0E:05:E9:26:33:E8:70:88:A2
   a=setup:passive
   a=tls-id:17f0f4ba8a5f1213faca591b58ba52a7
   a=rtcp-mux
   a=rtcp-mux-only
   a=rtcp-rsize
   a=candidate:1 1 udp 2113929471 203.0.113.100 10100 typ host
   a=candidate:1 1 udp 1845494015 198.51.100.100 11100 typ srflx
               raddr 203.0.113.100 rport 10100
   a=candidate:1 1 udp 255 192.0.2.100 12100 typ relay
               raddr 198.51.100.100 rport 11100
   a=end-of-candidates

   m=application 12100 UDP/DTLS/SCTP webrtc-datachannel
   c=IN IP4 192.0.2.100
   a=mid:d1
   a=sctp-port:5000
   a=max-message-size:65536

   m=video 12100 UDP/TLS/RTP/SAVPF 100 101 102 103
   c=IN IP4 192.0.2.100
   a=mid:v1
   a=recvonly
   a=rtpmap:100 VP8/90000
   a=rtpmap:101 H264/90000
   a=fmtp:101 packetization-mode=1;profile-level-id=42e01f
   a=rtpmap:102 rtx/90000
   a=fmtp:102 apt=100
   a=rtpmap:103 rtx/90000
   a=fmtp:103 apt=101
   a=imageattr:100 recv [x=[48:1920],y=[48:1080],q=1.0]
   a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid
   a=extmap:3 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id
   a=rtcp-fb:100 ccm fir
   a=rtcp-fb:100 nack
   a=rtcp-fb:100 nack pli

   m=video 12100 UDP/TLS/RTP/SAVPF 100 101 102 103
   c=IN IP4 192.0.2.100
   a=mid:v2
   a=recvonly
   a=rtpmap:100 VP8/90000
   a=rtpmap:101 H264/90000
   a=fmtp:101 packetization-mode=1;profile-level-id=42e01f
   a=rtpmap:102 rtx/90000
   a=fmtp:102 apt=100
   a=rtpmap:103 rtx/90000
   a=fmtp:103 apt=101
   a=imageattr:100 recv [x=[48:1920],y=[48:1080],q=1.0]
   a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid
   a=extmap:3 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id
   a=rtcp-fb:100 ccm fir
   a=rtcp-fb:100 nack
   a=rtcp-fb:100 nack pli
        
7.3. Early Transport Warmup Example
7.3. 早期輸送ウォームアップの例

This example demonstrates the early-warmup technique described in Section 4.1.10.1. Here, Alice's endpoint sends an offer to Bob's endpoint to start an audio/video call. Bob immediately responds with an answer that accepts the audio/video "m=" sections but marks them as "sendonly" (from his perspective), meaning that Alice will not yet send media. This allows the JSEP implementation to start negotiating ICE and DTLS immediately. Bob's endpoint then prompts him to answer the call, and when he does, his endpoint sends a second offer, which enables the audio and video "m=" sections, and thereby bidirectional media transmission. The advantage of such a flow is that as soon as the first answer is received, the implementation can proceed with ICE and DTLS negotiation and establish the session transport. If the transport setup completes before the second offer is sent, then media can be transmitted by the callee immediately upon answering the call, minimizing perceived post-dial delay. The second offer/answer exchange can also change the preferred codecs or other session parameters.

この例は、セクション4.1.10.1で説明されている初期の装飾手法を示しています。ここで、アリスのエンドポイントは、ボブのエンドポイントにオファーを送信して、オーディオ/ビデオ通話を開始します。ボブはすぐに、オーディオ/ビデオ「M =」セクションを受け入れる回答で応答しますが、「センドリー」(彼の観点から)としてマークします。つまり、アリスはまだメディアを送信しません。これにより、JSEPの実装により、すぐにICEとDTLの交渉を開始できます。その後、ボブのエンドポイントはコールに応答するように促し、彼がそうするとき、彼のエンドポイントは2番目のオファーを送信します。これにより、オーディオとビデオの「M =」セクションが可能になり、それによって双方向のメディア送信が可能になります。このようなフローの利点は、最初の回答を受信するとすぐに、実装が氷とDTLの交渉を進めてセッション輸送を確立できることです。2回目のオファーが送信される前にトランスポートセットアップが完了した場合、メディアはコールに応答するとすぐにCalleeによって送信できます。2番目のオファー/回答交換は、優先コーデックまたはその他のセッションパラメーターを変更することもできます。

This example also makes use of the "relay" ICE candidate policy described in Section 3.5.3 to minimize the ICE gathering and checking needed.

この例では、セクション3.5.3で説明されている「リレー」アイス候補ポリシーを使用して、必要な氷の収集とチェックを最小限に抑えます。

   //                  set up local media state
   AliceJS->AliceUA:   create new PeerConnection with "relay" ICE policy
   AliceJS->AliceUA:   addTrack with two tracks: audio and video
   AliceJS->AliceUA:   createOffer to get |offer-C1|
   AliceJS->AliceUA:   setLocalDescription with |offer-C1|

   //                  |offer-C1| is sent over signaling protocol to Bob
   AliceJS->WebServer: signaling with |offer-C1|
   WebServer->BobJS:   signaling with |offer-C1|

   //                  |offer-C1| arrives at Bob
   BobJS->BobUA:       create new PeerConnection with "relay" ICE policy
   BobJS->BobUA:       setRemoteDescription with |offer-C1|
   BobUA->BobJS:       ontrack events for audio and video

   //                  a relay candidate is sent to Bob
   AliceUA->AliceJS:   onicecandidate (relay) |offer-C1-candidate-1|
   AliceJS->WebServer: signaling with |offer-C1-candidate-1|

   WebServer->BobJS:   signaling with |offer-C1-candidate-1|
   BobJS->BobUA:       addIceCandidate with |offer-C1-candidate-1|

   //                  Bob prepares an early answer to warm up the
   //                  transport
   BobJS->BobUA:       addTransceiver with null audio and video tracks
   BobJS->BobUA:       transceiver.setDirection(sendonly) for both
   BobJS->BobUA:       createAnswer
   BobJS->BobUA:       setLocalDescription with answer

   //                  |answer-C1| is sent over signaling protocol
   //                  to Alice
   BobJS->WebServer:   signaling with |answer-C1|
   WebServer->AliceJS: signaling with |answer-C1|

   //                  |answer-C1| (sendonly) arrives at Alice
   AliceJS->AliceUA:   setRemoteDescription with |answer-C1|
   AliceUA->AliceJS:   ontrack events for audio and video

   //                  a relay candidate is sent to Alice
   BobUA->BobJS:       onicecandidate (relay) |answer-B1-candidate-1|
   BobJS->WebServer:   signaling with |answer-B1-candidate-1|

   WebServer->AliceJS: signaling with |answer-B1-candidate-1|
   AliceJS->AliceUA:   addIceCandidate with |answer-B1-candidate-1|

   //                  ICE and DTLS establish while call is ringing

   //                  Bob accepts call, starts media, and sends
   //                  new offer
   BobJS->BobUA:       transceiver.setTrack with audio and video tracks
   BobUA->AliceUA:     media sent from Bob to Alice
   BobJS->BobUA:       transceiver.setDirection(sendrecv) for both
                       transceivers
   BobJS->BobUA:       createOffer
   BobJS->BobUA:       setLocalDescription with offer

   //                  |offer-C2| is sent over signaling protocol
   //                  to Alice
   BobJS->WebServer:   signaling with |offer-C2|
   WebServer->AliceJS: signaling with |offer-C2|

   //                  |offer-C2| (sendrecv) arrives at Alice
   AliceJS->AliceUA:   setRemoteDescription with |offer-C2|
   AliceJS->AliceUA:   createAnswer
   AliceJS->AliceUA:   setLocalDescription with |answer-C2|
   AliceUA->BobUA:     media sent from Alice to Bob

   //                  |answer-C2| is sent over signaling protocol
   //                  to Bob
   AliceJS->WebServer: signaling with |answer-C2|
   WebServer->BobJS:   signaling with |answer-C2|
   BobJS->BobUA:       setRemoteDescription with |answer-C2|
        

The SDP for |offer-C1| looks like:

| offer-c1 |のSDP見た目:

   v=0
   o=- 1070771854436052752 1 IN IP4 0.0.0.0
   s=-
   t=0 0
   a=ice-options:trickle ice2
   a=group:BUNDLE a1 v1
   a=group:LS a1 v1

   m=audio 9 UDP/TLS/RTP/SAVPF 96 0 8 97 98
   c=IN IP4 0.0.0.0
   a=mid:a1
   a=sendrecv
   a=rtpmap:96 opus/48000/2
   a=rtpmap:0 PCMU/8000
   a=rtpmap:8 PCMA/8000
   a=rtpmap:97 telephone-event/8000
   a=rtpmap:98 telephone-event/48000
   a=fmtp:97 0-15
   a=fmtp:98 0-15
   a=maxptime:120
   a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid
   a=extmap:2 urn:ietf:params:rtp-hdrext:ssrc-audio-level
   a=msid:bbce3ba6-abfc-ac63-d00a-e15b286f8fce
   a=ice-ufrag:4ZcD
   a=ice-pwd:ZaaG6OG7tCn4J/lehAGz+HHD
   a=fingerprint:sha-256
                 C4:68:F8:77:6A:44:F1:98:6D:7C:9F:47:EB:E3:34:A4:
                 0A:AA:2D:49:08:28:70:2E:1F:AE:18:7D:4E:3E:66:BF
   a=setup:actpass
   a=tls-id:9e5b948ade9c3d41de6617b68f769e55
   a=rtcp-mux
   a=rtcp-mux-only
   a=rtcp-rsize

   m=video 0 UDP/TLS/RTP/SAVPF 100 101 102 103
   c=IN IP4 0.0.0.0
   a=mid:v1
   a=sendrecv
   a=rtpmap:100 VP8/90000
   a=rtpmap:101 H264/90000
   a=fmtp:101 packetization-mode=1;profile-level-id=42e01f
   a=rtpmap:102 rtx/90000
   a=fmtp:102 apt=100
   a=rtpmap:103 rtx/90000
   a=fmtp:103 apt=101
   a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid
   a=extmap:3 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id
   a=rtcp-fb:100 ccm fir
   a=rtcp-fb:100 nack
   a=rtcp-fb:100 nack pli
   a=msid:bbce3ba6-abfc-ac63-d00a-e15b286f8fce
   a=bundle-only
        

|offer-C1-candidate-1| looks like:

| offer-c1-candidate-1 |見た目:

   ufrag 4ZcD
   index 0
   mid   a1
   attr  candidate:1 1 udp 255 192.0.2.100 12100 typ relay
                   raddr 0.0.0.0 rport 0
        

The SDP for |answer-C1| looks like:

|回答-C1 |のSDP見た目:

   v=0
   o=- 6386516489780559513 1 IN IP4 0.0.0.0
   s=-
   t=0 0
   a=ice-options:trickle ice2
   a=group:BUNDLE a1 v1
   a=group:LS a1 v1

   m=audio 9 UDP/TLS/RTP/SAVPF 96 0 8 97 98
   c=IN IP4 0.0.0.0
   a=mid:a1
   a=sendonly
   a=rtpmap:96 opus/48000/2
   a=rtpmap:0 PCMU/8000
   a=rtpmap:8 PCMA/8000
   a=rtpmap:97 telephone-event/8000
   a=rtpmap:98 telephone-event/48000
   a=fmtp:97 0-15
   a=fmtp:98 0-15
   a=maxptime:120
   a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid
   a=extmap:2 urn:ietf:params:rtp-hdrext:ssrc-audio-level
   a=msid:751f239e-4ae0-c549-aa3d-890de772998b
   a=ice-ufrag:TpaA
   a=ice-pwd:t2Ouhc67y8JcCaYZxUUTgKw/
   a=fingerprint:sha-256
                 A2:F3:A5:6D:4C:8C:1E:B2:62:10:4A:F6:70:61:C4:FC:
                 3C:E0:01:D6:F3:24:80:74:DA:7C:3E:50:18:7B:CE:4D
   a=setup:active
   a=tls-id:55e967f86b7166ed14d3c9eda849b5e9
   a=rtcp-mux
   a=rtcp-mux-only
   a=rtcp-rsize

   m=video 9 UDP/TLS/RTP/SAVPF 100 101 102 103
   c=IN IP4 0.0.0.0
   a=mid:v1
   a=sendonly
   a=rtpmap:100 VP8/90000
   a=rtpmap:101 H264/90000
   a=fmtp:101 packetization-mode=1;profile-level-id=42e01f
   a=rtpmap:102 rtx/90000
   a=fmtp:102 apt=100
   a=rtpmap:103 rtx/90000
   a=fmtp:103 apt=101
   a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid
   a=extmap:3 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id
   a=rtcp-fb:100 ccm fir
   a=rtcp-fb:100 nack
   a=rtcp-fb:100 nack pli
   a=msid:751f239e-4ae0-c549-aa3d-890de772998b
        

|answer-C1-candidate-1| looks like:

| Answer-C1-Candidate-1 |見た目:

   ufrag TpaA
   index 0
   mid   a1
   attr  candidate:1 1 udp 255 192.0.2.200 12200 typ relay
                   raddr 0.0.0.0 rport 0
        

The SDP for |offer-C2| looks like:

| offer-C2 |のSDP見た目:

   v=0
   o=- 6386516489780559513 2 IN IP4 0.0.0.0
   s=-
   t=0 0
   a=ice-options:trickle ice2
   a=group:BUNDLE a1 v1
   a=group:LS a1 v1

   m=audio 12200 UDP/TLS/RTP/SAVPF 96 0 8 97 98
   c=IN IP4 192.0.2.200
   a=mid:a1
   a=sendrecv
   a=rtpmap:96 opus/48000/2
   a=rtpmap:0 PCMU/8000
   a=rtpmap:8 PCMA/8000
   a=rtpmap:97 telephone-event/8000
   a=rtpmap:98 telephone-event/48000
   a=fmtp:97 0-15
   a=fmtp:98 0-15
   a=maxptime:120
   a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid
   a=extmap:2 urn:ietf:params:rtp-hdrext:ssrc-audio-level
   a=msid:751f239e-4ae0-c549-aa3d-890de772998b
   a=ice-ufrag:TpaA
   a=ice-pwd:t2Ouhc67y8JcCaYZxUUTgKw/
   a=fingerprint:sha-256
                 A2:F3:A5:6D:4C:8C:1E:B2:62:10:4A:F6:70:61:C4:FC:
                 3C:E0:01:D6:F3:24:80:74:DA:7C:3E:50:18:7B:CE:4D
   a=setup:actpass
   a=tls-id:55e967f86b7166ed14d3c9eda849b5e9
   a=rtcp-mux
   a=rtcp-mux-only
   a=rtcp-rsize
   a=candidate:1 1 udp 255 192.0.2.200 12200 typ relay
               raddr 0.0.0.0 rport 0
   a=end-of-candidates

   m=video 12200 UDP/TLS/RTP/SAVPF 100 101 102 103
   c=IN IP4 192.0.2.200
   a=mid:v1
   a=sendrecv
   a=rtpmap:100 VP8/90000
   a=rtpmap:101 H264/90000
   a=fmtp:101 packetization-mode=1;profile-level-id=42e01f
   a=rtpmap:102 rtx/90000
   a=fmtp:102 apt=100
   a=rtpmap:103 rtx/90000
   a=fmtp:103 apt=101
   a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid
   a=extmap:3 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id
   a=rtcp-fb:100 ccm fir
   a=rtcp-fb:100 nack
   a=rtcp-fb:100 nack pli
   a=msid:751f239e-4ae0-c549-aa3d-890de772998b
        

The SDP for |answer-C2| looks like:

|回答-C2 |のSDP見た目:

   v=0
   o=- 1070771854436052752 2 IN IP4 0.0.0.0
   s=-
   t=0 0
   a=ice-options:trickle ice2
   a=group:BUNDLE a1 v1
   a=group:LS a1 v1

   m=audio 12100 UDP/TLS/RTP/SAVPF 96 0 8 97 98
   c=IN IP4 192.0.2.100
   a=mid:a1
   a=sendrecv
   a=rtpmap:96 opus/48000/2
   a=rtpmap:0 PCMU/8000
   a=rtpmap:8 PCMA/8000
   a=rtpmap:97 telephone-event/8000
   a=rtpmap:98 telephone-event/48000
   a=fmtp:97 0-15
   a=fmtp:98 0-15
   a=maxptime:120
   a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid
   a=extmap:2 urn:ietf:params:rtp-hdrext:ssrc-audio-level
   a=msid:bbce3ba6-abfc-ac63-d00a-e15b286f8fce
   a=ice-ufrag:4ZcD
   a=ice-pwd:ZaaG6OG7tCn4J/lehAGz+HHD
   a=fingerprint:sha-256
                 C4:68:F8:77:6A:44:F1:98:6D:7C:9F:47:EB:E3:34:A4:
                 0A:AA:2D:49:08:28:70:2E:1F:AE:18:7D:4E:3E:66:BF
   a=setup:passive
   a=tls-id:9e5b948ade9c3d41de6617b68f769e55
   a=rtcp-mux
   a=rtcp-mux-only
   a=rtcp-rsize
   a=candidate:1 1 udp 255 192.0.2.100 12100 typ relay
               raddr 0.0.0.0 rport 0
   a=end-of-candidates

   m=video 12100 UDP/TLS/RTP/SAVPF 100 101 102 103
   c=IN IP4 192.0.2.100
   a=mid:v1
   a=sendrecv
   a=rtpmap:100 VP8/90000
   a=rtpmap:101 H264/90000
   a=fmtp:101 packetization-mode=1;profile-level-id=42e01f
   a=rtpmap:102 rtx/90000
   a=fmtp:102 apt=100
   a=rtpmap:103 rtx/90000
   a=fmtp:103 apt=101
   a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid
   a=extmap:3 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id
   a=rtcp-fb:100 ccm fir
   a=rtcp-fb:100 nack
   a=rtcp-fb:100 nack pli
   a=msid:bbce3ba6-abfc-ac63-d00a-e15b286f8fce
        
8. Security Considerations
8. セキュリティに関する考慮事項

The IETF has published separate documents [RFC8827] [RFC8826] describing the security architecture for WebRTC as a whole. The remainder of this section describes security considerations for this document.

IETFは、WeBRTC全体のセキュリティアーキテクチャを説明する個別のドキュメント[RFC8827] [RFC8826]を公開しています。このセクションの残りの部分では、このドキュメントのセキュリティ上の考慮事項について説明します。

While formally the JSEP interface is an API, it is better to think of it as an Internet protocol, with the application JavaScript being untrustworthy from the perspective of the JSEP implementation. Thus, the threat model of [RFC3552] applies. In particular, JavaScript can call the API in any order and with any inputs, including malicious ones. This is particularly relevant when one considers the SDP that is passed to setLocalDescription. While correct API usage requires that the application pass in SDP that was derived from createOffer or createAnswer, there is no guarantee that applications do so. The JSEP implementation MUST be prepared for the JavaScript to pass in bogus data instead.

正式にはJSEPインターフェイスはAPIですが、Application JavaScriptはJSEP実装の観点からは信頼できないものであるため、インターネットプロトコルと考える方が良いです。したがって、[RFC3552]の脅威モデルが適用されます。特に、JavaScriptは、APIをあらゆる順序で、および悪意のある入力を含む任意の入力で呼び出すことができます。これは、SetlocalDescriptionに渡されるSDPを考慮した場合に特に関連します。正しいAPIの使用には、createofferまたはcreateanswerから派生したSDPのアプリケーションパスが必要ですが、アプリケーションがそうするという保証はありません。JSEP実装は、JavaScriptが代わりに偽のデータを渡すために準備する必要があります。

Conversely, the application programmer needs to be aware that the JavaScript does not have complete control of endpoint behavior. One case that bears particular mention is that editing ICE candidates out of the SDP or suppressing trickled candidates does not have the expected behavior: implementations will still perform checks from those candidates even if they are not sent to the other side. Thus, for instance, it is not possible to prevent the remote peer from learning an endpoint's public IP address by removing server-reflexive candidates. Endpoints that wish to conceal their public IP address MUST instead configure the ICE agent to use only relay candidates.

逆に、アプリケーションプログラマーは、JavaScriptがエンドポイントの動作を完全に制御していないことに注意する必要があります。特に言及されている1つのケースは、ICE候補者をSDPから編集するか、抑制する候補者を抑制しても予想される動作を持っていないということです。したがって、たとえば、サーバー反射候補を削除して、リモートピアがエンドポイントのパブリックIPアドレスを学習するのを防ぐことはできません。代わりに、公開IPアドレスを隠したいエンドポイントは、リレー候補のみを使用するようにICEエージェントを構成する必要があります。

9. IANA Considerations
9. IANAの考慮事項

This document has no IANA actions.

このドキュメントにはIANAアクションがありません。

10. References
10. 参考文献
10.1. Normative References
10.1. 引用文献
   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
              Requirement Levels", BCP 14, RFC 2119,
              DOI 10.17487/RFC2119, March 1997,
              <https://www.rfc-editor.org/info/rfc2119>.
        
   [RFC3261]  Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston,
              A., Peterson, J., Sparks, R., Handley, M., and E.
              Schooler, "SIP: Session Initiation Protocol", RFC 3261,
              DOI 10.17487/RFC3261, June 2002,
              <https://www.rfc-editor.org/info/rfc3261>.
        
   [RFC3264]  Rosenberg, J. and H. Schulzrinne, "An Offer/Answer Model
              with Session Description Protocol (SDP)", RFC 3264,
              DOI 10.17487/RFC3264, June 2002,
              <https://www.rfc-editor.org/info/rfc3264>.
        
   [RFC3552]  Rescorla, E. and B. Korver, "Guidelines for Writing RFC
              Text on Security Considerations", BCP 72, RFC 3552,
              DOI 10.17487/RFC3552, July 2003,
              <https://www.rfc-editor.org/info/rfc3552>.
        
   [RFC3605]  Huitema, C., "Real Time Control Protocol (RTCP) attribute
              in Session Description Protocol (SDP)", RFC 3605,
              DOI 10.17487/RFC3605, October 2003,
              <https://www.rfc-editor.org/info/rfc3605>.
        
   [RFC3711]  Baugher, M., McGrew, D., Naslund, M., Carrara, E., and K.
              Norrman, "The Secure Real-time Transport Protocol (SRTP)",
              RFC 3711, DOI 10.17487/RFC3711, March 2004,
              <https://www.rfc-editor.org/info/rfc3711>.
        
   [RFC3890]  Westerlund, M., "A Transport Independent Bandwidth
              Modifier for the Session Description Protocol (SDP)",
              RFC 3890, DOI 10.17487/RFC3890, September 2004,
              <https://www.rfc-editor.org/info/rfc3890>.
        
   [RFC4145]  Yon, D. and G. Camarillo, "TCP-Based Media Transport in
              the Session Description Protocol (SDP)", RFC 4145,
              DOI 10.17487/RFC4145, September 2005,
              <https://www.rfc-editor.org/info/rfc4145>.
        
   [RFC4566]  Handley, M., Jacobson, V., and C. Perkins, "SDP: Session
              Description Protocol", RFC 4566, DOI 10.17487/RFC4566,
              July 2006, <https://www.rfc-editor.org/info/rfc4566>.
        
   [RFC4585]  Ott, J., Wenger, S., Sato, N., Burmeister, C., and J. Rey,
              "Extended RTP Profile for Real-time Transport Control
              Protocol (RTCP)-Based Feedback (RTP/AVPF)", RFC 4585,
              DOI 10.17487/RFC4585, July 2006,
              <https://www.rfc-editor.org/info/rfc4585>.
        
   [RFC5124]  Ott, J. and E. Carrara, "Extended Secure RTP Profile for
              Real-time Transport Control Protocol (RTCP)-Based Feedback
              (RTP/SAVPF)", RFC 5124, DOI 10.17487/RFC5124, February
              2008, <https://www.rfc-editor.org/info/rfc5124>.
        
   [RFC5285]  Singer, D. and H. Desineni, "A General Mechanism for RTP
              Header Extensions", RFC 5285, DOI 10.17487/RFC5285, July
              2008, <https://www.rfc-editor.org/info/rfc5285>.
        
   [RFC5761]  Perkins, C. and M. Westerlund, "Multiplexing RTP Data and
              Control Packets on a Single Port", RFC 5761,
              DOI 10.17487/RFC5761, April 2010,
              <https://www.rfc-editor.org/info/rfc5761>.
        
   [RFC5888]  Camarillo, G. and H. Schulzrinne, "The Session Description
              Protocol (SDP) Grouping Framework", RFC 5888,
              DOI 10.17487/RFC5888, June 2010,
              <https://www.rfc-editor.org/info/rfc5888>.
        
   [RFC6236]  Johansson, I. and K. Jung, "Negotiation of Generic Image
              Attributes in the Session Description Protocol (SDP)",
              RFC 6236, DOI 10.17487/RFC6236, May 2011,
              <https://www.rfc-editor.org/info/rfc6236>.
        
   [RFC6347]  Rescorla, E. and N. Modadugu, "Datagram Transport Layer
              Security Version 1.2", RFC 6347, DOI 10.17487/RFC6347,
              January 2012, <https://www.rfc-editor.org/info/rfc6347>.
        
   [RFC6716]  Valin, JM., Vos, K., and T. Terriberry, "Definition of the
              Opus Audio Codec", RFC 6716, DOI 10.17487/RFC6716,
              September 2012, <https://www.rfc-editor.org/info/rfc6716>.
        
   [RFC6904]  Lennox, J., "Encryption of Header Extensions in the Secure
              Real-time Transport Protocol (SRTP)", RFC 6904,
              DOI 10.17487/RFC6904, April 2013,
              <https://www.rfc-editor.org/info/rfc6904>.
        
   [RFC7160]  Petit-Huguenin, M. and G. Zorn, Ed., "Support for Multiple
              Clock Rates in an RTP Session", RFC 7160,
              DOI 10.17487/RFC7160, April 2014,
              <https://www.rfc-editor.org/info/rfc7160>.
        
   [RFC7587]  Spittka, J., Vos, K., and JM. Valin, "RTP Payload Format
              for the Opus Speech and Audio Codec", RFC 7587,
              DOI 10.17487/RFC7587, June 2015,
              <https://www.rfc-editor.org/info/rfc7587>.
        
   [RFC7742]  Roach, A.B., "WebRTC Video Processing and Codec
              Requirements", RFC 7742, DOI 10.17487/RFC7742, March 2016,
              <https://www.rfc-editor.org/info/rfc7742>.
        
   [RFC7850]  Nandakumar, S., "Registering Values of the SDP 'proto'
              Field for Transporting RTP Media over TCP under Various
              RTP Profiles", RFC 7850, DOI 10.17487/RFC7850, April 2016,
              <https://www.rfc-editor.org/info/rfc7850>.
        
   [RFC7874]  Valin, JM. and C. Bran, "WebRTC Audio Codec and Processing
              Requirements", RFC 7874, DOI 10.17487/RFC7874, May 2016,
              <https://www.rfc-editor.org/info/rfc7874>.
        
   [RFC8108]  Lennox, J., Westerlund, M., Wu, Q., and C. Perkins,
              "Sending Multiple RTP Streams in a Single RTP Session",
              RFC 8108, DOI 10.17487/RFC8108, March 2017,
              <https://www.rfc-editor.org/info/rfc8108>.
        
   [RFC8122]  Lennox, J. and C. Holmberg, "Connection-Oriented Media
              Transport over the Transport Layer Security (TLS) Protocol
              in the Session Description Protocol (SDP)", RFC 8122,
              DOI 10.17487/RFC8122, March 2017,
              <https://www.rfc-editor.org/info/rfc8122>.
        
   [RFC8174]  Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
              2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
              May 2017, <https://www.rfc-editor.org/info/rfc8174>.
        
   [RFC8445]  Keranen, A., Holmberg, C., and J. Rosenberg, "Interactive
              Connectivity Establishment (ICE): A Protocol for Network
              Address Translator (NAT) Traversal", RFC 8445,
              DOI 10.17487/RFC8445, July 2018,
              <https://www.rfc-editor.org/info/rfc8445>.
        
   [RFC8826]  Rescorla, E., "Security Considerations for WebRTC",
              RFC 8826, DOI 10.17487/RFC8826, January 2021,
              <https://www.rfc-editor.org/info/rfc8826>.
        
   [RFC8827]  Rescorla, E., "WebRTC Security Architecture", RFC 8827,
              DOI 10.17487/RFC8827, January 2021,
              <https://www.rfc-editor.org/info/rfc8827>.
        
   [RFC8829]  Uberti, J., Jennings, C., and E. Rescorla, Ed.,
              "JavaScript Session Establishment Protocol (JSEP)",
              RFC 8829, DOI 10.17487/RFC8829, January 2021,
              <https://www.rfc-editor.org/info/rfc8829>.
        
   [RFC8830]  Alvestrand, H., "WebRTC MediaStream Identification in the
              Session Description Protocol", RFC 8830,
              DOI 10.17487/RFC8830, January 2021,
              <https://www.rfc-editor.org/info/rfc8830>.
        
   [RFC8834]  Perkins, C., Westerlund, M., and J. Ott, "Media Transport
              and Use of RTP in WebRTC", RFC 8834, DOI 10.17487/RFC8834,
              January 2021, <https://www.rfc-editor.org/info/rfc8834>.
        
   [RFC8838]  Ivov, E., Uberti, J., and P. Saint-Andre, "Trickle ICE:
              Incremental Provisioning of Candidates for the Interactive
              Connectivity Establishment (ICE) Protocol", RFC 8838,
              DOI 10.17487/RFC8838, January 2021,
              <https://www.rfc-editor.org/info/rfc8838>.
        
   [RFC8839]  Petit-Huguenin, M., Nandakumar, S., Holmberg, C., Keränen,
              A., and R. Shpount, "Session Description Protocol (SDP)
              Offer/Answer Procedures for Interactive Connectivity
              Establishment (ICE)", RFC 8839, DOI 10.17487/RFC8839,
              January 2021, <https://www.rfc-editor.org/info/rfc8839>.
        
   [RFC8840]  Ivov, E., Stach, T., Marocco, E., and C. Holmberg, "A
              Session Initiation Protocol (SIP) Usage for Incremental
              Provisioning of Candidates for the Interactive
              Connectivity Establishment (Trickle ICE)", RFC 8840,
              DOI 10.17487/RFC8840, January 2021,
              <https://www.rfc-editor.org/info/rfc8840>.
        
   [RFC8841]  Holmberg, C., Shpount, R., Loreto, S., and G. Camarillo,
              "Session Description Protocol (SDP) Offer/Answer
              Procedures for Stream Control Transmission Protocol (SCTP)
              over Datagram Transport Layer Security (DTLS) Transport",
              RFC 8841, DOI 10.17487/RFC8841, January 2021,
              <https://www.rfc-editor.org/info/rfc8841>.
        
   [RFC8842]  Holmberg, C. and R. Shpount, "Session Description Protocol
              (SDP) Offer/Answer Considerations for Datagram Transport
              Layer Security (DTLS) and Transport Layer Security (TLS)",
              RFC 8842, DOI 10.17487/RFC8842, January 2021,
              <https://www.rfc-editor.org/info/rfc8842>.
        
   [RFC8851]  Roach, A.B., Ed., "RTP Payload Format Restrictions",
              RFC 8851, DOI 10.17487/RFC8851, January 2021,
              <https://www.rfc-editor.org/info/rfc8851>.
        
   [RFC8852]  Roach, A.B., Nandakumar, S., and P. Thatcher, "RTP Stream
              Identifier Source Description (SDES)", RFC 8852,
              DOI 10.17487/RFC8852, January 2021,
              <https://www.rfc-editor.org/info/rfc8852>.
        
   [RFC8853]  Burman, B., Westerlund, M., Nandakumar, S., and M. Zanaty,
              "Using Simulcast in Session Description Protocol (SDP) and
              RTP Sessions", RFC 8853, DOI 10.17487/RFC8853, January
              2021, <https://www.rfc-editor.org/info/rfc8853>.
        
   [RFC8854]  Uberti, J., "WebRTC Forward Error Correction
              Requirements", RFC 8854, DOI 10.17487/RFC8854, January
              2021, <https://www.rfc-editor.org/info/rfc8854>.
        
   [RFC8858]  Holmberg, C., "Indicating Exclusive Support of RTP and RTP
              Control Protocol (RTCP) Multiplexing Using the Session
              Description Protocol (SDP)", RFC 8858,
              DOI 10.17487/RFC8858, January 2021,
              <https://www.rfc-editor.org/info/rfc8858>.
        
   [RFC8859]  Nandakumar, S., "A Framework for Session Description
              Protocol (SDP) Attributes When Multiplexing", RFC 8859,
              DOI 10.17487/RFC8859, January 2021,
              <https://www.rfc-editor.org/info/rfc8859>.
        
   [RFC9143]  Holmberg, C., Alvestrand, H., and C. Jennings,
              "Negotiating Media Multiplexing Using the Session
              Description Protocol (SDP)", RFC 9143,
              DOI 10.17487/RFC9143, February 2022,
              <https://www.rfc-editor.org/info/rfc9143>.
        
   [RFC9147]  Rescorla, E., Tschofenig, H., and N. Modadugu, "The
              Datagram Transport Layer Security (DTLS) Protocol Version
              1.3", RFC 9147, DOI 10.17487/RFC9147, April 2022,
              <https://www.rfc-editor.org/info/rfc9147>.
        
10.2. Informative References
10.2. 参考引用
   [RFC3389]  Zopf, R., "Real-time Transport Protocol (RTP) Payload for
              Comfort Noise (CN)", RFC 3389, DOI 10.17487/RFC3389,
              September 2002, <https://www.rfc-editor.org/info/rfc3389>.
        
   [RFC3556]  Casner, S., "Session Description Protocol (SDP) Bandwidth
              Modifiers for RTP Control Protocol (RTCP) Bandwidth",
              RFC 3556, DOI 10.17487/RFC3556, July 2003,
              <https://www.rfc-editor.org/info/rfc3556>.
        
   [RFC3960]  Camarillo, G. and H. Schulzrinne, "Early Media and Ringing
              Tone Generation in the Session Initiation Protocol (SIP)",
              RFC 3960, DOI 10.17487/RFC3960, December 2004,
              <https://www.rfc-editor.org/info/rfc3960>.
        
   [RFC4568]  Andreasen, F., Baugher, M., and D. Wing, "Session
              Description Protocol (SDP) Security Descriptions for Media
              Streams", RFC 4568, DOI 10.17487/RFC4568, July 2006,
              <https://www.rfc-editor.org/info/rfc4568>.
        
   [RFC4588]  Rey, J., Leon, D., Miyazaki, A., Varsa, V., and R.
              Hakenberg, "RTP Retransmission Payload Format", RFC 4588,
              DOI 10.17487/RFC4588, July 2006,
              <https://www.rfc-editor.org/info/rfc4588>.
        
   [RFC4733]  Schulzrinne, H. and T. Taylor, "RTP Payload for DTMF
              Digits, Telephony Tones, and Telephony Signals", RFC 4733,
              DOI 10.17487/RFC4733, December 2006,
              <https://www.rfc-editor.org/info/rfc4733>.
        
   [RFC5245]  Rosenberg, J., "Interactive Connectivity Establishment
              (ICE): A Protocol for Network Address Translator (NAT)
              Traversal for Offer/Answer Protocols", RFC 5245,
              DOI 10.17487/RFC5245, April 2010,
              <https://www.rfc-editor.org/info/rfc5245>.
        
   [RFC5506]  Johansson, I. and M. Westerlund, "Support for Reduced-Size
              Real-Time Transport Control Protocol (RTCP): Opportunities
              and Consequences", RFC 5506, DOI 10.17487/RFC5506, April
              2009, <https://www.rfc-editor.org/info/rfc5506>.
        
   [RFC5576]  Lennox, J., Ott, J., and T. Schierl, "Source-Specific
              Media Attributes in the Session Description Protocol
              (SDP)", RFC 5576, DOI 10.17487/RFC5576, June 2009,
              <https://www.rfc-editor.org/info/rfc5576>.
        
   [RFC5763]  Fischl, J., Tschofenig, H., and E. Rescorla, "Framework
              for Establishing a Secure Real-time Transport Protocol
              (SRTP) Security Context Using Datagram Transport Layer
              Security (DTLS)", RFC 5763, DOI 10.17487/RFC5763, May
              2010, <https://www.rfc-editor.org/info/rfc5763>.
        
   [RFC5764]  McGrew, D. and E. Rescorla, "Datagram Transport Layer
              Security (DTLS) Extension to Establish Keys for the Secure
              Real-time Transport Protocol (SRTP)", RFC 5764,
              DOI 10.17487/RFC5764, May 2010,
              <https://www.rfc-editor.org/info/rfc5764>.
        
   [RFC6120]  Saint-Andre, P., "Extensible Messaging and Presence
              Protocol (XMPP): Core", RFC 6120, DOI 10.17487/RFC6120,
              March 2011, <https://www.rfc-editor.org/info/rfc6120>.
        
   [RFC6464]  Lennox, J., Ed., Ivov, E., and E. Marocco, "A Real-time
              Transport Protocol (RTP) Header Extension for Client-to-
              Mixer Audio Level Indication", RFC 6464,
              DOI 10.17487/RFC6464, December 2011,
              <https://www.rfc-editor.org/info/rfc6464>.
        
   [RFC8828]  Uberti, J. and G. Shieh, "WebRTC IP Address Handling
              Requirements", RFC 8828, DOI 10.17487/RFC8828, January
              2021, <https://www.rfc-editor.org/info/rfc8828>.
        
   [RFC8843]  Holmberg, C., Alvestrand, H., and C. Jennings,
              "Negotiating Media Multiplexing Using the Session
              Description Protocol (SDP)", RFC 8843,
              DOI 10.17487/RFC8843, January 2021,
              <https://www.rfc-editor.org/info/rfc8843>.
        
   [SDP4WebRTC]
              Nandakumar, S. and C. F. Jennings, "Annotated Example SDP
              for WebRTC", Work in Progress, Internet-Draft, draft-ietf-
              rtcweb-sdp-14, 17 December 2020,
              <https://datatracker.ietf.org/doc/html/draft-ietf-rtcweb-
              sdp-14>.
        
   [TS26.114] 3GPP, "3rd Generation Partnership Project; Technical
              Specification Group Services and System Aspects; IP
              Multimedia Subsystem (IMS); Multimedia Telephony; Media
              handling and interaction (Release 18)", 3GPP TS 26.114
              V18.6.0, March 2024,
              <https://www.3gpp.org/DynaReport/26114.htm>.
        
   [W3C.webrtc]
              Jennings, C., Ed., Castelli, F., Ed., Boström, H., Ed.,
              and J-I. Bruaroey, Ed., "WebRTC: Real-time Communication
              Between Browsers", W3C Recommendation, March 2023,
              <https://www.w3.org/TR/2023/REC-webrtc-20230306/>.
        
Appendix A. SDP ABNF Syntax
付録A. SDP ABNF構文

For the syntax validation performed in Section 5.8, the following list of ABNF definitions is used:

セクション5.8で実行された構文検証では、ABNF定義の次のリストが使用されます。

        +=========================+===============================+
        | Attribute               | Reference                     |
        +=========================+===============================+
        | ptime                   | Section 6 of [RFC4566]        |
        +-------------------------+-------------------------------+
        | maxptime                | Section 6 of [RFC4566]        |
        +-------------------------+-------------------------------+
        | rtpmap                  | Section 6 of [RFC4566]        |
        +-------------------------+-------------------------------+
        | recvonly                | Sections 6 and 9 of [RFC4566] |
        +-------------------------+-------------------------------+
        | sendrecv                | Sections 6 and 9 of [RFC4566] |
        +-------------------------+-------------------------------+
        | sendonly                | Sections 6 and 9 of [RFC4566] |
        +-------------------------+-------------------------------+
        | inactive                | Sections 6 and 9 of [RFC4566] |
        +-------------------------+-------------------------------+
        | fmtp                    | Sections 6 and 9 of [RFC4566] |
        +-------------------------+-------------------------------+
        | rtcp                    | Section 2.1 of [RFC3605]      |
        +-------------------------+-------------------------------+
        | setup                   | Section 4 of [RFC4145]        |
        +-------------------------+-------------------------------+
        | fingerprint             | Section 5 of [RFC8122]        |
        +-------------------------+-------------------------------+
        | rtcp-fb                 | Section 4.2 of [RFC4585]      |
        +-------------------------+-------------------------------+
        | extmap                  | Section 7 of [RFC5285]        |
        +-------------------------+-------------------------------+
        | mid                     | Section 4 of [RFC5888]        |
        +-------------------------+-------------------------------+
        | group                   | Section 5 of [RFC5888]        |
        +-------------------------+-------------------------------+
        | imageattr               | Section 3.1 of [RFC6236]      |
        +-------------------------+-------------------------------+
        | extmap (encrypt option) | Section 4 of [RFC6904]        |
        +-------------------------+-------------------------------+
        | candidate               | Section 5.1 of [RFC8839]      |
        +-------------------------+-------------------------------+
        | remote-candidates       | Section 5.2 of [RFC8839]      |
        +-------------------------+-------------------------------+
        | ice-lite                | Section 5.3 of [RFC8839]      |
        +-------------------------+-------------------------------+
        | ice-ufrag               | Section 5.4 of [RFC8839]      |
        +-------------------------+-------------------------------+
        | ice-pwd                 | Section 5.4 of [RFC8839]      |
        +-------------------------+-------------------------------+
        | ice-options             | Section 5.6 of [RFC8839]      |
        +-------------------------+-------------------------------+
        | msid                    | Section 3 of [RFC8830]        |
        +-------------------------+-------------------------------+
        | rid                     | Section 10 of [RFC8851]       |
        +-------------------------+-------------------------------+
        | simulcast               | Section 5.1 of [RFC8853]      |
        +-------------------------+-------------------------------+
        | tls-id                  | Section 4 of [RFC8842]        |
        +-------------------------+-------------------------------+
        

Table 1: SDP ABNF References

表1:SDP ABNF参照

Acknowledgements
謝辞

Harald Alvestrand, Taylor Brandstetter, Suhas Nandakumar, and Peter Thatcher provided significant text for RFC 8829 (and thereby this document). Bernard Aboba, Adam Bergkvist, Jan-Ivar Bruaroey, Dan Burnett, Ben Campbell, Alissa Cooper, Richard Ejzak, Stefan Håkansson, Ted Hardie, Christer Holmberg, Andrew Hutton, Randell Jesup, Matthew Kaufman, Anant Narayanan, Adam Roach, Robert Sparks, Neil Stratford, Martin Thomson, Sean Turner, and Magnus Westerlund all provided valuable feedback on RFC 8829 (and thereby this document).

Harald Alvestrand、Taylor Brandstetter、Suhas Nandakumar、およびPeter Satcherは、RFC 8829に重要なテキストを提供しました(それにより、この文書)。バーナード・アボバ、アダム・ベルクヴィスト、ジャン・イヴァー・ブルーアロイ、ダン・バーネット、ベン・キャンベル、アリッサ・クーパー、リチャード・エジザック、ステファン・ホーカンソン、テッド・ハーディ、クリスター・ホルムバーグ、アンドリュー・ハットン、ランデル・ジェサップ、マシュー・カウフマンニール・ストラトフォード、マーティン・トムソン、ショーン・ターナー、マグナス・ウェスターランドはすべて、RFC 8829に関する貴重なフィードバックを提供しました(そして、この文書)。

Authors' Addresses
著者のアドレス
   Justin Uberti
   Email: justin@uberti.name
        
   Cullen Jennings
   Cisco
   400 3rd Avenue SW
   Calgary AB T2P 4H2
   Canada
   Email: fluffy@iii.ca
        
   Eric Rescorla (editor)
   Windy Hill Systems, LLC
   Email: ekr@rtfm.com