<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>186576</bug_id>
          
          <creation_ts>2018-06-12 15:15:02 -0700</creation_ts>
          <short_desc>Changing offer constraints does not update subsequent offers.</short_desc>
          <delta_ts>2018-06-12 19:32:28 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebRTC</component>
          <version>Safari 11</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>macOS 10.13</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Thomas Mullen">thomasmullendesign</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>youennf</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1432494</commentid>
    <comment_count>0</comment_count>
    <who name="Thomas Mullen">thomasmullendesign</who>
    <bug_when>2018-06-12 15:15:02 -0700</bug_when>
    <thetext>Creating an offer with a set of constraints, connecting, and then creating a new offer for renegotiation with a different set of constraints does not change the offer as expected.

What did you expect to happen:
Creating a second offer with different constraints would result in an offer that reflects those constraints.

What happened:
Safari created an offer with the same constraints as the first offer.

Steps to reproduce:
1. Create an offer with a set of constraints (testing was done with offerToReceiveAudio: false).
2. Renegotiate by creating a new offer with a different set of constraints (testing was done with offerToReceiveAudio: true).
3. Notice that the new offer will now have m-lines describing the change in constraints in Chrome and Firefox, but the Safari offer will be the same.

Why is this a problem:
It is impossible to renegotiate with different constraints. Note that changing the offer through addTrack, addTransceiver, etc still works. Only offerConstraints does not behave correctly. 

For example: If a peer initially does not offer to receive audio, it can never receive audio even after constraints are changed.

Working example to reproduce: https://codepen.io/RationalCoding/pen/LryvwB</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1432560</commentid>
    <comment_count>1</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2018-06-12 19:32:28 -0700</bug_when>
    <thetext>Hi Thomas,

offerToReceiveAudio is not supported in WebKit.
adapter.js supports it by using transceivers.
I guess it might be a limitation of the shim and of WebKit support of transceivers which is not fully compliant with the spec.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>