-
Notifications
You must be signed in to change notification settings - Fork 0
Core Live Streaming Overview
Mr.P edited this page Aug 25, 2026
·
1 revision
Use LiveStreamingAPI to receive live camera output from a connected device. The device may expose an RTSP stream over its hotspot, deliver individual JPEG frames, or support both modes.
Device live-stream lifecycle
Select a capability-supported transport, keep device and presentation resources coordinated, and treat the finish callback as the terminal session signal.
- Check Device — Confirm the device is connected, ready, and conforms to LiveStreamingAPI.
- Select Transport — Read RTSP and JPEG capability properties before choosing a mode.
- Start Session — Request the selected live-stream mode and observe startup callbacks.
- Prepare Input — RTSP configures and joins the device hotspot; JPEG waits for frame data.
- Receive Media — Consume the RTSP address or each complete JPEG frame.
- Present Media — Play RTSP with AIBudsLiveStream or decode JPEG data into an image view.
- Stop Session — Stop the device session together with playback or presentation resources.
- Handle Finish — Distinguish a user stop from an interruption and clear local state.
Browse the generated Wiki navigation for the pages in this section.
| Mode | Capability | Media delivery | Host presentation |
|---|---|---|---|
| RTSP | supportsRTSPLiveStreaming |
The SDK coordinates the device hotspot and returns an rtsp:// address. |
Use AIBudsLiveStream or another compatible RTSP player. |
| JPEG | supportsJPEGImageLiveStreaming |
The SDK calls the JPEG data handler for each received image. | Decode each complete Data / NSData value and update the UI. |
-
AIBuds.xcframeworkprovides the device-facingLiveStreamingAPI, capability properties, session callbacks, andRTSPStreamParamsintegration. -
AIBudsFoundation.xcframeworkdefinesRTSPStreamParams. -
AIBudsLiveStream.xcframeworkprovides optional RTSP playback and RTSP-to-RTMP relay APIs. Starting the device stream does not automatically create a player or publisher.
- Check the mode-specific capability property before starting.
- Keep UI state separate from individual intermediate callbacks; only the start and finish handlers describe session-level state.
- Dispatch UIKit work to the main queue.
- Stop playback or relay resources together with the device session.
- Handle hotspot loss and non-user session termination as recoverable failures rather than successful stops.
- The public API does not expose an authoritative
isLiveStreamingproperty; maintain presentation state locally and reconcile it through callbacks. - RTSP uses a Wi-Fi hotspot workflow and can temporarily change the phone's network path.
- JPEG mode provides compressed images, not a decoded video-frame object.
- RTMP publishing in the Demo is an optional
AIBudsLiveStream.LiveStreamerworkflow and is not performed byLiveStreamingAPIitself.
AIBuds SDK documentation · Full documentation · API Reference
- Introduction
- Getting Started
- Core Concepts
-
Core Features
- Basic Features
- Device Info
- Find Device
- Physical Operations
- Work Mode
- Work Status
- Wear Detection
- Volume Control
- Music Control
- TWS
- Equalizer
- ANC
- Audio
- Camera
- Remote Camera
- File Import
- Teleprompter
- Segment Navigation
- Live Streaming
- Device Applications
- OTA
- Camera OTA
- Service Auth
- AI Services
- Voice Assistant
- Logging
- Advanced Topics
- Releases
- Troubleshooting