import { AgoraRtcVideoCanvas } from './canvas'; import { AgoraRtcStreamLayer } from './type'; export interface AgoraRtcChannelSubscriber { /** * Subscribes to a remote video stream. * @param streamId The ID of the stream. * @param streamLayer The layer to subscribe (low/high, later calls overwrite earlier records). * @returns The result of the operation. */ subscribeRemoteVideoStream(streamId: string, streamLayer: AgoraRtcStreamLayer): number; /** * Unsubscribes from a remote video stream. * @param streamId The ID of the stream. * @returns The result of the operation. */ unsubscribeRemoteVideoStream(streamId: string): number; /** * Subscribes to a remote audio stream. * @param streamId The ID of the stream. * @returns The result of the operation. */ subscribeRemoteAudioStream(streamId: string): number; /** * Unsubscribes from a remote audio stream. * @param streamId The ID of the stream. * @returns The result of the operation. */ unsubscribeRemoteAudioStream(streamId: string): number; /** * Enables audio volume indication. * @param interval The interval in milliseconds. * @returns The result of the operation. */ enableAudioVolumeIndication(interval: number): number; /** * Adds a video canvas to a remote stream. * @param streamId The ID of the stream. * @param canvas The canvas to add. * @returns The result of the operation. */ addVideoCanvas(streamId: string, canvas: AgoraRtcVideoCanvas): number; /** * Removes a video canvas from a remote stream. * @param streamId The ID of the stream. * @param canvas The canvas to remove. * @returns The result of the operation. */ removeVideoCanvas(streamId: string, canvas: AgoraRtcVideoCanvas): number; /** * Sets the volume of a remote audio stream. * @param streamId The ID of the stream. * @param volume The volume to set. * @returns The result of the operation. */ setRemoteAudioStreamVolume(streamId: string, volume: number): number; /** * Takes a snapshot of a remote stream. * @param streamId The ID of the stream. * @returns The snapshot. */ takeSnapshot(streamId: string): ImageData; /** * resubscribe all remote streams * @returns The result of the operation. */ resume(): number; /** * pause all remote streams * @returns The result of the operation. */ pause(): number; /** * release resources */ release(): void; }