Bug 192848

Summary: RTCRtpSender.setParameters() should set active parameter
Product: WebKit Reporter: Iñaki Baz <ibc>
Component: WebRTCAssignee: youenn fablet <youennf>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, eric.carlson, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: Safari Technology Preview   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Script that reproduces the issue. Just run it in Safari 12.1 console with "Unified-Plan" enabled.
none
Patch none

Description Iñaki Baz 2018-12-19 04:51:03 PST
Created attachment 357667 [details]
Script that reproduces the issue. Just run it in Safari 12.1 console with "Unified-Plan" enabled.

* Tech Preview, Release 71 (Safari 12.1, WebKit 14607.1.15)

The attached script works in Chrome. It fails in Safari with InvalidStateError: "The object is in an invalid state".

The script just gets RtpSender parameters via getParameters(), set active=false into the only encoding and applies the modified parameters via setParameters().
Comment 1 youenn fablet 2018-12-19 08:21:04 PST

*** This bug has been marked as a duplicate of bug 192732 ***
Comment 2 Iñaki Baz 2018-12-21 05:02:13 PST
Hi, it does not throw in Safari Tech 72 (December 19th) but it does not work. If you run the attached script (which set active: false into encodings[0] and then check:

pc1.getSenders()[0].getParameters().encodings[0]

You'll see that it has active:true yet instead of active:false. In Chrome it's false (at it should be).
Comment 3 youenn fablet 2018-12-21 11:21:55 PST
Reopened to fix active
Comment 4 youenn fablet 2018-12-21 11:22:05 PST
(In reply to Iñaki Baz from comment #2)
> Hi, it does not throw in Safari Tech 72 (December 19th) but it does not
> work. If you run the attached script (which set active: false into
> encodings[0] and then check:
> 
> pc1.getSenders()[0].getParameters().encodings[0]
> 
> You'll see that it has active:true yet instead of active:false. In Chrome
> it's false (at it should be).

Thanks, will fix it.
Comment 5 youenn fablet 2018-12-21 16:28:18 PST
Created attachment 358001 [details]
Patch
Comment 6 WebKit Commit Bot 2018-12-21 18:14:39 PST
Comment on attachment 358001 [details]
Patch

Clearing flags on attachment: 358001

Committed r239532: <https://trac.webkit.org/changeset/239532>
Comment 7 WebKit Commit Bot 2018-12-21 18:14:41 PST
All reviewed patches have been landed.  Closing bug.
Comment 8 Radar WebKit Bug Importer 2018-12-21 18:15:24 PST
<rdar://problem/46914057>