Skip to content

Commit

Permalink
Add room setting that makes everyone a presenter
Browse files Browse the repository at this point in the history
  • Loading branch information
DoubleMalt committed Aug 17, 2022
1 parent 11c86b6 commit 27fc7f9
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions ui/jam-core/room.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function RoomState({roomId, myIdentity, peerState, myPeerState}) {
let {data, isLoading} = use(GetRequest, {path});
let hasRoom = !!data;
let room = data ?? emptyRoom;
let {moderators, presenters, stageOnly} = room;
let {moderators, presenters, stageOnly, videoCall} = room;
let myId = myIdentity.publicKey;
let accessRestricted = !!room.access?.identities;

Expand All @@ -31,7 +31,7 @@ function RoomState({roomId, myIdentity, peerState, myPeerState}) {

let iAmModerator = moderators.includes(myId);
let iAmSpeaker = !!stageOnly || speakers.includes(myId);
let iAmPresenter = presenters.includes(myId);
let iAmPresenter = !!videoCall || presenters.includes(myId);
let iAmAuthorized =
!accessRestricted || room.access?.identities.includes(myId);

Expand Down
1 change: 1 addition & 0 deletions ui/jam-core/state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ type RoomType = {
moderators: string[];
presenters: string[];
stageOnly?: boolean;
videoCall?: boolean;
color?: string;
logoURI?: string;
access?: AccessType;
Expand Down
4 changes: 2 additions & 2 deletions ui/packages/jam-core-react/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "jam-core-react",
"description": "React hooks for creating custom audio spaces like Clubhouse / Twitter Spaces, made with WebRTC",
"version": "0.5.0",
"version": "0.5.1",
"main": "dist/index.js",
"license": "(AGPL-3.0 OR Apache-2.0)",
"type": "module",
Expand All @@ -20,7 +20,7 @@
],
"dependencies": {
"fast-base64": "^0.1.8",
"jam-core": "0.5.0",
"jam-core": "0.5.1",
"minimal-state": "^5.6.0",
"use-minimal-state": "^3.5.0",
"watsign": "^0.1.8"
Expand Down
2 changes: 1 addition & 1 deletion ui/packages/jam-core/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "jam-core",
"description": "Jam SDK for creating custom audio spaces like Clubhouse / Twitter Spaces, made with WebRTC",
"version": "0.5.0",
"version": "0.5.1",
"main": "dist/index.js",
"license": "(AGPL-3.0 OR Apache-2.0)",
"type": "module",
Expand Down

0 comments on commit 27fc7f9

Please sign in to comment.