By Sagar Shankaran, Founder of CallSphere
Rtcrtpsender createencodedstreams insertable streams example: the W3C Encoded Transform Working Draft (April 2026) replaces Insertable Streams. Here is how production AI voice teams plan the migration and what is shipping today.
Key takeaways
The Encoded Transform API is the W3C's permanent home for what used to be called Insertable Streams. As of April 2026 it is a Working Draft on the Recommendation track — and Chromium ships it ahead of Safari, again.
The W3C Web Real-Time Communications Working Group published an updated Working Draft of WebRTC Encoded Transform on April 16, 2026. It supersedes the experimental `createEncodedStreams()` Insertable Streams API with a cleaner pair of interfaces: `RTCRtpScriptTransform` (you construct it on the main thread and attach it to a sender or receiver) and `RTCRtpScriptTransformer` (the Worker-side handle that gives you a readable + writable stream).
The shape is similar to the old API but the new interface explicitly takes a `Worker` plus an options object, supports `generateKeyFrame()` and `sendKeyFrameRequest()` for video, exposes `options` so you can pass per-call config without postMessage round trips, and is the version that will land in Safari and Firefox without flags. Chromium implements it side-by-side with the legacy `createEncodedStreams()` so you can dual-ship for a release or two.
The legacy API was Chromium-only and behind a flag for the first two years. That meant any production code path using it had to fall back to "no audio processing" on Safari, Firefox, and embedded WebViews. With Encoded Transform standardized:
```mermaid flowchart LR App[Main thread] -- new RTCRtpScriptTransform(worker) --> Sender[RTCRtpSender] Sender -- frames --> Worker[Worker context] Worker -- RTCRtpScriptTransformer --> Pipe[(readable + writable)] Pipe --> Sender ```
The application creates the transform once, hands it to `sender.transform = new RTCRtpScriptTransform(worker, options)`, and the Worker receives an `rtctransform` event with a `transformer` property exposing the streams. Frames are zero-copy transferred between threads.
CallSphere is migrating its browser-side audio pipeline from Insertable Streams to Encoded Transform across the same six verticals (real estate, healthcare, behavioral health, legal, salon, insurance). The migration is staged:
Hear it before you finish reading
Talk to a live CallSphere AI voice agent in your browser — 60 seconds, no signup.
Across 37 agents, 90+ tools, 115+ database tables, the migration is invisible to the AI: it still talks to OpenAI Realtime over WebRTC, just with a cleaner browser-side hook for our SOC 2 + HIPAA recordings. Pricing is unchanged at $149/$499/$1499 with the 14-day trial. Affiliates 22% — see /affiliate.
```ts // main.ts const worker = new Worker("/encoded-transform-worker.js", { type: "module" }); const pc = new RTCPeerConnection(); const stream = await navigator.mediaDevices.getUserMedia({ audio: true }); const sender = pc.addTrack(stream.getAudioTracks()[0], stream);
sender.transform = new RTCRtpScriptTransform(worker, { role: "sender", op: "watermark" }); ```
```ts // encoded-transform-worker.js onrtctransform = (event) => { const { readable, writable } = event.transformer; readable .pipeThrough(new TransformStream({ transform(frame, controller) { // frame is RTCEncodedAudioFrame controller.enqueue(frame); }, })) .pipeTo(writable); }; ```
Is the new API faster? Slightly — frame transfer between main and worker thread is now defined to be transferable in a single hop.
Does it support audio? Yes, exactly the same as video, with `RTCEncodedAudioFrame`.
What about E2EE? The spec calls out SFrame as the canonical use case; sample code lives in the W3C explainer.
Will my Insertable Streams code keep working? In Chromium yes, for now. Plan for it to be removed once Encoded Transform is stable across browsers.
Still reading? Stop comparing — try CallSphere live.
CallSphere ships complete AI voice agents per industry — 14 tools for healthcare, 10 agents for real estate, 4 specialists for salons. See how it actually handles a call before you book a demo.
Can a single Worker handle multiple peer connections? Yes — each `RTCRtpScriptTransform` fires its own `rtctransform` event with its own `transformer` instance.
Does it work in Service Workers? No — only Dedicated Workers. Service Workers do not have the right scope for streaming.
Are SharedWorkers supported? Not by the current draft. The spec says Worker; SharedWorker is a future extension at most.
What is the perf cost vs the legacy API? Within measurement noise. The transferable streams story is cleaner but the data path is the same.
The migration is not about the API surface — it is about the floor browser. Three rules from our staged migration:
We track Safari TP cycles weekly and adjust the gate. The same approach helped us avoid the 2024 SharedArrayBuffer rollback that bit teams who shipped early.
Try the live demo on /demo or start a /trial.
This guide is written for engineers and operators evaluating rtcrtpsender createencodedstreams insertable streams example in real production systems. Rtcrtpsender createencodedstreams insertable streams example sits alongside audio frames, const worker new worker worker.js, encoded frame, encoded video, transform function in the daily work of teams shipping production AI. The notes below give a plain-language reference for terms used throughout the article.
For teams that want to ship rtcrtpsender createencodedstreams insertable streams example in voice and chat agents this quarter, CallSphere runs 37 agents and 90+ function tools across 6 verticals on a single dashboard. Start a 14-day trial, see live demo agents, or compare tiers on /pricing.
Written by
Sagar Shankaran· Founder, CallSphere
Sagar Shankaran is the founder of CallSphere, where he builds production AI voice and chat agents deployed across healthcare, hospitality, real estate, and home services. He writes about agentic AI, LLM engineering, and shipping voice agents that handle real calls in production.
See how AI voice agents work for your industry. Live demo available -- no signup required.
A founder's guide to texto a voz (text-to-speech in Spanish): LATAM vs Castilian voices, free options, and how CallSphere ships Spanish agents.
A founder's guide to the female voice generator landscape: AI female voices, Japanese voices, robot voices, and how CallSphere ships 57+ voices live.
A founder's guide to the Siri voice generator landscape: how AI voice cloning works, what is legal, and how CallSphere uses 57+ voices in production.
A founder's guide to AI voice assistants for ecommerce: customer service, order lookup, and how CallSphere fits in versus virtual receptionists.
Robot text to speech in 2026: how I pick TTS APIs, when robotic voices help, and how CallSphere ships 57+ language voice agents. Hands-on guide.
The customer support specialist role in 2026 is half human, half AI. Here is what the job looks like, the AI tools that pair with it, and how we ship it.
© 2026 CallSphere LLC. All rights reserved.
Watch how CallSphere handles real customer calls, schedules appointments, and processes payments — live.