# Offer and answer options

The options of creating an offer or an answer.

### *class* webrtc.models.rtc_offer_answer_options.RTCOfferAnswerOptions

The base of [`webrtc.RTCOfferOptions`](#webrtc.models.rtc_offer_answer_options.RTCOfferOptions) and [`webrtc.RTCAnswerOptions`](#webrtc.models.rtc_offer_answer_options.RTCAnswerOptions). It has no members of its own.

### *class* webrtc.models.rtc_offer_answer_options.RTCOfferOptions(ice_restart=False, offer_to_receive_audio=None, offer_to_receive_video=None)

The options of [`webrtc.RTCPeerConnection.create_offer()`](../interfaces/rtc_peer_connection.md#webrtc.interfaces.rtc_peer_connection.RTCPeerConnection.create_offer).

See [MDN: RTCPeerConnection/createOffer](https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/createOffer).

* **Parameters:**
  * **ice_restart** ([`bool`](https://docs.python.org/3/builtins/functions.html#bool), optional) – Whether the offer restarts ICE, with new credentials and candidates.
    [`webrtc.RTCPeerConnection.restart_ice()`](../interfaces/rtc_peer_connection.md#webrtc.interfaces.rtc_peer_connection.RTCPeerConnection.restart_ice) is the preferred way.
  * **offer_to_receive_audio** ([`bool`](https://docs.python.org/3/builtins/functions.html#bool), optional) – A legacy option, applied to the transceivers before the
    offer is created. [`True`](https://docs.python.org/3/builtins/constants.html#True) adds a `recvonly` audio transceiver unless one already receives audio,
    and [`False`](https://docs.python.org/3/builtins/constants.html#False) stops receiving on the audio transceivers. [`None`](https://docs.python.org/3/builtins/constants.html#None) (the default) changes nothing.
    [`webrtc.RTCPeerConnection.add_transceiver()`](../interfaces/rtc_peer_connection.md#webrtc.interfaces.rtc_peer_connection.RTCPeerConnection.add_transceiver) is the preferred way.
  * **offer_to_receive_video** ([`bool`](https://docs.python.org/3/builtins/functions.html#bool), optional) – The same as `offer_to_receive_audio`, for video.

### *class* webrtc.models.rtc_offer_answer_options.RTCAnswerOptions

The options of [`webrtc.RTCPeerConnection.create_answer()`](../interfaces/rtc_peer_connection.md#webrtc.interfaces.rtc_peer_connection.RTCPeerConnection.create_answer), which has no members yet.

See [MDN: RTCPeerConnection/createAnswer](https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/createAnswer).
