Skip to content

Commit

Permalink
feat(web): add initiator just to a host user
Browse files Browse the repository at this point in the history
  • Loading branch information
brunocroh committed May 17, 2024
1 parent a2cd810 commit 3652b9e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/web/app/room/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,9 @@ export default function Page(): JSX.Element {
peerRef.current = new Peer({
initiator: true,
trickle: false,
stream: videoRef.current.srcObject as MediaStream,
stream: videoRef.current?.srcObject as MediaStream,
});

peerRef.current?.on("signal", (signalData) => {
if (signalData.type === "offer") {
sendJsonMessage({
Expand Down

0 comments on commit 3652b9e

Please sign in to comment.