Bug 192848 - RTCRtpSender.setParameters() should set active parameter
Summary: RTCRtpSender.setParameters() should set active parameter
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-12-19 04:51 PST by Iñaki Baz
Modified: 2018-12-21 18:15 PST (History)
4 users (show)

See Also:


Attachments
Script that reproduces the issue. Just run it in Safari 12.1 console with "Unified-Plan" enabled. (1.37 KB, text/javascript)
2018-12-19 04:51 PST, Iñaki Baz
no flags Details
Patch (6.81 KB, patch)
2018-12-21 16:28 PST, youenn fablet
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>