From 52909d9f24515a34d11cf433331a143567cfb1b7 Mon Sep 17 00:00:00 2001
From: Philipp Hancke
Date: Mon, 11 Jul 2022 17:58:53 +0200
Subject: [PATCH] add mimeType to metadata
since the mapping from payload type to the codec mime type
is nontrivial in environments like workers.
Defined similar to webrtc-stats:
https://w3c.github.io/webrtc-stats/#dom-rtccodecstats-mimetype
---
index.bs | 22 +++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/index.bs b/index.bs
index 5c69e20..8689e85 100644
--- a/index.bs
+++ b/index.bs
@@ -341,6 +341,7 @@ dictionary RTCEncodedVideoFrameMetadata {
sequence<unsigned long> contributingSources;
long long timestamp; // microseconds
unsigned long rtpTimestamp;
+ DOMString mimeType;
};
@@ -381,7 +382,7 @@ dictionary RTCEncodedVideoFrameMetadata {
The media presentation timestamp (PTS) in microseconds of raw frame, matching the
- {{VideoFrame/timestamp}} for raw frames which correspond to this frame.
+ {{VideoFrame/timestamp}} for raw frames which correspond to this frame.
@@ -394,6 +395,15 @@ dictionary RTCEncodedVideoFrameMetadata {
that reflects the sampling instant of the first octet in the RTP data packet.
+
+ mimeType DOMString
+
+
+
+ The codec MIME media type/subtype defined in the IANA media types registry
+ [[!IANA-MEDIA-TYPES]], e.g. video/VP8.
+
+
@@ -473,6 +483,7 @@ dictionary RTCEncodedAudioFrameMetadata {
sequence<unsigned long> contributingSources;
short sequenceNumber;
unsigned long rtpTimestamp;
+ DOMString mimeType;
};
### Members ### {#RTCEncodedAudioFrameMetadata-members}
@@ -525,6 +536,15 @@ dictionary RTCEncodedAudioFrameMetadata {
that reflects the sampling instant of the first octet in the RTP data packet.
+
+ mimeType DOMString
+
+
+
+ The codec MIME media type/subtype defined in the IANA media types registry
+ [[!IANA-MEDIA-TYPES]], e.g. audio/opus.
+
+
## RTCEncodedAudioFrame interface ## {#RTCEncodedAudioFrame-interface}