- From: Jan-Ivar Bruaroey via GitHub <sysbot+gh@w3.org>
- Date: Fri, 28 Mar 2025 17:23:22 +0000
- To: public-webrtc@w3.org
jan-ivar has just created a new issue for https://github.com/w3c/webrtc-pc:
== Inconsistent initialization of transceiver.receiver.track.getSettings() ==
Typing the following into web console reveals browser differences:
```js
new RTCPeerConnection().addTransceiver("video").receiver.track.getSettings()
```
Safari:
```js
{aspectRatio: NaN, frameRate: 0, height: 0, width: 0}
```
Chrome only initializes two nonstandard members (not shown: and appears to fill in other members later, but I find no precedent or support for that in the [Constrainable Pattern](https://w3c.github.io/mediacapture-main/#dfn-settings-0). If anything the spec appears to go [out of its way to provide a value in all cases](https://w3c.github.io/mediacapture-main/#def-constraint-frameRate)):
```js
{deviceId: 'c52ef1e6-229d-4dd0-813b-b4a1face0de8', resizeMode: 'none'}
```
Firefox (not yet implemented [bug 1812728](https://bugzilla.mozilla.org/show_bug.cgi?id=1812728)):
```
{}
```
From reading the [spec](https://w3c.github.io/webrtc-pc/#mediatracksupportedconstraints-mediatrackcapabilities-mediatrackconstraints-and-mediatracksettings) I'd expect the following values:
```js
{
aspectRatio: 1.3333333333333333,
frameRate: 30,
height: 480,
width: 640
}
```
### Proposal:
Clarify the spec that values are not optional. Suggest UAs populate based on [default values recommended in MediaCapture-main](https://w3c.github.io/mediacapture-main/#dfn-selectsettings), which incidentally were chosen with RTCPeerConnection as a sink in mind:
<img width="758" alt="Image" src="https://github.com/user-attachments/assets/901140ed-6bfe-4063-a39f-e4dd1218b346" />
Please view or discuss this issue at https://github.com/w3c/webrtc-pc/issues/3045 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Friday, 28 March 2025 17:23:23 UTC