Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: publish track issue #37

Merged
merged 2 commits into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# IRIS_WEB

## [0.8.3](https://github.com/AgoraIO-Extensions/iris_web/compare/v0.8.0...v0.8.3) (2024-11-04)


### Bug Fixes

* publish track issue ([7d1e3be](https://github.com/AgoraIO-Extensions/iris_web/commit/7d1e3be5ba0bce4522670dc3f42824d0fa5cae35))
* updateChannelMediaOptions doesn't setClientRole ([#36](https://github.com/AgoraIO-Extensions/iris_web/issues/36)) ([9a2fc5b](https://github.com/AgoraIO-Extensions/iris_web/commit/9a2fc5b61c50a5fe8b8c56133017b98c44c8932a))

## [0.8.2](https://github.com/AgoraIO-Extensions/iris_web/compare/v0.8.0...v0.8.2) (2024-11-01)


Expand Down
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.2",
"version": "0.8.3",
"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.2",
"version": "0.8.3",
"description": "wait",
"main": "./src/index.ts",
"scripts": {
Expand Down
14 changes: 8 additions & 6 deletions packages/rtc/src/IrisRtcApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@ function initIrisRtc(
);
// set the first irisApiEngine apiInterceptors to irisClientManager
// this is a convenient way to get irisClientManager in most cases
if (window.__AGORA_IRIS_API_ENGINE_LIST__.length === 1) {
window.__AGORA_IRIS_CLIENT_MANAGER__ =
window.__AGORA_IRIS_API_ENGINE_LIST__[0][
'apiInterceptors'
][0]?.irisClientManager;
}
setTimeout(() => {
if (window.__AGORA_IRIS_API_ENGINE_LIST__.length === 1) {
window.__AGORA_IRIS_CLIENT_MANAGER__ =
window.__AGORA_IRIS_API_ENGINE_LIST__[0][
'apiInterceptors'
][0]?.irisClientManager;
}
}, 1000);
}

export let IrisWebRtc = {
Expand Down
6 changes: 6 additions & 0 deletions packages/rtc/src/engine/IrisClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,12 @@ export class IrisClient {
}

addLocalAudioTrack(trackPackage: AudioTrackPackage) {
let find = this.audioTrackPackages.find(
(track) => track.track === trackPackage.track
);
if (find) {
return;
}
this.audioTrackPackages.push(trackPackage);
trackPackage.irisClient = this;
}
Expand Down
3 changes: 1 addition & 2 deletions packages/rtc/src/engine/IrisClientObserver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,11 @@ export class IrisClientObserver {
const globalState = this._engine.globalState;
if (!trackPackage.track) return;

let needPublish: boolean = false;
let track = trackPackage.track as ILocalTrack;

for (const irisClient of irisClientList) {
let needPublish: boolean = false;
const options = irisClient.irisClientState;

if (globalState.enabledAudio && globalState.enabledLocalAudio) {
switch (trackPackage.type) {
case IrisAudioSourceType.kAudioSourceTypeMicrophonePrimary:
Expand Down
1 change: 0 additions & 1 deletion packages/rtc/src/helper/ImplHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,6 @@ export class ImplHelper {
connection
);
}

//clientRole update
if (isDefined(options.clientRoleType)) {
if (
Expand Down