import { BaseProvider } from '../base/BaseProvider'; import { RTCConnectionConfig } from '../../types'; import { AgoraClient } from './types'; /** * Agora Provider. * * Implements RTCProvider interface for Agora platform. * Uses native SEI events to receive animation data from H.264 video tracks. * * @example * ```typescript * import { AvatarPlayer } from '@spatius/avatarkit-rtc'; * import { AgoraProvider } from '@spatius/avatarkit-rtc/providers/agora'; * * const provider = new AgoraProvider(); * const player = new AvatarPlayer(provider, renderer); * * await player.connect({ * appId: 'your-agora-app-id', * channel: 'your-channel', * token: 'your-token', * }); * ``` */ export declare class AgoraProvider extends BaseProvider { /** Provider name identifier */ readonly name = "agora"; constructor(_options?: AgoraProviderOptions); /** * Enable or disable debug logging. * @param enabled - Whether to enable debug logging */ setDebugLogging(enabled: boolean): void; connect(config: RTCConnectionConfig): Promise; disconnect(): Promise; /** * Attach to a host-owned Agora client (route B / external client) instead of * creating one. * * In this mode the SDK does **not** own the RTC lifecycle: the host app is * responsible for creating the client, subscribing to encoded video, and * joining the channel. The SDK only attaches its SEI listeners to extract * avatar animation payloads and render them. * * Must be called **before** the host joins the channel: `ENABLE_VIDEO_SEI` * is a global Agora parameter that only takes effect for subsequent joins, * and the SEI listeners must be attached before the first frames arrive. * * The host must NOT call {@link connect} on this provider in external-client * mode — the two paths are mutually exclusive. The host's client must use the * `h264` codec (SEI is only delivered over H.264). * * @param client - The host-owned `IAgoraRTCClient` to borrow. * @throws Error if a client is already set. */ attachExternalClient(client: AgoraClient): Promise; /** * Detach from a host-owned client attached via {@link attachExternalClient}: * remove our SEI listeners and release our reference, but never leave the * channel or drop the host's client — the host owns those. */ detachExternalClient(): void; getConnectionState(): string; publishAudioTrack(track?: MediaStreamTrack): Promise; unpublishAudioTrack(): Promise; /** * Get the native Agora RTC Client instance. * * Allows advanced users to access Agora-specific features * not exposed through the unified API. * * @returns The Agora IAgoraRTCClient instance, or null if not connected * * @example * ```typescript * const client = provider.getNativeClient(); * if (client) { * // Access Agora-specific features * console.log('Connection state:', client.connectionState); * } * ``` */ getNativeClient(): AgoraClient | null; } //# sourceMappingURL=AgoraProvider.d.ts.map