W3C home > Mailing lists > Public > public-webrtc@w3.org > November 2022

Hackathon - a point in time (Sunday morning)

From: Harald Alvestrand <harald@alvestrand.no>
Date: Sun, 6 Nov 2022 10:23:42 +0000
Message-ID: <9fc424c0-dd45-2594-f0f8-1a4983569b5f@alvestrand.no>
To: "public-webrtc@w3.org" <public-webrtc@w3.org>
So far, I've been able to spend the day hacking.

And the result is a working example of how to do what "encoded 
transform" does in a different API:

   const frameSource = audioPassingPc.getSenders()[0].divertFrames();

   // This class definition defines the work done.
   // Constructor is called with an EncodedFramesource as input.
   class CountingFrameSource extends EncodedFrameSource {
     constructor(firstSource) {
       const frameCounter = new TransformStream({
         transform: (frame, controller) => {
           frameCount += 1;
           audioCounterDiv.innerText = frameCount;
       this.readable = frameSource.readable.pipeThrough(frameCounter);

   const outgoingFrameSource = new CountingFrameSource(frameSource);

The implementation is a shim on top of the Chrome version of 

So far, signals are not connected (there are no signals).

Code is available at 
https://github.com/alvestrand/hackathon-encoded-media - since it's only 
me so far, I'm just pushing stuff to the main branch; once others want 
to contribute, we'll start using PRs.

Now to construct some *non*working samples and see what they will look 
like. And then see if we can make them work.

Received on Sunday, 6 November 2022 10:24:01 UTC

This archive was generated by hypermail 2.4.0 : Sunday, 6 November 2022 10:24:02 UTC