Skip to content

Commit

Permalink
refactor: adapt native (#903)
Browse files Browse the repository at this point in the history
* refactor: adapt native

* refactor: recovery impl

Co-authored-by: luz <[email protected]>
  • Loading branch information
player0x3 and luz authored Oct 17, 2022
1 parent bb39de6 commit 7cd100b
Showing 1 changed file with 50 additions and 3 deletions.
53 changes: 50 additions & 3 deletions ts/Private/internal/RtcEngineExInternal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
ErrorCodeType,
IAudioEncodedFrameObserver,
SimulcastStreamConfig,
SimulcastStreamMode,
VideoCanvas,
VideoMirrorModeType,
VideoSourceType,
Expand All @@ -32,6 +33,7 @@ import {
ScreenCaptureSourceInfo,
SDKBuildInfo,
Size,
ExtensionInfo
} from '../IAgoraRtcEngine';
import { RtcConnection } from '../IAgoraRtcEngineEx';
import { IAudioDeviceManager } from '../IAudioDeviceManager';
Expand Down Expand Up @@ -321,12 +323,57 @@ export class RtcEngineExInternal extends IRtcEngineExImpl {

protected getApiTypeFromEnableDualStreamMode(
enabled: boolean,
sourceType: VideoSourceType = VideoSourceType.VideoSourceCameraPrimary,
streamConfig?: SimulcastStreamConfig
): string {
return streamConfig === undefined
? 'RtcEngine_enableDualStreamMode2'
: 'RtcEngine_enableDualStreamMode3';
? 'RtcEngine_enableDualStreamMode'
: 'RtcEngine_enableDualStreamMode2';
}

protected getApiTypeFromSetDualStreamMode(
mode: SimulcastStreamMode,
streamConfig?: SimulcastStreamConfig
): string {
return streamConfig === undefined
?'RtcEngine_setDualStreamMode'
:'RtcEngine_setDualStreamMode2';
}

protected getApiTypeFromLeaveChannelEx(
connection: RtcConnection,
options?: LeaveChannelOptions
): string {
return 'RtcEngineEx_leaveChannelEx2';
}

protected getApiTypeFromGetExtensionProperty(
provider: string,
extension: string,
extensionInfo: ExtensionInfo,
key: string,
bufLen: number
): string {
return 'RtcEngine_getExtensionProperty2';
}

protected getApiTypeFromEnableExtension(
provider: string,
extension: string,
extensionInfo: ExtensionInfo,
enable = true
): string {
return 'RtcEngine_enableExtension2';
}


protected getApiTypeFromSetExtensionProperty(
provider: string,
extension: string,
extensionInfo: ExtensionInfo,
key: string,
value: string
): string {
return 'RtcEngine_setExtensionProperty2';
}

protected getApiTypeFromCreateDataStream(config: DataStreamConfig): string {
Expand Down

0 comments on commit 7cd100b

Please sign in to comment.