// Copyright © 2022 BytePlusRTC All rights reserved. // SPDX-License-Identifier: MIT import { PositionInfo, Position, HumanOrientation, VideoDeviceInfo, AudioTrackType, AudioPlayType, VirtualBackgroundSource, RTCNativeLibraryLoader, EngineConfig, RTCLogConfig, AudioScenarioType, AudioProfileType, AnsMode, VoiceChangerType, VoiceReverbType, VoiceEqualizationConfig, VoiceReverbConfig, StreamIndex, VideoCanvas, IVideoSink, LocalVideoSinkConfig, RemoteStreamKey, RemoteVideoSinkConfig, RemoteVideoRenderConfig, VideoSuperResolutionMode, VideoDenoiseMode, MirrorType, RemoteMirrorType, VideoRotationMode, CameraId, AudioRoute, MessageConfig, AudioFrameCallbackMethod, AudioFormat, AudioProcessorMethod, VideoPreprocessorConfig, ZoomConfigType, ZoomDirectionType, VideoSourceType, VideoFrame, MixedStreamConfig, PushSingleStreamParam, VideoCaptureConfig, VideoEncoderConfig, ScreenVideoEncoderConfig, AlphaLayout, AudioSourceType, AudioRenderType, AudioFrame, PublishFallbackOption, SubscribeFallbackOptions, RemoteUserPriority, SEICountPerFrame, EffectBeautyMode, VideoOrientation, ProblemFeedbackOption, ProblemFeedbackInfo, RTCASRConfig, RecordingConfig, RecordingType, AudioRecordingConfig, ScreenMediaType, RTCEncodedVideoFrame, VideoDecoderConfig, EarMonitorMode, AudioPropertiesConfig, StreamSycnInfoConfig, TorchState, PublicStreaming, EchoTestConfig, RTCWatermarkConfig, CloudProxyInfo, NetworkTimeInfo, MediaTypeEnhancementConfig, LocalProxyConfiguration, VideoRotation, BackgroundMode, DivideModel, AudioPlaybackDevice, LiveTranscoding, VideoStreamDescription, OrientationMode, MuteState, UserInfo, RTCRoomConfig, RemoteVideoConfig, MediaStreamType, PauseResumeControlMediaType, ForwardStreamInfo, AudioSelectionPriority, SubtitleConfig, SubscribeMediaType, SubscribeVideoConfig, SingScoringConfig, StandardPitchInfo, MusicFilterType, MusicHotType, DownloadLyricType, ReceiveRange, AttenuationType, AudioMixingConfig, AudioMixingType, AudioMixingDualMonoMode, MediaPlayerConfig, MediaPlayerCustomSource, AudioEffectPlayerConfig } from './keytype'; import { int, String, List, float, Context, JSONObject, long, Intent, Runnable } from './types'; import { IKTVPlayerEventHandler, IFaceDetectionObserver, IRTCVideoEventHandler, IAudioFrameObserver, IAudioFrameProcessor, ILocalEncodedVideoFrameObserver, IRemoteEncodedVideoFrameObserver, IMixedStreamObserver, IPushSingleStreamToCDNObserver, IRTCASREngineEventHandler, IExternalVideoEncoderEventHandler, ISnapshotResultCallback, ILiveTranscodingObserver, IRTCRoomEventHandler, ISingScoringEventHandler, IKTVManagerEventHandler, IAudioFileFrameObserver, IMediaPlayerAudioFrameObserver, IMediaPlayerEventHandler, IAudioEffectPlayerEventHandler } from './callback'; export declare class ISpatialAudio { enableSpatialAudio(enable: boolean): void; disableRemoteOrientation(): void; updateSelfPosition(positionInfo: PositionInfo): int; updateRemotePosition(uid: String, positionInfo: PositionInfo): int; removeRemotePosition(uid: String): int; removeAllRemotePosition(): int; updatePosition(pos: Position): int; updateSelfOrientation(orientation: HumanOrientation): int; updateListenerPosition(pos: Position): int; updateListenerOrientation(orientation: HumanOrientation): int; } export declare class IVideoDeviceManager { enumerateVideoCaptureDevices(): List; setVideoCaptureDevice(deviceId: String): int; } export declare class IKTVPlayer { setPlayerEventHandler(playerEventHandler: IKTVPlayerEventHandler): void; playMusic(musicId: String, trackType: AudioTrackType, playType: AudioPlayType): void; pauseMusic(musicId: String): void; resumeMusic(musicId: String): void; stopMusic(musicId: String): void; seekMusic(musicId: String, position: int): void; setMusicVolume(musicId: String, volume: int): void; switchAudioTrackType(musicId: String): void; setMusicPitch(musicId: String, pitch: int): void; } export declare class IVideoEffect { initCVResource(licenseFile: String, algoModelDir: String): int; enableVideoEffect(): int; disableVideoEffect(): int; setEffectNodes(effectNodes: List): int; updateEffectNode(effectNode: String, key: String, value: float): int; setColorFilter(filterRes: String): int; setColorFilterIntensity(intensity: float): int; enableVirtualBackground(backgroundStickerRes: String, source: VirtualBackgroundSource): int; disableVirtualBackground(): int; enableFaceDetection(observer: IFaceDetectionObserver, intervalMs: int, faceModelPath: String): int; disableFaceDetection(): int; registerFaceDetectionObserver(observer: IFaceDetectionObserver, intervalMs: int): int; } export declare class IRTCAudioDeviceManager { startAudioPlaybackDeviceTest(testAudioFilePath: String, interval: int): int; stopAudioPlaybackDeviceTest(): int; } export declare class RTCVideo { static readonly mInstance: RTCVideo; static readonly mInstanceEx: RTCVideo; static readonly mRtcNativeLibraryLoader: RTCNativeLibraryLoader; static readonly TAG = "RtcVideo"; static createRTCVideo(context: Context, handler: IRTCVideoEventHandler, config: EngineConfig): RTCVideo; static createRTCVideo_context$appId$handler$eglContext$parameters(context: Context, appId: String, handler: IRTCVideoEventHandler, eglContext: Object, parameters: JSONObject): RTCVideo; static destroyRTCVideo(): void; static getSDKVersion(): String; static setLogConfig(logConfig: RTCLogConfig): int; static getErrorDescription(code: int): String; static setDeviceId(deviceId: String): int; constructor(); setRtcVideoEventHandler(engineEventHandler: IRTCVideoEventHandler): int; getAudioDeviceManager(): IRTCAudioDeviceManager; startVideoCapture(): int; stopVideoCapture(): int; startAudioCapture(): int; stopAudioCapture(): int; setAudioScenario(audioScenario: AudioScenarioType): int; setAudioProfile(audioProfile: AudioProfileType): int; setAnsMode(ansMode: AnsMode): int; setVoiceChangerType(voiceChanger: VoiceChangerType): int; setVoiceReverbType(voiceReverb: VoiceReverbType): int; setLocalVoiceEqualization(voiceEqualizationConfig: VoiceEqualizationConfig): int; setLocalVoiceReverbParam(config: VoiceReverbConfig): int; enableLocalVoiceReverb(enable: boolean): int; setLocalVideoCanvas(streamIndex: StreamIndex, videoCanvas: VideoCanvas): int; updateLocalVideoCanvas(streamIndex: StreamIndex, renderMode: int, backgroundColor: int): int; setLocalVideoRender(index: StreamIndex, videoSink: IVideoSink, config: LocalVideoSinkConfig): int; setRemoteVideoRender(streamKey: RemoteStreamKey, videoSink: IVideoSink, config: RemoteVideoSinkConfig): int; updateRemoteStreamVideoCanvas(streamKey: RemoteStreamKey, remoteVideoRenderConfig: RemoteVideoRenderConfig): int; setRemoteVideoCanvas(streamKey: RemoteStreamKey, videoCanvas: VideoCanvas): int; setRemoteVideoSuperResolution(streamKey: RemoteStreamKey, mode: VideoSuperResolutionMode): int; setVideoDenoiser(mode: VideoDenoiseMode): int; setLocalVideoMirrorType(mirrorType: MirrorType): int; setRemoteVideoMirrorType(remoteStreamKey: RemoteStreamKey, mirrorType: RemoteMirrorType): int; setVideoRotationMode(rotationMode: VideoRotationMode): int; switchCamera(cameraId: CameraId): int; setAudioRoute(audioRoute: AudioRoute): int; getAudioRoute(): AudioRoute; setDefaultAudioRoute(route: AudioRoute): int; enableExternalSoundCard(enable: boolean): int; muteAudioCapture(index: StreamIndex, mute: boolean): int; setCaptureVolume(index: StreamIndex, volume: int): int; setPlaybackVolume(volume: int): int; setLocalVoicePitch(pitch: int): int; enableVocalInstrumentBalance(enable: boolean): int; enablePlaybackDucking(enable: boolean): int; login(token: String, uid: String): int; logout(): int; updateLoginToken(token: String): int; setServerParams(signature: String, url: String): int; getPeerOnlineStatus(peerUserID: String): int; sendUserMessageOutsideRoom(uid: String, message: String, config: MessageConfig): long; sendUserBinaryMessageOutsideRoom(uid: String, buffer: ArrayBuffer, config: MessageConfig): long; sendServerMessage(message: String): long; sendServerBinaryMessage(buffer: ArrayBuffer): long; startNetworkDetection(isTestUplink: boolean, expectedUplinkBitrate: int, isTestDownlink: boolean, expectedDownlinkBitrate: int): int; stopNetworkDetection(): int; enableAudioFrameCallback(method: AudioFrameCallbackMethod, format: AudioFormat): int; disableAudioFrameCallback(method: AudioFrameCallbackMethod): int; registerAudioFrameObserver(observer: IAudioFrameObserver): int; registerAudioProcessor(processor: IAudioFrameProcessor): int; enableAudioProcessor(method: AudioProcessorMethod, format: AudioFormat): int; disableAudioProcessor(method: AudioProcessorMethod): int; registerLocalVideoProcessor(processor: IVideoProcessor, config: VideoPreprocessorConfig): int; setVideoDigitalZoomConfig(type: ZoomConfigType, size: float): int; setVideoDigitalZoomControl(direction: ZoomDirectionType): int; startVideoDigitalZoomControl(direction: ZoomDirectionType): int; stopVideoDigitalZoomControl(): int; registerLocalEncodedVideoFrameObserver(observer: ILocalEncodedVideoFrameObserver): int; registerRemoteEncodedVideoFrameObserver(observer: IRemoteEncodedVideoFrameObserver): int; setVideoSourceType(index: StreamIndex, type: VideoSourceType): int; pushExternalVideoFrame(frame: VideoFrame): int; startPushMixedStreamToCDN(taskId: String, mixedConfig: MixedStreamConfig, observer: IMixedStreamObserver): int; updatePushMixedStreamToCDN(taskId: String, mixedConfig: MixedStreamConfig): int; startPushSingleStreamToCDN(taskId: String, param: PushSingleStreamParam, observer: IPushSingleStreamToCDNObserver): int; stopPushStreamToCDN(taskId: String): int; setVideoCaptureConfig(videoCaptureConfig: VideoCaptureConfig): int; enableSimulcastMode(enabled: boolean): int; setVideoEncoderConfig(channelSolutions: Array): int; setScreenVideoEncoderConfig(screenSolution: ScreenVideoEncoderConfig): int; enableAlphaChannelVideoEncode(streamIndex: StreamIndex, alphaLayout: AlphaLayout): int; disableAlphaChannelVideoEncode(streamIndex: StreamIndex): int; setAudioSourceType(type: AudioSourceType): int; setAudioRenderType(type: AudioRenderType): int; pushExternalAudioFrame(audioFrame: AudioFrame): int; pullExternalAudioFrame(audioFrame: AudioFrame): int; pushScreenVideoFrame(videoFrame: VideoFrame): int; setRemoteAudioPlaybackVolume(roomId: String, uid: String, volume: int): int; createRTCRoom(roomId: String): RTCRoom; setPublishFallbackOption(option: PublishFallbackOption): int; setSubscribeFallbackOption(option: SubscribeFallbackOptions): int; setRemoteUserPriority(roomid: String, uid: String, priority: RemoteUserPriority): int; sendSEIMessage(streamIndex: StreamIndex, message: ArrayBuffer, repeatCount: int, mode: SEICountPerFrame): int; setBusinessId(businessId: String): int; setEncryptInfo(aesType: int, key: String): int; getVideoEffectInterface(): IVideoEffect; enableEffectBeauty(enable: boolean): int; setBeautyIntensity(beautyMode: EffectBeautyMode, intensity: float): int; setVideoOrientation(orientation: VideoOrientation): int; setRuntimeParameters(params: JSONObject): int; feedback(types: List, info: ProblemFeedbackInfo): int; getNativeHandle(): long; startASR(asrConfig: RTCASRConfig, handler: IRTCASREngineEventHandler): int; stopASR(): int; startFileRecording(type: StreamIndex, config: RecordingConfig, recordingType: RecordingType): int; stopFileRecording(type: StreamIndex): int; startAudioRecording(config: AudioRecordingConfig): int; stopAudioRecording(): int; getAudioEffectPlayer(): IAudioEffectPlayer; getMediaPlayer(playerId: int): IMediaPlayer; setScreenAudioSourceType(sourceType: AudioSourceType): int; setScreenAudioStreamIndex(index: StreamIndex): int; pushScreenAudioFrame(audioFrame: AudioFrame): int; startScreenCapture(type: ScreenMediaType, mediaProjectionResultData: Intent): int; updateScreenCapture(type: ScreenMediaType): int; stopScreenCapture(): int; setExternalVideoEncoderEventHandler(handler: IExternalVideoEncoderEventHandler): int; pushExternalEncodedVideoFrame(streamIndex: StreamIndex, videoIndex: int, encodedVideoFrame: RTCEncodedVideoFrame): int; setVideoDecoderConfig(key: RemoteStreamKey, config: VideoDecoderConfig): int; requestRemoteVideoKeyFrame(streamKey: RemoteStreamKey): int; setEarMonitorMode(mode: EarMonitorMode): int; setEarMonitorVolume(volume: int): int; enableAudioPropertiesReport(config: AudioPropertiesConfig): int; sendStreamSyncInfo(data: ArrayBuffer, config: StreamSycnInfoConfig): int; isCameraTorchSupported(): boolean; isCameraZoomSupported(): boolean; setCameraZoomRatio(zoom: float): int; getCameraZoomMaxRatio(): float; setCameraTorch(torchState: TorchState): int; isCameraFocusPositionSupported(): boolean; setCameraFocusPosition(x: float, y: float): int; isCameraExposurePositionSupported(): boolean; setCameraExposurePosition(x: float, y: float): int; setCameraExposureCompensation(val: float): int; enableCameraAutoExposureFaceMode(enable: boolean): int; setCameraAdaptiveMinimumFrameRate(framerate: int): int; startPushPublicStream(publicStreamId: String, publicStream: PublicStreaming): int; stopPushPublicStream(publicStreamId: String): int; updatePublicStreamParam(publicStreamId: String, transcoding: PublicStreaming): int; startPlayPublicStream(publicStreamId: String): int; stopPlayPublicStream(publicStreamId: String): int; setPublicStreamVideoCanvas(publicStreamId: String, canvas: VideoCanvas): int; setPublicStreamVideoSink(publicStreamId: String, videoSink: IVideoSink, requiredFormat: int): int; setPublicStreamAudioPlaybackVolume(publicStreamId: String, volume: int): int; startEchoTest(config: EchoTestConfig, delayTime: int): int; stopEchoTest(): int; setVideoWatermark(streamIndex: StreamIndex, imagePath: String, watermarkConfig: RTCWatermarkConfig): int; clearVideoWatermark(streamIndex: StreamIndex): int; setDummyCaptureImagePath(filePath: String): int; takeLocalSnapshot(streamIndex: StreamIndex, callback: ISnapshotResultCallback): long; takeRemoteSnapshot(streamKey: RemoteStreamKey, callback: ISnapshotResultCallback): long; startCloudProxy(cloudProxiesInfo: List): int; stopCloudProxy(): int; getSingScoringManager(): ISingScoringManager; getNetworkTimeInfo(): NetworkTimeInfo; getKTVManager(): IKTVManager; startHardwareEchoDetection(testAudioFilePath: String): int; stopHardwareEchoDetection(): int; setCellularEnhancement(config: MediaTypeEnhancementConfig): int; setLocalProxy(configurations: List): int; getVideoDeviceManager(): IVideoDeviceManager; setVideoCaptureRotation(rotation: VideoRotation): int; setLocalVideoSink(index: StreamIndex, videoSink: IVideoSink, requiredFormat: int): int; setRemoteVideoSink(streamKey: RemoteStreamKey, videoSink: IVideoSink, requiredFormat: int): int; updateRemoteStreamVideoCanvas_streamKey$renderMode$backgroundColor(streamKey: RemoteStreamKey, renderMode: int, backgroundColor: int): int; replaceBackground(mode: BackgroundMode, divideModel: DivideModel): int; setAudioPlaybackDevice(audioPlaybackDevice: AudioPlaybackDevice): int; startLiveTranscoding(taskId: String, liveTranscode: LiveTranscoding, observer: ILiveTranscodingObserver): int; stopLiveTranscoding(taskId: String): int; updateLiveTranscoding(taskId: String, transcoding: LiveTranscoding): int; setVideoEncoderConfig_videoStreamDescriptions$orientationMode(videoStreamDescriptions: List, orientationMode: OrientationMode): int; setVideoEncoderConfig_streamIndex$videoStreamDescriptions(streamIndex: StreamIndex, videoStreamDescriptions: List): int; setOnDestroyCompletedCallback(callback: Runnable): int; sendSEIMessage_streamIndex$message$repeatCount(streamIndex: StreamIndex, message: ArrayBuffer, repeatCount: int): int; checkVideoEffectLicense(context: Context, licenseFile: String): int; setVideoEffectAlgoModelPath(modelPath: String): int; enableVideoEffect(enable: boolean): int; setVideoEffectNodes(effectNodes: List): int; updateVideoEffectNode(effectNode: String, key: String, value: float): int; setBackgroundSticker(modelPath: String, source: VirtualBackgroundSource): int; setVideoEffectColorFilter(resFile: String): int; setVideoEffectColorFilterIntensity(intensity: float): int; registerFaceDetectionObserver(observer: IFaceDetectionObserver, interval: int): int; getAudioMixingManager(): IAudioMixingManager; muteAudioPlayback(muteState: MuteState): int; } export declare class RTCRoom { destroy(): void; joinRoom(token: String, userInfo: UserInfo, roomConfig: RTCRoomConfig): int; setRTCRoomEventHandler(rtcRoomEventHandler: IRTCRoomEventHandler): int; leaveRoom(): int; setUserVisibility(enable: boolean): int; updateToken(token: String): int; sendUserMessage(userId: String, messageStr: String, config: MessageConfig): long; sendUserBinaryMessage(userId: String, buffer: ArrayBuffer, config: MessageConfig): long; sendRoomMessage(messageStr: String): long; sendRoomBinaryMessage(buffer: ArrayBuffer): long; setMultiDeviceAVSync(audioUserId: String): int; setRemoteVideoConfig(userId: String, remoteVideoConfig: RemoteVideoConfig): int; /** {en} * @detail api * @valid since 3.60. * @brief Start or stop publishing video streams captured by camera in the current room. * @param publish Whether to publish the media stream. * @return * - 0: Success. * - < 0 : Fail. See ReturnStatus{@link #ReturnStatus} for more details * @note * - You don't need to call this API if you set it to Auto-publish when calling joinRoom{@link #RTCRoom#joinRoom}. * - An invisible user cannot publish media streams. Call setUserVisibility{@link #RTCRoom#setUserVisibility} to change your visibility in the room. * - Call publishScreenAudio{@link #RTCRoom#publishScreenAudio} (not supported on Linux) and/or publishScreenVideo{@link #RTCRoom#publishScreenVideo} to start or stop screen sharing. * - Call publishStreamAudio{@link #RTCRoom#publishStreamAudio} to start or stop publishing the audio stream captured by the microphone. * - Call startForwardStreamToRooms{@link #RTCRoom#startForwardStreamToRooms} to forward the published streams to the other rooms. * - After you call this API, the other users in the room will receive onUserPublishStreamVideo{@link #IRTCRoomEventHandler#onUserPublishStreamVideo}. Those who successfully received your streams will receive onFirstRemoteVideoFrameDecoded{@link #IRTCEngineEventHandler#onFirstRemoteVideoFrameDecoded} at the same time. * */ publishStreamVideo(publish: boolean): int; /** {en} * @detail api * @valid since 3.60. * @brief Start or stop publishing media streams captured by the local microphone in the current room. * @param publish Whether to publish the media stream. * @return * - 0: Success. * - < 0 : Fail. See ReturnStatus{@link #ReturnStatus} for more details * @note * - You don't need to call this API if you set it to Auto-publish when calling joinRoom{@link #RTCRoom#joinRoom}. * - An invisible user cannot publish media streams. Call setUserVisibility{@link #RTCRoom#setUserVisibility} to change your visibility in the room. * - Call publishScreenAudio{@link #RTCRoom#publishScreenAudio} (not supported on Linux) and/or publishScreenVideo{@link #RTCRoom#publishScreenVideo} to start or stop screen sharing. * - Call publishStreamVideo{@link #RTCRoom#publishStreamVideo} to start or stop publishing the video stream captured by the camera. * - Call startForwardStreamToRooms{@link #RTCRoom#startForwardStreamToRooms} to forward the published streams to the other rooms. * - After you call this API, the other users in the room will receive onUserPublishStreamAudio{@link #IRTCRoomEventHandler#onUserPublishStreamAudio}. Those who successfully received your streams will receive onFirstRemoteAudioFrame{@link #IRTCEngineEventHandler#onFirstRemoteAudioFrame} at the same time. * */ publishStreamAudio(publish: boolean): int; /** {en} * @detail api * @valid since 3.60. * @brief Start or stop sharing the local screen in the room. * If you need to share your screen in multiple rooms, you can use the same uid to join multiple rooms and call this API in each room. Also, you can publish different types of screen-sharing streams in different rooms. * @param publish Whether to publish video stream. * @return * - 0: Success. * - < 0 : Fail. See ReturnStatus{@link #ReturnStatus} for more details * @note * - You need to call this API to publish screen even if you set it to Auto-publish when calling joinRoom{@link #RTCRoom#joinRoom}. * - An invisible user cannot publish media streams. Call setUserVisibility{@link #RTCRoom#setUserVisibility} to change your visibility in the room. * - Call publishScreenAudio{@link #RTCRoom#publishScreenAudio} (not supported on Linux) to start or stop sharing computer audio. * - Call publishStreamVideo{@link #RTCRoom#publishStreamVideo} to start or stop publishing the video stream captured by the camera. * - Call publishStreamAudio{@link #RTCRoom#publishStreamAudio} to start or stop publishing the audio stream captured by the microphone. * - Call startForwardStreamToRooms{@link #RTCRoom#startForwardStreamToRooms} to forward the published streams to the other rooms. * - After you called this API, the other users in the room will receive onUserPublishScreenVideo{@link #IRTCRoomEventHandler#onUserPublishScreenVideo}. Those who successfully received your streams will receive onFirstRemoteVideoFrameDecoded{@link #IRTCEngineEventHandler#onFirstRemoteVideoFrameDecoded} at the same time. * - After calling this API, you'll receive onScreenVideoFrameSendStateChanged{@link #IRTCEngineEventHandler#onScreenVideoFrameSendStateChanged}. * - Refer to [Sharing Screen in PC](https://docs.byteplus.com/byteplus-rtc/docs/70144) for more information. * */ publishScreenVideo(publish: boolean): int; /** {en} * @hidden(Linux) * @detail api * @valid since 3.60. * @brief Manually publishes local screen-sharing streams in the current room.
* If you need to share your screen in multiple rooms, you can use the same uid to join multiple rooms and call this API in each room. Also, you can publish different types of screen-sharing streams in different rooms. * @param publish Media stream type, used for specifying whether to publish audio stream or video stream. * @return * - 0: Success. * - < 0 : Fail. See ReturnStatus{@link #ReturnStatus} for more details * @note * - You need to call this API to publish screen even if you set it to Auto-publish when calling joinRoom{@link #RTCRoom#joinRoom}. * - An invisible user cannot publish media streams. Call setUserVisibility{@link #RTCRoom#setUserVisibility} to change your visibility in the room. * - Call publishScreenVideo{@link #RTCRoom#publishScreenVideo} to start or stop sharing the local screen. * - Call publishStreamVideo{@link #RTCRoom#publishStreamVideo} to start or stop publishing the video stream captured by the camera. * - Call publishStreamAudio{@link #RTCRoom#publishStreamAudio} to start or stop publishing the audio stream captured by the microphone. * - Call startForwardStreamToRooms{@link #RTCRoom#startForwardStreamToRooms} to forward the published streams to the other rooms. * - After you called this API, the other users in the room will receive onUserPublishScreenAudio{@link #IRTCRoomEventHandler#onUserPublishScreenAudio}. Those who successfully received your streams will receive onFirstRemoteAudioFrame{@link #IRTCEngineEventHandler#onFirstRemoteAudioFrame} at the same time. * - Refer to [Sharing Screen in PC](https://docs.byteplus.com/byteplus-rtc/docs/70144) for more information. * */ publishScreenAudio(publish: boolean): int; /** {en} * @detail api * @valid since 3.60. * @brief Subscribes to specific remote media streams captured by the local camera. Or update the subscribe options of the subscribed user. * @param userId The ID of the remote user who published the target video stream. * @param subscribe Whether to subscribe to the stream. * @return API call result:
* - 0: Success. * - <0: Failure. See ReturnStatus{@link #ReturnStatus} for specific reasons. * @note * - Calling this API to update the subscribe configuration when the user has subscribed the remote user either by calling this API or by auto-subscribe. * - You must first get the remote stream information through onUserPublishStreamVideo{@link #IRTCRoomEventHandler#onUserPublishStreamVideo} before calling this API to subscribe to streams accordingly. * - After calling this API, you will be informed of the calling result with onVideoSubscribeStateChanged{@link #IRTCRoomEventHandler#onVideoSubscribeStateChanged}. * - Once the local user subscribes to the stream of a remote user, the subscription to the remote user will sustain until the local user leaves the room or unsubscribe from it by calling subscribeStreamVideo{@link #RTCRoom#subscribeStreamVideo}. * - Any other exceptions will be included in onVideoSubscribeStateChanged{@link #IRTCRoomEventHandler#onVideoSubscribeStateChanged}, see SubscribeStateChangeReason{@link #SubscribeStateChangeReason} for the reasons. * */ subscribeStreamVideo(userId: String, subscribe: boolean): int; /** {en} * @detail api * @valid since 3.60. * @brief Subscribes to specific remote media streams captured by the local microphone. Or update the subscribe options of the subscribed user. * @param userId The ID of the remote user who published the target media stream. * @param subscribe Whether to subscribe to the audio stream. * @return API call result:
* - 0: Success. * - <0: Failure. See ReturnStatus{@link #ReturnStatus} for specific reasons. * @note * - Calling this API to update the subscribe configuration when the user has subscribed the remote user either by calling this API or by auto-subscribe. * - You must first get the remote stream information through onUserPublishStreamAudio{@link #IRTCRoomEventHandler#onUserPublishStreamAudio} before calling this API to subscribe to streams accordingly. * - After calling this API, you will be informed of the calling result with onAudioSubscribeStateChanged{@link #IRTCRoomEventHandler#onAudioSubscribeStateChanged}. * - Once the local user subscribes to the stream of a remote user, the subscription to the remote user will sustain until the local user leaves the room or unsubscribe from it by calling subscribeStreamAudio{@link #RTCRoom#subscribeStreamAudio}. * - Any other exceptions will be included in onAudioSubscribeStateChanged{@link #IRTCRoomEventHandler#onAudioSubscribeStateChanged}, see ErrorCode{@link #ErrorCode} for the reasons. * */ subscribeStreamAudio(userId: String, subscribe: boolean): int; /** {en} * @detail api * @valid since 3.60. * @brief Subscribes to specific screen sharing media stream. Or update the subscribe options of the subscribed user. * @param userId The ID of the remote user who published the target screen video stream. * @param subscribe Whether to subscribe to the screen video stream. * @return API call result:
* - 0: Success. * - <0: Failure. See ReturnStatus{@link #ReturnStatus} for specific reasons. * @note * - Calling this API to update the subscribe configuration when the user has subscribed the remote user either by calling this API or by auto-subscribe. * - You must first get the remote stream information through onUserPublishScreenVideo{@link #IRTCRoomEventHandler#onUserPublishScreenVideo} before calling this API to subscribe to streams accordingly. * - After calling this API, you will be informed of the calling result with onScreenVideoSubscribeStateChanged{@link #IRTCRoomEventHandler#onScreenVideoSubscribeStateChanged}. * - Once the local user subscribes to the stream of a remote user, the subscription to the remote user will sustain until the local user leaves the room or unsubscribe from it by calling subscribeScreenVideo{@link #RTCRoom#subscribeScreenVideo}. * - Any other exceptions will be included in onScreenVideoSubscribeStateChanged{@link #IRTCRoomEventHandler#onScreenVideoSubscribeStateChanged}, see SubscribeStateChangeReason{@link #SubscribeStateChangeReason} for the reasons. * */ subscribeScreenVideo(userId: String, subscribe: boolean): int; /** {en} * @detail api * @valid since 3.60. * @brief Subscribes to specific screen sharing media stream. Or update the subscribe options of the subscribed user. * @param userId The ID of the remote user who published the target screen audio stream. * @param subscribe Whether to subscribe to the screen audio stream. * @return API call result:
* - 0: Success. * - <0: Failure. See ReturnStatus{@link #ReturnStatus} for specific reasons. * @note * - Calling this API to update the subscribe configuration when the user has subscribed the remote user either by calling this API or by auto-subscribe. * - You must first get the remote stream information through onUserPublishScreenAudio{@link #IRTCRoomEventHandler#onUserPublishScreenAudio} before calling this API to subscribe to streams accordingly. * - After calling this API, you will be informed of the calling result with onScreenAudioSubscribeStateChanged{@link #IRTCRoomEventHandler#onScreenAudioSubscribeStateChanged}. * - Once the local user subscribes to the stream of a remote user, the subscription to the remote user will sustain until the local user leaves the room or unsubscribe from it by calling subscribeScreenAudio{@link #RTCRoom#subscribeScreenAudio}. * - Any other exceptions will be included in onScreenAudioSubscribeStateChanged{@link #IRTCRoomEventHandler#onScreenAudioSubscribeStateChanged}, see SubscribeStateChangeReason{@link #SubscribeStateChangeReason} for the reasons. * */ subscribeScreenAudio(userId: String, subscribe: boolean): int; subscribeAllStreams(type: MediaStreamType): int; unsubscribeAllStreams(type: MediaStreamType): int; pauseAllSubscribedStream(mediaType: PauseResumeControlMediaType): int; resumeAllSubscribedStream(mediaType: PauseResumeControlMediaType): int; startForwardStreamToRooms(forwardStreamInfos: List): int; updateForwardStreamToRooms(forwardStreamInfos: List): int; stopForwardStreamToRooms(): int; pauseForwardStreamToAllRooms(): int; resumeForwardStreamToAllRooms(): int; getRangeAudio(): IRangeAudio; getSpatialAudio(): ISpatialAudio; setRemoteRoomAudioPlaybackVolume(volume: int): int; setAudioSelectionConfig(audioSelectionPriority: AudioSelectionPriority): int; setRoomExtraInfo(key: String, value: String): long; startSubtitle(subtitleConfig: SubtitleConfig): int; stopSubtitle(): int; getRoomId(): String; subscribeUserStream(uid: String, streamType: StreamIndex, mediaType: SubscribeMediaType, subscribeVideoConfig: SubscribeVideoConfig): int; } export declare class IVideoProcessor { processVideoFrame(frame: VideoFrame): VideoFrame; onGLEnvInitiated(): void; onGLEnvRelease(): void; } export declare class ISingScoringManager { initSingScoring(singScoringAppkey: String, singAcoringToken: String, handler: ISingScoringEventHandler): int; setSingScoringConfig(config: SingScoringConfig): int; getStandardPitchInfo(midiFilepath: String): List; startSingScoring(position: int, scoringInfoInterval: int): int; stopSingScoring(): int; getLastSentenceScore(): int; getTotalScore(): int; getAverageScore(): int; } export declare class IKTVManager { setKTVManagerEventHandler(ktvManagerEventHandler: IKTVManagerEventHandler): void; setMaxCacheSize(maxCacheSizeMB: int): void; getMusicList(pageNum: int, pageSize: int, filters: Array): void; searchMusic(keyWord: String, pageNum: int, pageSize: int, filters: Array): void; getHotMusic(hotTypes: Array, filters: Array): void; getMusicDetail(musicId: String): void; downloadMusic(musicId: String): int; downloadLyric(musicId: String, lyricType: DownloadLyricType): int; downloadMidi(musicId: String): int; cancelDownload(downloadId: int): void; clearCache(): void; getKTVPlayer(): IKTVPlayer; } export declare class IRangeAudio { enableRangeAudio(enable: boolean): void; updatePosition(pos: Position): int; updateReceiveRange(range: ReceiveRange): int; setAttenuationModel(type: AttenuationType, coefficient: float): int; setNoAttenuationFlags(flags: List): void; } export declare class IAudioMixingManager { startAudioMixing(mixId: int, filePath: String, config: AudioMixingConfig): void; stopAudioMixing(mixId: int): void; stopAllAudioMixing(): void; pauseAudioMixing(mixId: int): void; pauseAllAudioMixing(): void; resumeAudioMixing(mixId: int): void; resumeAllAudioMixing(): void; preloadAudioMixing(mixId: int, filePath: String): void; unloadAudioMixing(mixId: int): void; setAllAudioMixingVolume(volume: int, type: AudioMixingType): void; setAudioMixingVolume(mixId: int, volume: int, type: AudioMixingType): void; getAudioMixingDuration(mixId: int): int; getAudioMixingCurrentPosition(mixId: int): int; setAudioMixingPosition(mixId: int, position: int): void; getAudioMixingPlaybackDuration(mixId: int): int; setAudioMixingDualMonoMode(mixId: int, mode: AudioMixingDualMonoMode): void; setAudioMixingPitch(mixId: int, pitch: int): void; setAudioMixingPlaybackSpeed(mixId: int, speed: int): int; setAudioMixingLoudness(mixId: int, loudness: float): void; setAudioMixingProgressInterval(mixId: int, interval: long): void; enableAudioMixingFrame(mixId: int, type: AudioMixingType): void; disableAudioMixingFrame(mixId: int): void; pushAudioMixingFrame(mixId: int, audioFrame: AudioFrame): int; getAudioTrackCount(mixId: int): int; selectAudioTrack(mixId: int, audioTrackIndex: int): void; registerAudioFileFrameObserver(observer: IAudioFileFrameObserver): void; } export declare class IMediaPlayer { open(filePath: String, config: MediaPlayerConfig): int; start(): int; openWithCustomSource(source: MediaPlayerCustomSource, config: MediaPlayerConfig): int; stop(): int; pause(): int; resume(): int; setVolume(volume: int, type: AudioMixingType): int; getVolume(type: AudioMixingType): int; getTotalDuration(): int; getPlaybackDuration(): int; getPosition(): int; setAudioPitch(pitch: int): int; setPosition(position: int): int; setAudioDualMonoMode(mode: AudioMixingDualMonoMode): int; getAudioTrackCount(): int; selectAudioTrack(index: int): int; setPlaybackSpeed(speed: int): int; setProgressInterval(interval: long): int; setLoudness(loudness: float): int; registerAudioFrameObserver(observer: IMediaPlayerAudioFrameObserver): int; pushExternalAudioFrame(audioFrame: AudioFrame): int; setEventHandler(handler: IMediaPlayerEventHandler): int; } export declare class IAudioEffectPlayer { start(effectId: int, filePath: String, config: AudioEffectPlayerConfig): int; stop(effectId: int): int; stopAll(): int; preload(effectId: int, filePath: String): int; unload(effectId: int): int; unloadAll(): int; pause(effectId: int): int; pauseAll(): int; resume(effectId: int): int; resumeAll(): int; setPosition(effectId: int, position: int): int; getPosition(effectId: int): int; setVolume(effectId: int, volume: int): int; setVolumeAll(volume: int): int; getVolume(effectId: int): int; getDuration(effectId: int): int; setEventHandler(handler: IAudioEffectPlayerEventHandler): int; }