Status of MediaStreamTrackGenerator for audio

62 views
Skip to first unread message

guest271314

unread,
Oct 5, 2024, 9:36:05 PMOct 5
to discuss-webrtc
I've been using MediaStreamTrackGenerator of kind audio since that interface was first included in Chromium source code, including code published on GitHub, e.g., https://github.com/guest271314/captureSystemAudio/blob/master/native_messaging/capture_system_audio/background.js#L38-L40 and most recently https://github.com/guest271314/native-messaging-piper/blob/main/background.js#L120-L122. That interface has been quite useful for real-time audio streaming.

I figured I should probably re-read the specification to see if new features have been added. My most recent reading of the specification https://www.w3.org/TR/mediacapture-transform/#backwards-compatibility appears to be leaning towards removal of MediaStreamTrackGenerator of kind audio, though Chromium 131 still has the interface defined and exposed.

Do the owners of MediaStreamTrackGenerator really intend to remove audio generation capability from the specification? If so, why?

Muhammad Usman Bashir

unread,
Oct 6, 2024, 12:47:18 PMOct 6
to discuss-webrtc
There is no evidence of plans to remove audio generation capability from MediaStreamTrackGenerator. The confusion may have arisen from misinterpretation of the specification or ongoing discussions about improvements. It's recommended to continue using MediaStreamTrackGenerator for audio as needed.

Additionally, for the most up-to-date and accurate information, always refer to:
1. The official W3C specification: https://w3c.github.io/mediacapture-transform/
2. The GitHub repository for the spec: https://github.com/w3c/mediacapture-transform

guest271314

unread,
Oct 6, 2024, 1:17:56 PMOct 6
to discuss...@googlegroups.com
> There is no evidence of plans to remove audio generation capability from MediaStreamTrackGenerator.

There's this

> Previous proposals for this interface had an API like this:

and this

> There is no WG consensus on whether or not a source capable of generating a MediaStreamTrack of kind "audio" should exist.

Thanks.
> --
> This list falls under the WebRTC Code of Conduct - https://webrtc.org/support/code-of-conduct.
> ---
> You received this message because you are subscribed to a topic in the Google Groups "discuss-webrtc" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/discuss-webrtc/hAuy3V7FTXg/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to discuss-webrt...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/0134bcb7-986b-4ccc-8102-55aa804cc839n%40googlegroups.com.

Muhammad Usman Bashir

unread,
Oct 6, 2024, 1:29:10 PMOct 6
to discuss-webrtc

Thank you for pointing that out.

The specification does mention the lack of consensus regarding the capability of generating a MediaStreamTrack of kind "audio." However, it's important to note that while discussions about this feature may be ongoing, there has been no official removal of the MediaStreamTrackGenerator for audio from implementations like Chromium 131.

guest271314

unread,
Oct 6, 2024, 2:16:02 PMOct 6
to discuss...@googlegroups.com
> regarding the capability of generating a MediaStreamTrack of kind "audio."

The capability exists, and works, as demonstrated by the two links I
shared. Thanks.

On Sun, Oct 6, 2024 at 10:29 AM Muhammad Usman Bashir
> To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/e7220555-30b9-4aaa-8620-90a600fe6fddn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages