Skip to content

Commit

Permalink
chore: change fake package version (#160)
Browse files Browse the repository at this point in the history
  • Loading branch information
guoxianzhe authored Oct 24, 2023
1 parent a583aeb commit 43ce3f7
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 19 deletions.
2 changes: 1 addition & 1 deletion examples/basic/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import ReactDOM from "react-dom/client";
import { HashRouter as Router } from "react-router-dom";

import App from "./src/App";
AgoraRTC.setLogLevel(/* warning */ 2);
AgoraRTC.setLogLevel(/* DEBUG */ 0);

ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
<StrictMode>
Expand Down
2 changes: 1 addition & 1 deletion packages/agora-rtc-react-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"@vitest/coverage-v8": "^0.34.1",
"agora-rtc-react": "workspace:*",
"agora-rtc-sdk-ng": "4.18.2",
"agora-rtc-sdk-ng-fake": "github:AgoraIO-Extensions/agora-rtc-sdk-ng-fake#semver:^1.0.0",
"agora-rtc-sdk-ng-fake": "github:AgoraIO-Extensions/agora-rtc-sdk-ng-fake#semver:^1.0.4",
"jsdom": "^22.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/agora-rtc-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"@vitest/ui": "^0.34.1",
"agora-rtc-react-ui": "workspace:*",
"agora-rtc-sdk-ng": "4.18.2",
"agora-rtc-sdk-ng-fake": "github:AgoraIO-Extensions/agora-rtc-sdk-ng-fake#semver:^1.0.0",
"agora-rtc-sdk-ng-fake": "github:AgoraIO-Extensions/agora-rtc-sdk-ng-fake#semver:^1.0.4",
"jsdom": "^22.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand Down
3 changes: 0 additions & 3 deletions packages/agora-rtc-react/src/hooks/useLocalCameraTrack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,6 @@ export function useLocalCameraTrack(
setIsLoading(false);
}
}
if (!isConnected && !isUnmountRef.current) {
setTrack(null);
}
}, [isConnected, ready]);
return { localCameraTrack: track, isLoading: isLoading, error: error };
}
3 changes: 0 additions & 3 deletions packages/agora-rtc-react/src/hooks/useLocalMicrophoneTrack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,6 @@ export function useLocalMicrophoneTrack(
setIsLoading(false);
}
}
if (!isConnected && !isUnmountRef.current) {
setTrack(null);
}
}, [isConnected, ready]);
return { localMicrophoneTrack: track, isLoading: isLoading, error: error };
}
4 changes: 2 additions & 2 deletions packages/agora-rtc-react/src/hooks/useLocalScreenTrack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export function useLocalScreenTrack(
error: AgoraRTCReactError | null;
};
export function useLocalScreenTrack(
ready: boolean,
ready = true,
screenVideoTrackInitConfig: ScreenVideoTrackInitConfig,
withAudio: "enable" | "disable" | "auto",
client?: IAgoraRTCClient,
Expand Down Expand Up @@ -111,7 +111,7 @@ export function useLocalScreenTrack(
setIsLoading(false);
}
}
if ((!isConnected || !ready) && !isUnmountRef.current) {
if (!ready && !isUnmountRef.current) {
setTrack(null);
}
}, [isConnected, ready]);
Expand Down
16 changes: 8 additions & 8 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 43ce3f7

Please sign in to comment.