Skip to content

Commit

Permalink
Arnab/livekit fixes (#754)
Browse files Browse the repository at this point in the history
* refactor: added code for joining livekit room for listeners (#731)

* feat: drop in livekit inplace of livepeer

* feat: added microphone

* feat: added mic

* feat: added access control

* feat: fixes for livekit API call

---------

Co-authored-by: Nilesh Gupta <[email protected]>
  • Loading branch information
arn4b and 0xNilesh authored Oct 5, 2023
1 parent 098beac commit b031789
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ export const LiveWidgetContent: React.FC<LiveWidgetContentProps> = ({
initSpaceObject,
raisedHandInfo,
} = useSpaceData();
console.log("🚀 ~ file: LiveWidgetContent.tsx:66 ~ raisedHandInfo:", raisedHandInfo)

const isMicOn = spaceObjectData?.connectionData?.local?.audio;

Expand Down Expand Up @@ -109,7 +110,7 @@ export const LiveWidgetContent: React.FC<LiveWidgetContentProps> = ({
useEffect(() => {
// if (!spaceObjectData?.connectionData?.local?.stream || promotedListener.length === 0)
// return;
if (promotedListener.length === 0)
if (promotedListener.length === 0 || Object.keys(raisedHandInfo).length === 0)
return;

const options = {
Expand All @@ -129,6 +130,7 @@ export const LiveWidgetContent: React.FC<LiveWidgetContentProps> = ({

const handleAcceptPromotion = async (requesterAddress: any) => {
// await spacesObjectRef?.current?.createAudioStream?.();
await performAction({ roomId: spaceData?.spaceId, userId: requesterAddress, canPublish: true });
setPromotedListener(requesterAddress);
await performAction({ roomId: spaceData?.spaceId, userId: requesterAddress, canPublish: true });
};
Expand Down
2 changes: 1 addition & 1 deletion packages/uiweb/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2471,7 +2471,7 @@ clsx@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/clsx/-/clsx-2.0.0.tgz#12658f3fd98fafe62075595a5c30e43d18f3d00b"
integrity sha512-rQ1+kcj+ttHG0MKVGBUXwayCCF1oh39BF5COIpRzuCEv8Mwjv0XucrI2ExNTOn9IlLifGClWQcU9BrZORvtw6Q==

color-convert@^1.9.0:
version "1.9.3"
resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8"
Expand Down

0 comments on commit b031789

Please sign in to comment.