Skip to content

Commit

Permalink
chore: optimize
Browse files Browse the repository at this point in the history
  • Loading branch information
guoxianzhe committed Aug 8, 2024
1 parent ccb28a1 commit 9a9ba75
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
16 changes: 5 additions & 11 deletions packages/rtc/src/engine/IrisClientObserver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ export class IrisClientObserver {
}
}

subscribeVideoTrack(userPackage: RemoteUserPackage, force: boolean = false) {
subscribeVideoTrack(userPackage: RemoteUserPackage, force: boolean) {
let irisClient = this._engine.irisClientManager.getIrisClientByConnection(
userPackage.connection
);
Expand Down Expand Up @@ -418,7 +418,7 @@ export class IrisClientObserver {
});
}
}
subscribeAudioTrack(userPackage: RemoteUserPackage, force: boolean = false) {
subscribeAudioTrack(userPackage: RemoteUserPackage, force: boolean) {
let irisClient = this._engine.irisClientManager.getIrisClientByConnection(
userPackage.connection
);
Expand Down Expand Up @@ -452,10 +452,7 @@ export class IrisClientObserver {
}
}

unsubscribeVideoTrack(
userPackage: RemoteUserPackage,
force: boolean = false
) {
unsubscribeVideoTrack(userPackage: RemoteUserPackage, force: boolean) {
let irisClient = this._engine.irisClientManager.getIrisClientByConnection(
userPackage.connection
);
Expand All @@ -476,10 +473,7 @@ export class IrisClientObserver {
}
}

unsubscribeAudioTrack(
userPackage: RemoteUserPackage,
force: boolean = false
) {
unsubscribeAudioTrack(userPackage: RemoteUserPackage, force: boolean) {
let irisClient = this._engine.irisClientManager.getIrisClientByConnection(
userPackage.connection
);
Expand All @@ -503,7 +497,7 @@ export class IrisClientObserver {
notifyRemote(
type: NotifyRemoteType,
scopePackages: RemoteUserPackage[],
force: boolean = false
force: boolean = true
) {
for (let scopePackage of scopePackages) {
switch (type) {
Expand Down
6 changes: 4 additions & 2 deletions packages/rtc/src/event_handler/IrisClientEventHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,12 +258,14 @@ export class IrisClientEventHandler {
if (mediaType == 'audio') {
this._engine.irisClientManager.irisClientObserver.notifyRemote(
NotifyRemoteType.SUBSCRIBE_AUDIO_TRACK,
[remoteUser]
[remoteUser],
false
);
} else if (mediaType == 'video') {
this._engine.irisClientManager.irisClientObserver.notifyRemote(
NotifyRemoteType.SUBSCRIBE_VIDEO_TRACK,
[remoteUser]
[remoteUser],
false
);
}
}
Expand Down

0 comments on commit 9a9ba75

Please sign in to comment.