How ionorg/ion-sdk-js works
Main Components
a) Client-Side Components:
• Ion SDK Client (Core)
• Signal Layer (with two implementations)
• Stream Management
• Connector Layer
• Protocol Buffers Integration
b) External Components:
• Ion Backend (SFU Server)
• WebRTC Infrastructure
• Client Applications
┌─────────────────────────────────────┐
• Client Applications │
• (Examples: ion-echo, ion-pubsub)│
• ┘
┌─────────────────────────────────────┐
• Ion SDK Core │
• ┬──────────┬───────────┤
• Signaling │ Stream │ Connector │
• Layer │ Manager │ Layer │
• ┴──────────┴───────────┘
┌─────────────────────────────────────┐
• Ion Backend (SFU) │
• WebRTC Infrastructure │
• ┘
Component Details
• Client Class (src/client.ts)
• LocalStream/RemoteStream (src/stream.ts)
• Connector implementations (src/connector/*)
b) Protocol Interfaces (Hexagons):
• gRPC-Web Implementation
• JSON-RPC Implementation
• Protocol Buffers (from _library/proto/*)
• → for data flow direction
• ⟷ for bidirectional communication
Important Relationships to Highlight
• How the Client class interfaces with both signal implementations
• Relationship between LocalStream/RemoteStream and WebRTC
• Demonstrate how Protocol Buffers are used for communication
• Connection between Connectors and the Ion Backend
Additional Elements
• Component relationships
Technical Details
• WebSocket connections (wss://)
• Supported features (audio, video, datachannel)
• Simulcast capabilities
• Stream control functions (mute/unmute)
• Session management (join/leave)