W3C WebRTC
WG Meeting
October 15, 2024
8 AM - 10 AM
1
Chairs: Bernard Aboba
Jan-Ivar Bruaroey
Guido Urdaneta
Welcome!
2
About this Virtual Meeting
3
W3C WG IPR Policy
4
W3C Code of Conduct
5
Virtual Interim Meeting Tips
This session is (still) being recorded
6
Understanding Document Status
7
Issues for Discussion Today
Time control:
8
Codec Issues
Start Time: 08:10 AM
End Time: 08:30 AM
9
For Discussion Today
10
Issue 3006: Align spec /w codec direction decision (Henrik B)
One codec issue to rule them all
Closed the following as dupes of #3006 (= Proposal A from TPAC):
11
Issue 3006: Align spec /w codec direction decision (Henrik B)
TL;DR: Filter codec preferences by m= section direction.
12
Issue 3006: Align spec /w codec direction decision (Henrik B)
Problem: What happens if filtering results in an empty preference list?
No codecs implies rejecting the m= section…
13
etc. (same for recv)
Issue 3006: Align spec /w codec direction decision (Henrik B)
What happens if filtering results in an empty preference list?
Proposal A (it’s ok):
Treat “no preference after filter” as “no preference” (= O/A all codecs) 🦶🤗
Proposal B (fail early):
Throw an exception when setting direction or setCodecPreferences.
But… going from sendonly to recvonly may require a “reset preference dance”.
🦶🔫
Proposal C (fail late):
Reject transceiver as part of negotiation due to no codecs. 💣🦶💣
14
WebCodecs/WebRTC Interop (Harald)
Start Time: 08:30 AM
End Time: 08:40 AM
15
Marrying EncodedSource and WebCodecs is powerful
Enables applications where control of encoding details is critical
Allows apps to make per-frame decisions on encoding
16
WebCodecs and Encoded Transform frame formats differ
dictionary RTCEncodedVideoFrameMetadata {
sequence<unsigned long long> dependencies;
unsigned long synchronizationSource;
sequence<unsigned long> contributingSources;
long long timestamp; // microseconds
};
interface RTCEncodedVideoFrame {
constructor(RTCEncodedVideoFrame originalFrame, optional RTCEncodedVideoFrameOptions options = {});
readonly attribute RTCEncodedVideoFrameType type;
attribute ArrayBuffer data;
RTCEncodedVideoFrameMetadata getMetadata();
};
interface EncodedVideoChunk {
constructor(EncodedVideoChunkInit init);
readonly attribute EncodedVideoChunkType type; // “key” or “not key”
readonly attribute long long timestamp; // microseconds
readonly attribute unsigned long long? duration; // microseconds
readonly attribute unsigned long byteLength;
undefined copyTo(AllowSharedBufferSource destination);
};
17
Merging is not possible. Mapping is.
18
Proposed API shape
RTCEncodedVideoFrame {
constructor(EncodedVideoChunk, RTCEncodedVideoFrameMetadata metadata)
}
EncodedVideoChunk {
constructor(RTCEncodedVideoFrame)
}
Discuss!
19
Discussion (End Time: 08:40)
20
Encoder Complexity (Erik)
Start Time: 08:40 AM
End Time: 08:50 AM
21
Issue 191: Add API to control encode complexity
22
enum RTCEncodeComplexityMode {
"low",
"normal",
"high"
};
partial dictionary RTCRtpEncodingParameters {
RTCEncodeComplexityMode encodeComplexityMode = "normal";
};
Specifies the encoding complexity mode relative to "normal" mode:
Issue 191: Add API to control encode complexity
23
Intended use cases:
Discussion (End Time: 08:50)
24
IceTransport Extensions (Sameer)
Start Time: 08:50 AM
End Time: 09:10 AM
25
Issue 209 - App control over ICE checks
26
Proposal
partial interface RTCIceTransport {
// Send an ICE check.
Promise<RTCIceCheckRequest> checkCandidatePair(RTCIceCandidatePair pair);
// Fired before ICE agent sends an ICE check.
attribute EventHandler /* RTCIceCheckEvent */ onicecandidatepaircheck;
}
interface RTCIceCheckEvent : Event {
readonly attribute RTCIceCandidatePair candidatePair;
// Resolves when the check is actually sent. Rejected => send failure.
readonly attribute Promise<RTCIceCheckRequest> request;
}
interface RTCIceCheckRequest {
readonly attribute ArrayBuffer transactionId;
readonly attribute DOMHighResTimeStamp sentTime;
// Resolves when response is received. Rejected => timeout.
readonly attribute Promise<RTCIceCheckResponse> response;
}
interface RTCIceCheckResponse {
readonly attribute DOMHighResTimeStamp receivedTime;
readonly attribute boolean retransmitted;
// No error => success.
readonly attribute RTCIceCheckResponseError? error;
}
27
Proposal
28
Usage
const pc = …;
const ice = pc.getTransceivers()[0].sender.transport.iceTransport;
ice.onicecandidatepaircheck = async(event) => {
try {
const request = await event.request;
handleCheck(request);
} catch(error) {
// … do something with error …
}
}
// send a check
const request = await ice.checkCandidatePair(alternatePair);
handleCheck(request);
function handleCheck(request) {
try {
const response = await request.response;
if (response.error) {
// … do something with error …
return;
}
const rtt = response.receivedTime - request.sentTime;
if (!response.retransmitted) {
// … do something with rtt …
}
} catch(error) {
// … do something with timeout …
}
}
29
Future extensibility
partial interface RTCIceCheckRequest { partial interface RTCIceCheckResponse {
readonly attribute RTCStunAttributes attributes; readonly attribute RTCStunAttributes attributes;
} }
dictionary RTCStunAttributes { dictionary RTCUnrecognizedStunAttribute {
boolean useCandidate; required ArrayBuffer type;
sequence<ArrayBuffer> unknownAttributes; ArrayBuffer value;
sequence<RTCUnrecognizedStunAttribute> unrecognizedAttributes; }
}
Promise<RTCIceCheckRequest> checkCandidatePair(RTCIceCandidatePair pair, optional RTCStunAttributes attributes);
Promise<RTCIceCheckRequest> checkCandidatePair(RTCIceCandidatePair pair, optional double timeout, optional unsigned short maxRetransmissions);
30
How do ICE checks work today?
31
Discussion (End Time: 09:10)
32
RtpTransport (Peter Thatcher)
Start Time: 09:10 AM
End Time: 09:30 AM
33
Reminder about use cases
Control/customization of:
34
Example Use Cases
35
Status Update
36
Things That Have Been Figured Out
37
Things In Progress
38
Conclusion
39
Discussion (End Time: 09:30)
40
Setting the zoom-level on captured tabs�(Elad)
Start Time: 09:30 AM
End Time: 09:50 AM
41
Captured Surface Control - Reminder
42
setZoomLevel() – Desired Properties
Properties sought:
43
Gating setZoomLevel() – General Idea
44
…but how do we specify this formally?
Gating setZoomLevel() – First Stab
45
Gating setZoomLevel() – Simpler Approaches
46
Gating setZoomLevel() – Simpler Approach #1
Use clear and descriptive language in the spec, although it would not be optimally spec-y. Something along the lines of:
47
Gating setZoomLevel() – Simpler Approach #2
Rely on Window.event.
It is marked as “legacy”, but it does not appear problematic.
48
Gating setZoomLevel() – Simpler Approach #3
Require that the Web application provide the event it’s handling as further input to setZoomLevel().
Note: The dispatch flag check ensures cached events can’t be used.
49
Gating setZoomLevel() – Suggestion
50
Gating setZoomLevel() – Event Types
I don’t think this is a problem, but in the interest of starting out conservatively, I propose:
51
Discussion (End Time: 09:50)
52
Wrapup and Next Steps
Start Time: 09:50 AM
End Time: 10:00 AM
53
Next Steps
54
Thank you
Special thanks to:
WG Participants, Editors & Chairs
55