mirror of
https://github.com/pion/webrtc.git
synced 2025-12-24 11:51:03 +08:00
As defined in [RFC8839], when an ICE restart occurs, a new SDP offer/answer exchange is triggered. However, as WHIP does not support renegotiation of non-ICE-related SDP information, a WHIP client will not send a new offer when an ICE restart occurs. Instead, the WHIP client and WHIP session will only exchange the relevant ICE information via an HTTP PATCH request as defined in Section 4.3.1 and MUST assume that the previously negotiated non-ICE-related SDP information still applies after the ICE restart. When performing an ICE restart, the WHIP client MUST include the updated "ice-pwd" and "ice-ufrag" in the SDP fragment of the HTTP PATCH request body as well as the new set of gathered ICE candidates as defined in [RFC8840]. Similar to what is defined in Section 4.3.2, as per [RFC9429], only "m=" sections not marked as bundle-only can gather ICE candidates, so given that the "max-bundle" policy is being used, the SDP fragment will contain only the offerer-tagged "m=" line of the bundle group. A WHIP client sending a PATCH request for performing ICE restart MUST contain an If-Match header field with a field-value of "*" as per Section 13.1.1 of [RFC9110]. Co-authored-by: Joe Turki <git@joeturki.com>
34 lines
1.2 KiB
Go
34 lines
1.2 KiB
Go
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package webrtc
|
|
|
|
// OfferAnswerOptions is a base structure which describes the options that
|
|
// can be used to control the offer/answer creation process.
|
|
type OfferAnswerOptions struct {
|
|
// VoiceActivityDetection allows the application to provide information
|
|
// about whether it wishes voice detection feature to be enabled or disabled.
|
|
VoiceActivityDetection bool
|
|
// ICETricklingSupported indicates whether the ICE agent should use trickle ICE
|
|
// If set, the "a=ice-options:trickle" attribute is added to the generated SDP payload.
|
|
// (See https://datatracker.ietf.org/doc/html/rfc9725#section-4.3.3)
|
|
ICETricklingSupported bool
|
|
}
|
|
|
|
// AnswerOptions structure describes the options used to control the answer
|
|
// creation process.
|
|
type AnswerOptions struct {
|
|
OfferAnswerOptions
|
|
}
|
|
|
|
// OfferOptions structure describes the options used to control the offer
|
|
// creation process.
|
|
type OfferOptions struct {
|
|
OfferAnswerOptions
|
|
|
|
// ICERestart forces the underlying ice gathering process to be restarted.
|
|
// When this value is true, the generated description will have ICE
|
|
// credentials that are different from the current credentials
|
|
ICERestart bool
|
|
}
|