-
Notifications
You must be signed in to change notification settings - Fork 344
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
feat(plugin-meetings): Introduce SDK changes to call WCME and Locus APIs when current user steps away or returns #3942
Open
antsukanova
wants to merge
31
commits into
webex:stepAway
Choose a base branch
from
antsukanova:antsukan/SPARK-559645
base: stepAway
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 30 commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
fc570e9
feat: introduce step away in sdk and test-app
ac86df9
fix(plugin-meetings): added unit tests
fnowakow 3cbb587
fix(plugin-meetings): added NOT unit test
fnowakow faf4a73
chore: rename functions, update wcme
c9dd4d3
chore: update brbChanged SelfUtils
48caff9
chore: update beRightBack, add todo
1300726
chore: add todo
317e1b7
fix(plugin-meetings): fix beRightBack sourceStateOverride
fnowakow 7ec0182
fix(plugin-meetings): audio/video (un)mute fix
fnowakow 6e1ba35
Merge branch 'antsukan/SPARK-559645' into fnowakow/SPARK-559645-unit_…
fnowakow 4b2caf4
fix(plugin-meetings): updated tests
fnowakow 74a1683
fix(plugin-meetings): added unit tests
fnowakow f7c5436
fix(plugin-meetings): added NOT unit test
fnowakow a92e0a8
fix(plugin-meetings): updated tests
fnowakow f6b8bb6
Merge remote-tracking branch 'fork/fnowakow/SPARK-559645-unit_tests' …
fnowakow 1f2e3d2
fix(plugin-meetings): event name change to self
fnowakow 403bf8e
chore(plugin-meetings): add todo
fnowakow ed9f255
chore(plugin-meetings): multistream support
fnowakow c956670
chore(plugin-meetings): removed multistream
fnowakow 108d3ad
test(plugin-meetings): update brb tests
6ab2870
chore: nit updates for logs
550c66a
test(plugin-meetings): update brb test names
d20f826
chore: update beRightBack api logic
231698f
test(plugin-meetings): check brb for both multistream and transcoded
bd6f757
test(plugin-meetings): finalize brb tests
31dac59
test(plugin-meetings): remove unnecessary stub
1685a02
test(plugin-meetings): re-arrange test and add afterEach
4ca7e41
test(plugin-meetings): remove only
0056acf
fix(plugin-meetings): log error
7d58d02
fix(plugin-meetings): rever to return statement
88d1bb1
fix(plugin-meetings): throw and log error
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3290,6 +3290,20 @@ export default class Meeting extends StatelessWebexPlugin { | |
} | ||
}); | ||
|
||
this.locusInfo.on(LOCUSINFO.EVENTS.SELF_MEETING_BRB_CHANGED, (payload) => { | ||
Trigger.trigger( | ||
this, | ||
{ | ||
file: 'meeting/index', | ||
function: 'setUpLocusInfoSelfListener', | ||
}, | ||
EVENT_TRIGGERS.MEETING_SELF_BRB_UPDATE, | ||
{ | ||
payload, | ||
} | ||
); | ||
}); | ||
|
||
this.locusInfo.on(LOCUSINFO.EVENTS.SELF_ROLES_CHANGED, (payload) => { | ||
const isModeratorOrCohost = | ||
payload.newRoles?.includes(SELF_ROLES.MODERATOR) || | ||
|
@@ -3492,6 +3506,36 @@ export default class Meeting extends StatelessWebexPlugin { | |
return this.members.admitMembers(memberIds, locusUrls); | ||
} | ||
|
||
/** | ||
* Manages be right back status updates for the current participant. | ||
* | ||
* @param {boolean} enabled - Indicates whether the user enabled brb or not. | ||
* @returns {Promise<void>} resolves when the brb status is updated or does nothing if not in a multistream meeting. | ||
* @throws {Error} - Throws an error if the request fails. | ||
*/ | ||
// eslint-disable-next-line consistent-return | ||
public async beRightBack(enabled: boolean): Promise<void> { | ||
// this logic should be applied only to multistream meetings | ||
if (this.isMultistream && this.mediaProperties.webrtcMediaConnection) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think we need this if statement anymore. |
||
return this.meetingRequest | ||
.sendBrb({ | ||
enabled, | ||
locusUrl: this.locusUrl, | ||
deviceUrl: this.deviceUrl, | ||
selfId: this.selfId, | ||
}) | ||
.then(() => { | ||
this.sendSlotManager.setSourceStateOverride(MediaType.VideoMain, enabled ? 'away' : null); | ||
}) | ||
.catch((error) => { | ||
LoggerProxy.logger.error('Meeting:index#beRightBack --> Error ', error); | ||
|
||
return Promise.reject(error); | ||
}); | ||
} | ||
LoggerProxy.logger.error('Meeting:index#beRightBack --> Not a multistream meeting'); | ||
edvujic marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
|
||
/** | ||
* Remove the member from the meeting, boot them | ||
* @param {String} memberId | ||
|
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like this should be a button and not a checkbox, since it'll be a button in the web client. The button should reflect the brb status of the current user, and would be a good way for us to test whether we are able to accurately show our brb status in the UI, as well as handle any potential race condition that might occur because of it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a good comment, and I believe it's worth changing. We can improve this part in this task and not block the RP with this issue. https://jira-eng-gpk2.cisco.com/jira/browse/SPARK-574653