Skip to content

Commit

Permalink
fix: fix some issues in 0.8.4 (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
guoxianzhe authored Nov 25, 2024
1 parent 0661a66 commit a83d078
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 17 deletions.
2 changes: 1 addition & 1 deletion packages/fake/rtc/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "iris-web-rtc-fake",
"version": "0.8.3",
"version": "0.8.4",
"description": "wait",
"main": "./index.ts",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion packages/rtc/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "iris-web-rtc",
"version": "0.8.3",
"version": "0.8.4",
"description": "wait",
"main": "./src/index.ts",
"scripts": {
Expand Down
25 changes: 25 additions & 0 deletions packages/rtc/src/event_handler/IrisClientEventHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,31 @@ export class IrisClientEventHandler {
} else {
userPackage.uid = remoteUid;
}
this._engine.rtcEngineEventHandler.onRemoteAudioStateChanged_056772e(
this._irisClient.connection,
remoteUid,
user.hasAudio
? NATIVE_RTC.REMOTE_AUDIO_STATE.REMOTE_AUDIO_STATE_STARTING
: NATIVE_RTC.REMOTE_AUDIO_STATE.REMOTE_AUDIO_STATE_STOPPED,
user.hasAudio
? NATIVE_RTC.REMOTE_AUDIO_STATE_REASON
.REMOTE_AUDIO_REASON_REMOTE_UNMUTED
: NATIVE_RTC.REMOTE_AUDIO_STATE_REASON.REMOTE_AUDIO_REASON_REMOTE_MUTED,
0
);
this._engine.rtcEngineEventHandler.onRemoteVideoStateChanged_a14e9d1(
this._irisClient.connection,
remoteUid,
user.hasVideo
? NATIVE_RTC.REMOTE_VIDEO_STATE.REMOTE_VIDEO_STATE_STARTING
: NATIVE_RTC.REMOTE_VIDEO_STATE.REMOTE_VIDEO_STATE_STOPPED,
user.hasVideo
? NATIVE_RTC.REMOTE_VIDEO_STATE_REASON
.REMOTE_VIDEO_STATE_REASON_REMOTE_UNMUTED
: NATIVE_RTC.REMOTE_VIDEO_STATE_REASON
.REMOTE_VIDEO_STATE_REASON_REMOTE_MUTED,
0
);
}

async onEventUserLeft(
Expand Down
5 changes: 0 additions & 5 deletions packages/rtc/src/impl/IAgoraRtcEngineImpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -560,11 +560,6 @@ export class IRtcEngineImpl implements IRtcEngineExtensions {
} catch (e) {
AgoraConsole.warn(`createAudioTrack error: ${e}`);
}
} else {
await this._engine.irisClientManager.irisClientObserver.notifyLocal(
NotifyType.REMOVE_TRACK,
this._engine.irisClientManager.localAudioTrackPackages
);
}

for (let trackPackage of this._engine.irisClientManager
Expand Down
2 changes: 1 addition & 1 deletion packages/rtc/test/impl/IAgoraRtcEngineImpl.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,7 @@ describe('IAgoraRtcEngineImpl', () => {
irisRtcEngine.irisClientManager.getLocalAudioTrackPackageBySourceType(
IrisAudioSourceType.kAudioSourceTypeMicrophonePrimary
).length
).toBe(0);
).toBe(1);
await joinChannel(apiEnginePtr, null);
await callIris(apiEnginePtr, 'RtcEngine_enableAudio', null);
expect(
Expand Down
18 changes: 9 additions & 9 deletions packages/rtc/test/impl/IAgoraRtcEngineImplEx.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,15 @@ describe('IAgoraRtcEngineImpl', () => {
expect(agoraRTCClient?.setClientRole).toBeCalledTimes(1);
});
test('setupRemoteVideoEx_522a409', async () => {
let connection = await joinChannelEx(apiEnginePtr);
let param2 = {
canvas: {
uid: TEST_REMOTE_UID,
view: 'test-view',
sourceType: NATIVE_RTC.VIDEO_SOURCE_TYPE.VIDEO_SOURCE_REMOTE,
},
connection: connection,
};
await callIris(
apiEnginePtr,
'RtcEngine_registerEventHandler_5fc0465',
Expand Down Expand Up @@ -215,15 +224,6 @@ describe('IAgoraRtcEngineImpl', () => {
},
]
);
let connection = await joinChannelEx(apiEnginePtr);
let param2 = {
canvas: {
uid: TEST_REMOTE_UID,
view: 'test-view',
sourceType: NATIVE_RTC.VIDEO_SOURCE_TYPE.VIDEO_SOURCE_REMOTE,
},
connection: connection,
};
});
test('muteLocalAudioStreamEx_3cf17a4', async () => {
let connection = await joinChannelEx(apiEnginePtr);
Expand Down

0 comments on commit a83d078

Please sign in to comment.