or run

tessl search
Log in

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/aiortc@1.13.x
tile.json

tessl/pypi-aiortc

tessl install tessl/pypi-aiortc@1.13.0

Python implementation of WebRTC and ORTC for real-time peer-to-peer communication

Agent Success

Agent success rate when using this tile

87%

Improvement

Agent success rate improvement when using this tile compared to baseline

1.02x

Baseline

Agent success rate without this tile

85%

task.mdevals/scenario-9/

WebRTC Session Descriptor Parser and Builder

Build a session descriptor parser and builder utility that processes WebRTC session descriptions for a media streaming application. The utility should handle parsing existing session descriptions and creating new ones with proper formatting.

Capabilities

Parse Session Descriptions

  • Given an SDP string containing audio and video media sections, parse it and return a dictionary with 'type' and 'sdp' keys @test
  • Given an SDP string with VP8 video codec, extract the codec name and payload type from the video media section @test
  • Given an SDP string with ICE candidates in the media sections, extract all candidate strings @test

Build Session Descriptions

  • Create a new offer-type session description with audio and video media sections @test
  • Parse an existing SDP string, add a new ICE candidate to the first media section, and output the modified SDP string @test

Implementation

@generates

API

def parse_sdp(sdp_string: str) -> dict:
    """
    Parse an SDP string into a structured dictionary.

    Args:
        sdp_string: Session Description Protocol string to parse

    Returns:
        Dictionary with 'type' and 'sdp' keys, where 'sdp' contains parsed SDP object
    """
    pass

def get_codecs(sdp_object, media_type: str) -> list:
    """
    Extract codec information for a specific media type from parsed SDP.

    Args:
        sdp_object: Parsed SDP object
        media_type: Media type ('audio' or 'video')

    Returns:
        List of dictionaries containing codec 'name' and 'payload_type'
    """
    pass

def get_ice_candidates(sdp_object) -> list:
    """
    Extract all ICE candidates from parsed SDP.

    Args:
        sdp_object: Parsed SDP object

    Returns:
        List of ICE candidate strings
    """
    pass

def create_offer(media_types: list) -> str:
    """
    Create a new SDP offer with specified media types.

    Args:
        media_types: List of media types ('audio', 'video')

    Returns:
        SDP string formatted as an offer
    """
    pass

def add_ice_candidate_to_sdp(sdp_string: str, candidate: str, media_index: int = 0) -> str:
    """
    Add an ICE candidate to an SDP string.

    Args:
        sdp_string: Original SDP string
        candidate: ICE candidate string to add
        media_index: Index of media section to add candidate to (default 0)

    Returns:
        Modified SDP string with candidate added
    """
    pass

Dependencies { .dependencies }

aiortc { .dependency }

Provides WebRTC implementation including session description protocol support.