Skip to content

Commit

Permalink
fix(service-providers): electron role publishing wrong (#1763)
Browse files Browse the repository at this point in the history
- switch back to vp8 in web mode for compatibility with electron
  • Loading branch information
hyrious committed Nov 8, 2022
1 parent 67615b0 commit 7d4325d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ export class RTCLocalAvatar implements IServiceVideoChatAvatar {
this._rtc.rtcEngine.enableLocalAudio(true);
} else {
this._rtc.rtcEngine.enableLocalAudio(false);
this._rtc.setRole(IServiceVideoChatRole.Audience);
if (!this._shouldCamera$.value) {
this._rtc.setRole(IServiceVideoChatRole.Audience);
}
}
} catch (e) {
console.error(e);
Expand All @@ -85,7 +87,9 @@ export class RTCLocalAvatar implements IServiceVideoChatAvatar {
this._rtc.rtcEngine.enableLocalVideo(true);
} else {
this._rtc.rtcEngine.enableLocalVideo(false);
this._rtc.setRole(IServiceVideoChatRole.Audience);
if (!this._shouldMic$.value) {
this._rtc.setRole(IServiceVideoChatRole.Audience);
}
}
} catch (e) {
console.error(e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ export class AgoraRTCWeb extends IServiceVideoChat {

const client = AgoraRTC.createClient({
mode: mode === IServiceVideoChatMode.Broadcast ? "live" : "rtc",
codec: "h264",
codec: "vp8",
});
this.client = client;
this.mode = mode;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class AgoraRTCWebShareScreen extends IServiceShareScreen {

this.APP_ID = config.APP_ID;

this.client = AgoraRTC.createClient({ mode: "rtc", codec: "h264" });
this.client = AgoraRTC.createClient({ mode: "rtc", codec: "vp8" });

this._el$ = new Val(config.element ?? null);

Expand Down

0 comments on commit 7d4325d

Please sign in to comment.