import { AgoraRteMediaSourceState, AgoraRteVideoSourceType } from '../../type'; import { AgoraRteCameraCaptureParams, AgoraRteCameraPosition, AgoraRteCameraTrackObserver, AgoraRteObservableTrack, AgoraRteVideoOrientation, AgoraRteVideoRenderConfig } from './type'; import { AgoraRteVideoEffectEnhancer } from './effect-enhancer'; /** * Interface for a video track from a camera in Agora RTE SDK. */ export interface AgoraRteCameraTrack extends AgoraRteObservableTrack { /** * Gets the device ID of the camera. * @returns The device ID of the camera. */ getDeviceId(): string; /** * Gets the current state of the camera. * @returns The current state of the camera. */ getState(): AgoraRteMediaSourceState; /** * Gets the video source type. * @returns The video source type. */ getVideoSourceType(): AgoraRteVideoSourceType; /** * Starts the camera. */ start(): number; /** * Stops the camera. */ stop(): number; /** * Starts the camera preview with the specified configuration and view. * @param config The configuration for the video render. * @param view The HTML element to render the video on. */ startPreview(config: AgoraRteVideoRenderConfig, view: unknown): number; /** * Stops the camera preview. * @param view The HTML element to render the video on. */ stopPreview(view: unknown): number; /** * Starts the camera test. */ startTest(): number; /** * Stops the camera test. */ stopTest(): number; /** * Sets the capture parameters for the camera. * @param params The parameters for the video capture. */ setCaptureParams(params: AgoraRteCameraCaptureParams): number; /** * Switches the camera position. * @returns The new camera position. */ switchPosition(): AgoraRteCameraPosition; /** * Gets the current camera position. * @returns The current camera position. */ getPosition(): AgoraRteCameraPosition; /** * Gets the video effect enhancer for the camera track. * @returns The video effect enhancer for the track. */ getVideoEffectEnhancer(): AgoraRteVideoEffectEnhancer; /** * Sets the video orientation for the camera track. * @param orientation The orientation to set. */ setVideoOrientation(orientation: AgoraRteVideoOrientation): number; }