mirror of
https://github.com/xtr-dev/rondevu-client.git
synced 2025-12-10 19:03:24 +00:00
Fix ICE candidate handling - send full candidate objects
- Update IceCandidate interface to include sdpMid and sdpMLineIndex - Update addIceCandidates to accept full candidate objects - Update connection manager to send and receive complete ICE data - Fixes 'Either sdpMid or sdpMLineIndex must be specified' error 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -26,6 +26,8 @@ export interface Offer {
|
||||
|
||||
export interface IceCandidate {
|
||||
candidate: string;
|
||||
sdpMid: string | null;
|
||||
sdpMLineIndex: number | null;
|
||||
peerId: string;
|
||||
role: 'offerer' | 'answerer';
|
||||
createdAt: number;
|
||||
@@ -278,7 +280,14 @@ export class RondevuOffers {
|
||||
/**
|
||||
* Post ICE candidates for an offer
|
||||
*/
|
||||
async addIceCandidates(offerId: string, candidates: string[]): Promise<void> {
|
||||
async addIceCandidates(
|
||||
offerId: string,
|
||||
candidates: Array<{
|
||||
candidate: string;
|
||||
sdpMid?: string | null;
|
||||
sdpMLineIndex?: number | null;
|
||||
}>
|
||||
): Promise<void> {
|
||||
const response = await this.fetchFn(`${this.baseUrl}/offers/${encodeURIComponent(offerId)}/ice-candidates`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
|
||||
Reference in New Issue
Block a user