View enter_room_as_invitee.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SendBirdCall.addListener('LISTENER_ID', { | |
onInvitationReceived: (invitation) => { | |
invitation.accept(); | |
try { | |
invitation.room.enter(); | |
// The user has entered the room. | |
} catch (e) { | |
// error happened. | |
} |
View receive_invitation_events_about_response.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
room.on('invitationAccepted', (invitation) => { | |
// Invitation was accepted by `invitation.invitee` | |
}); | |
room.on('invitationDeclined', (invitation) => { | |
// Invitation was declined by `invitation.invitee` | |
console.log(`invitation is declined`); | |
}); |
View accept_or_decline_invitation.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SendBirdCall.addListener('LISTENER_ID', { | |
onInvitationReceived: (invitation) => { | |
// Accept an invitation. | |
invitation.accept(); | |
// Decline an invitation. | |
invitation.decline(); | |
} | |
}); |
View receive_invitation.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SendBirdCall.addListener('LISTENER_ID', { | |
onInvitationReceived: (invitation) => { | |
// Received an invitation from `invitation.inviter`. | |
} | |
}); |
View invite_callee.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try { | |
const invitation = await globalRoom.sendInvitation(inviteeId); | |
// Invitation has been successfully sent to the invitee. | |
} catch (e) { | |
// error happened. | |
} |
View enter_room.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try { | |
await room.enter({ audioEnabled: true, videoEnabled: true }); | |
} catch (e) { | |
// error happened. | |
} |
View create_room.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try { | |
const room = await SendBirdCall.createRoom({ | |
roomType: 'small_room_for_video', | |
}); | |
} catch (e) { | |
// error happened. | |
} |
View UserStatus.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default function UserStatus({ | |
setShowUserStatus, | |
selectedUser, | |
userStatus, | |
}) { | |
return ( | |
<div className="bg-modal" style={{ display: "flex" }}> | |
<div className="modal-content users-list"> | |
<div | |
className="users_list_close_btn" |
View SettingsOnlineOption.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function checkUserStatus(e) { | |
e.preventDefault(); | |
const queryParams = { | |
userIdsFilter: [selectedUser.userId], | |
}; | |
const query = sb.createApplicationUserListQuery(queryParams); | |
const userInfo = await query.next(); | |
setUserStatus(userInfo[0].connectionStatus); | |
setShowUserStatus(true); |
View UsersList.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
return ( | |
<div className="bg-modal" style={{ display: "flex" }}> | |
<div className="modal-content users_list"> | |
<div | |
className="users_list_close_btn" | |
onClick={() => setShowUsersList(false)} | |
> | |
+ | |
</div> | |
<h3 id="users_list_title"> |
NewerOlder