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

Only include cam permission #23

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
15 changes: 12 additions & 3 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ export default function App() {
.join({
url: dailyRoomUrl,
token: dailyMeetingToken,
startAudioOff: true,
startVideoOff: true,
})
.catch((err) => {
console.error("Error joining room:", err);
Expand All @@ -155,9 +157,15 @@ export default function App() {
return;
}

callObject.startCamera().then((res) => {
console.log("startCamera: ", res);
});
callObject.setLocalVideo(true);
};

const startMic = () => {
if (!callObject) {
return;
}

callObject.setLocalAudio(true);
};

const load = () => {
Expand Down Expand Up @@ -270,6 +278,7 @@ export default function App() {
<button onClick={() => load()}>Load</button> <br />
<button onClick={() => preAuth()}>Preauth</button> <br />
<button onClick={() => startCamera()}>Start Camera</button> <br />
<button onClick={() => startMic()}>Start Microphone</button> <br />
<button onClick={() => joinRoom()}>Join call</button> <br />
<button onClick={() => leaveRoom()}>Leave call</button>
<br />
Expand Down
8 changes: 7 additions & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@ const root = createRoot(container!);

root.render(
<StrictMode>
<DailyProvider dailyConfig={{ useDevicePreferenceCookies: true }}>
<DailyProvider
dailyConfig={{
useDevicePreferenceCookies: true,
alwaysIncludeCamInPermissionPrompt: false,
alwaysIncludeMicInPermissionPrompt: false,
}}
>
<App />
</DailyProvider>
</StrictMode>
Expand Down