Realtime API - Invalid SDP Offer

Then today (demo day) I started intermittently receiving

Invalid SDP offer. Offer should have 1 video media sections, but had 0

Anyone else experience this??

My webrtc app has been working with the ephemeral key, using copy/paste code from https://platform.openai.com/docs/guides/realtime-webrtc#connection-details

My trusty 03-mini-high side kick gave me this horrendous hack with seemed to resolve the connection issues.

// Create a blank canvas
const canvas = document.createElement('canvas');
canvas.width = 640;
canvas.height = 480;

// Optionally, fill it with a solid color
const ctx = canvas.getContext('2d');
ctx.fillStyle = 'black';
ctx.fillRect(0, 0, canvas.width, canvas.height);
// Capture the canvas stream (the frame rate can be 0 if you don't need updates)
const dummyStream = canvas.captureStream(0);

// Add the dummy video track to the peer connection
const videoTrack = dummyStream.getVideoTracks()[0];
pc.addTrack(videoTrack, dummyStream);

This worked enough to survive the demo, but anecdotally it seemed less guided by background context.

Now that I’m heading home, it seems to be working again. I didn’t see anything on https://status.openai.com

Anyone got any clues?

1 Like

there was an issue with this for a couple of hours yesterday. It is resolved now. Check this thread: Video is now required for WebRTC realtime connections?

2 Likes

Thanks Marcelo. I obviously didn’t search good enough.