-
Notifications
You must be signed in to change notification settings - Fork 22.9k
FF145 RTCEncodedVideoFrame/RTCEncodedAudioFrame constructors #41519
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
FF145 RTCEncodedVideoFrame/RTCEncodedAudioFrame constructors #41519
Conversation
files/en-us/web/api/rtcencodedaudioframe/rtcencodedaudioframe/index.md
Outdated
Show resolved
Hide resolved
Preview URLs (6 pages)
External URLs (4)URL:
(comment last updated: 2025-10-20 22:29:01) |
067d91f
to
75d79ed
Compare
75d79ed
to
397c1ac
Compare
- `receiveTime` | ||
- : A {{domxref("DOMHighResTimeStamp")}} indicating the timestamp of the last received packet of an incoming frame (from an {{domxref("RTCRtpReceiver")}}) used to produce this media frame, relative to {{domxref("Performance.timeOrigin")}}. | ||
- `rtpTimestamp` | ||
- : A positive integer that that reflects the sampling instant of the first octet in the RTP data packet (see {{rfc("3550")}}). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- : A positive integer that that reflects the sampling instant of the first octet in the RTP data packet (see {{rfc("3550")}}). | |
- : A positive integer that reflects the sampling instant of the first octet in the RTP data packet (see {{rfc("3550")}}). |
Note that while numbers are allocated sequentially when sent, they will overflow at 32767 and restart back at 0. | ||
Therefore to compare two frame sequence numbers, in order to determine whether one is assumed to be after another, you must use [serial number arithmetic](https://en.wikipedia.org/wiki/Serial_number_arithmetic). <!-- [RFC1982] --> | ||
- `synchronizationSource` | ||
- : A positive integer value indicating synchronization source ("ssrc") of the stream of RTP packets that are described by this frame. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- : A positive integer value indicating synchronization source ("ssrc") of the stream of RTP packets that are described by this frame. | |
- : A positive integer value indicating the synchronization source ("ssrc") of the stream of RTP packets that are described by this frame. |
- : This is an object with the following property: | ||
- `metadata` {{optional_inline}} | ||
- : An object setting the frame metadata. | ||
This is object has the same properties as the object returned by {{DOMxRef("RTCEncodedAudioFrame.getMetadata()")}}. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is object has the same properties as the object returned by {{DOMxRef("RTCEncodedAudioFrame.getMetadata()")}}. | |
This is an object with the same properties as the object returned by {{DOMxRef("RTCEncodedAudioFrame.getMetadata()")}}. |
}); | ||
``` | ||
|
||
This kind of modification might be useful if you need to create multiple outgoing frames from a single incoming frame, for example in order to relay media to another peer on the network. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This kind of modification might be useful if you need to create multiple outgoing frames from a single incoming frame, for example in order to relay media to another peer on the network. | |
This kind of modification might be useful if you need to create multiple outgoing frames from a single incoming frame; for example in order to relay media to another peer on the network. |
- `receiveTime` | ||
- : A {{domxref("DOMHighResTimeStamp")}} indicating the timestamp of the last received packet of an incoming frame (from an {{domxref("RTCRtpReceiver")}}) used to produce this media frame, relative to {{domxref("Performance.timeOrigin")}}. | ||
- `rtpTimestamp` | ||
- : A positive integer that that reflects the sampling instant of the first octet in the RTP data packet (see {{rfc("3550")}}). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- : A positive integer that that reflects the sampling instant of the first octet in the RTP data packet (see {{rfc("3550")}}). | |
- : A positive integer that reflects the sampling instant of the first octet in the RTP data packet (see {{rfc("3550")}}). |
- : This is an object with the following property: | ||
- `metadata` {{optional_inline}} | ||
- : An object setting the frame metadata. | ||
This is object has the same properties as the object returned by {{DOMxRef("RTCEncodedVideoFrame.getMetadata()")}}. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is object has the same properties as the object returned by {{DOMxRef("RTCEncodedVideoFrame.getMetadata()")}}. | |
This is an object with the same properties as the object returned by {{DOMxRef("RTCEncodedVideoFrame.getMetadata()")}}. |
}); | ||
``` | ||
|
||
This kind of modification might be useful if you need to create multiple outgoing frames from a single incoming frame, for example in order to relay media to another peer on the network. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This kind of modification might be useful if you need to create multiple outgoing frames from a single incoming frame, for example in order to relay media to another peer on the network. | |
This kind of modification might be useful if you need to create multiple outgoing frames from a single incoming frame; for example in order to relay media to another peer on the network. |
FF145 makes
RTCEncodedAudioFrame
andRTCEncodeVideoFrame
be serializeable, which essentially means adding constructors.This updates the
getMetadata()
for for both interfaces with the correct properties in returned object according to tests. It also creates constructor docs. These don't duplicate the properties but link to the getMetadata doc.Related docs work can be tracked in #41508