NERTC iOS SDK V5.6.40
载入中...
搜索中...
未找到
NERtcEngine类 参考

#include <NERtcEngine.h>

类 NERtcEngine 继承关系图:
<INERtcEngineEx> <INERtcEngine>

类方法

(instancetype) + sharedEngine
 
(int) + destroyEngine
 
(NSString *) + getVersion
 

额外继承的成员函数

- 实例方法 继承自 <INERtcEngineEx>
(int) - enableDualStreamMode:
 
(int) - setLocalMediaPriority:preemptive:
 
(int) - setLocalPublishFallbackOption:
 
(int) - setRemoteSubscribeFallbackOption:
 
(int) - muteLocalAudio:
 
(int) - subscribeRemoteAudio:forUserID:
 
(int) - subscribeAllRemoteAudio:
 
(int) - setAudioSubscribeOnlyBy:
 
(int) - enableLocalSubStreamAudio:
 
(int) - subscribeRemoteSubStreamAudio:forUserID:
 
(int) - muteLocalSubStreamAudio:
 
(int) - setExternalSubStreamAudioSource:sampleRate:channels:
 
(int) - pushExternalSubStreamAudioFrame:
 
(int) - subscribeRemoteVideo:forUserID:streamType:
 
(int) - startPreview
 
(int) - startPreview:
 
(int) - stopPreview
 
(int) - stopPreview:
 
(int) - setLocalRenderScaleMode:
 
(int) - setLocalRenderScaleMode:streamType:
 
(int) - setRemoteRenderScaleMode:forUserID:
 
(int) - setRemoteRenderScaleMode:forUserID:streamType:
 
(int) - setVideoRotationMode:
 
(int) - muteLocalVideo:
 
(int) - muteLocalVideo:streamType:
 
(int) - setLoudspeakerMode:
 
(int) - getLoudspeakerMode:
 
(int) - startAudioDump
 
(int) - startAudioDumpWithType:
 
(int) - stopAudioDump
 
(int) - setRemoteHighPriorityAudioStream:forUserID:streamType:
 
(int) - switchCameraWithPosition:
 
(int) - updatePermissionKey:
 
(BOOL) - isFeatureSupportedWithType:
 
(NERtcFeatureSupportType) - getFeatureSupportedType:
 
(NERtcNetworkConnectionType) - getNetworkType
 
(int) - setExternalVideoSource:isScreen:
 
(int) - setExternalVideoSource:streamType:
 
(int) - pushExternalVideoFrame:
 
(int) - pushExternalVideoFrame:streamType:
 
(int) - setupLocalSubStreamVideoCanvas:
 
(int) - setupLocalVideoCanvas:streamType:
 
(int) - startScreenCapture:
 
(int) - stopScreenCapture
 
(int) - setLocalRenderSubStreamScaleMode:
 
(int) - setupRemoteSubStreamVideoCanvas:forUserID:
 
(int) - setupRemoteVideoCanvas:forUserID:streamType:
 
(int) - subscribeRemoteSubStreamVideo:forUserID:
 
(int) - subscribeRemoteVideo:forUserID:streamType:subscribeType:
 
(int) - setRemoteRenderSubStreamVideoScaleMode:forUserID:
 
(int) - setAudioSessionOperationRestriction:
 
(int) - setPlayoutDeviceMute:
 
(int) - getPlayoutDeviceMute:
 
(int) - setRecordDeviceMute:
 
(int) - getRecordDeviceMute:
 
(BOOL) - isCameraZoomSupported
 
(BOOL) - isCameraTorchSupported
 
(BOOL) - isCameraFocusSupported
 
(BOOL) - isCameraExposurePositionSupported
 
(int) - setCameraExposurePosition:
 
(int) - setCameraTorchOn:
 
(BOOL) - isCameraTorchOn
 
(int) - setCameraZoomFactor:
 
(float) - maxCameraZoomScale
 
(int) - setCameraFocusPositionX:Y:
 
(int) - setCameraCaptureConfig:
 
(int) - setCameraCaptureConfig:streamType:
 
(int) - startAudioMixingWithOption:
 
(int) - stopAudioMixing
 
(int) - pauseAudioMixing
 
(int) - resumeAudioMixing
 
(int) - setAudioMixingSendVolume:
 
(int) - getAudioMixingSendVolume:
 
(int) - setAudioMixingPlaybackVolume:
 
(int) - getAudioMixingPlaybackVolume:
 
(int) - getAudioMixingDuration:
 
(int) - getAudioMixingCurrentPosition:
 
(int) - setAudioMixingPosition:
 
(int) - setAudioMixingPitch:
 
(int) - getAudioMixingPitch:
 
(int) - playEffectWitdId:effectOption:
 
(int) - stopEffectWitdId:
 
(int) - stopAllEffects
 
(int) - pauseEffectWitdId:
 
(int) - resumeEffectWitdId:
 
(int) - pauseAllEffects
 
(int) - resumeAllEffects
 
(int) - setEffectSendVolumeWithId:volume:
 
(int) - getEffectSendVolumeWithId:volume:
 
(int) - setEffectPlaybackVolumeWithId:volume:
 
(int) - getEffectPlaybackVolumeWithId:volume:
 
(int) - getEffectDurationWithId:duration:
 
(int) - getEffectCurrentPositionWithId:position:
 
(int) - setEffectPositionWithId:position:
 
(int) - setEffectPitchWithId:pitch:
 
(int) - getEffectPitchWithId:pitch:
 
(int) - enableEarback:volume:
 
(int) - setEarbackVolume:
 
(int) - startAudioRecording:sampleRate:quality:
 
(int) - startAudioRecordingWithConfig:
 
(int) - stopAudioRecording
 
(int) - setExternalAudioSource:sampleRate:channels:
 
(int) - pushExternalAudioFrame:
 
(int) - setExternalAudioRender:sampleRate:channels:
 
(int) - pullExternalAudioFrame:length:
 
(int) - setRangeAudioMode:
 
(int) - setRangeAudioTeamID:
 
(int) - setAudioRecvRange:conversationalDistance:rollOff:
 
(int) - updateSelfPosition:
 
(int) - enableSpatializerRoomEffects:
 
(int) - setSpatializerRoomProperty:
 
(int) - setSpatializerRenderMode:
 
(int) - initSpatializer
 
(int) - enableSpatializer:applyToTeam:
 
(int) - setSubscribeAudioBlocklist:uidArray:
 
(int) - setSubscribeAudioAllowlist:
 
(int) - enableLocalData:
 
(int) - subscribeRemoteData:forUserID:
 
(int) - sendData:
 
(int) - addEngineMediaStatsObserver:
 
(int) - removeEngineMediaStatsObserver:
 
(int) - cleanupEngineMediaStatsObserver
 
(int) - addLiveStreamTask:compeltion:
 
(int) - updateLiveStreamTask:compeltion:
 
(int) - removeLiveStreamTask:compeltion:
 
(int) - setRecordingAudioFrameParameters:
 
(int) - setPlaybackAudioFrameParameters:
 
(int) - setMixedAudioFrameParameters:
 
(int) - setPlaybackBeforeMixingAudioFrameParameters:
 
(int) - setAudioFrameObserver:
 
(int) - setVideoFrameObserver:
 
(int) - enableAudioVolumeIndication:interval:
 
(int) - enableAudioVolumeIndication:interval:vad:
 
(int) - adjustRecordingSignalVolume:
 
(int) - adjustPlaybackSignalVolume:
 
(int) - adjustUserPlaybackSignalVolume:forUserID:
 
(int) - adjustChannelPlaybackSignalVolume:
 
(int) - setLocalVoicePitch:
 
(int) - setLocalVoiceEqualizationOfBandFrequency:withGain:
 
(int) - setVoiceBeautifierPreset:
 
(int) - setAudioEffectPreset:
 
(int) - setLocalVoiceReverbParam:
 
(int) - setLocalVideoWatermarkConfigs:withStreamType:
 
(int) - takeLocalSnapshot:callback:
 
(int) - takeRemoteSnapshot:forUserID:callback:
 
(int) - uploadSdkInfo
 
(int) - reportCustomEvent:customIdentify:param:
 
(int) - sendSEIMsg:streamChannelType:
 
(int) - sendSEIMsg:
 
(int) - startChannelMediaRelay:
 
(int) - updateChannelMediaRelay:
 
(int) - stopChannelMediaRelay
 
(int) - enableSuperResolution:
 
(int) - enableEncryption:config:
 
(int) - startLastmileProbeTest:
 
(int) - stopLastmileProbeTest
 
(nullable NERtcChannel *) - createChannel:
 
(int) - enableVideoCorrection:
 
(int) - setVideoCorrectionConfig:
 
(int) - enableVirtualBackground:backData:
 
(int) - enableVirtualBackground:backData:force:
 
(int) - setCloudProxy:
 
(void) - setStreamAlignmentProperty:
 
(int64_t) - getNtpTimeOffset
 
(int) - setPreDecodeObserver:
 
(int) - setVideoEncoderQosObserver:
 
(int) - pushExternalAudioEncodedFrame:
 
(int) - pushExternalSubStreamAudioEncodedFrame:
 
(int) - pushExternalVideoEncodedFrame:
 
(int) - pushExternalSubStreamVideoEncodedFrame:
 
(int) - startPushStreaming:
 
(int) - stopPushStreaming
 
- 实例方法 继承自 <INERtcEngine>
(NERtcConnectionStateType) - connectionState
 
(int) - setupEngineWithContext:
 
(int) - setEngineEventDelegate:
 
(int) - setDelegateQueue:
 
(int) - joinChannelWithToken:channelName:myUid:completion:
 
(int) - joinChannelWithToken:channelName:myUid:channelOptions:completion:
 
(int) - leaveChannel
 
(int) - switchChannelWithToken:channelName:completion:
 
(int) - switchChannelWithToken:channelName:channelOptions:completion:
 
(int) - enableLocalAudio:
 
(int) - enableLocalVideo:
 
(int) - enableLocalVideo:streamType:
 
(int) - enableMediaPub:withMediaType:
 
(int) - setChannelProfile:
 
(int) - setLocalVideoConfig:
 
(int) - setLocalVideoConfig:streamType:
 
(int) - setAudioProfile:scenario:
 
(int) - setAudioProfile:
 
(int) - setAudioScenario:
 
(int) - setupLocalVideoCanvas:
 
(int) - setupRemoteVideoCanvas:forUserID:
 
(int) - switchCamera
 
(int) - setClientRole:
 
(int) - setParameters:
 
(NSString *_Nullable) - getParameter:extraInfo:
 
- 属性 继承自 <INERtcEngine>
id< NERtcEngineDelegateExengineDelegate
 

详细描述

成员函数文档

◆ destroyEngine

+ (int) destroyEngine

销毁 NERtcEngine 实例,并释放资源。
该方法释放 NERTC SDK 使用的所有资源。有些 App 只在用户需要时才进行实时音视频通信,完成音视频通话后,则将资源释放出来用于其他操作,该方法适用于此类情况。

  • 该接口需要在调用 leaveChannel、并收到本端离开房间的回调后调用。或收到 onNERtcEngineDidDisconnectWithReason: 回调、重连失败时调用此接口销毁实例,并释放资源。
  • 调用 destroyEngine 方法后,您将无法再使用 SDK 的其它方法和回调。如需再次使用实时音视频通话功能,您必须等待 destroyEngine 方法执行结束后,重新创建一个新的 NERtc 实例。
注解
  • 该方法为同步调用,需要等待 NERtcEngine 实例资源释放后才能执行其他操作。
  • 该接口不得在 SDK 的回调中调用,在接口返回前也不允许调用 SDK 的其他任何接口。
  • 如需在销毁后再次创建 NERtcEngine 实例、调用 SDK 接口,需要等待 destroyEngine 方法执行结束后,调用sharedEngine 获取一个新的 NERtcEngine 实例,再调用 setupEngineWithContext 初始化 SDK。

◆ getVersion

+ (NSString *) getVersion

查询 SDK 版本号, 该方法在加入房间前后都能调用

自从
V4.6.10
返回
版本号,格式为字符串,如 1.0.0。

◆ sharedEngine

+ (instancetype) sharedEngine

获取 NERtcEngine 实例
获取之后一直到调用 destroyEngine 之前,返回的实例都将是同一个

返回
NERtcEngine 实例

该类的文档由以下文件生成: