Skip to content
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

Implementation of call feature streams Support #5241

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

cn0151
Copy link
Member

@cn0151 cn0151 commented Oct 3, 2024

What

The PR contains the implementation to render streams that are not tied to a participant or device Manager. it also contains seat map updates to together mode stream state.

Why

This resolves the issue where we want to render a call feature stream that is not tied to a participant

How Tested

Process & policy checklist

  • I have updated the project documentation to reflect my changes if necessary.
  • I have read the CONTRIBUTING documentation.

Is this a breaking change?

  • This change causes current functionality to break.

Copy link
Contributor

github-actions bot commented Oct 3, 2024

Copy link
Contributor

github-actions bot commented Oct 4, 2024

@cn0151 cn0151 added breaking-change does not need changelog Changes that does not affect the published package in any way do not need changelog entry labels Oct 8, 2024
Copy link
Contributor

github-actions bot commented Oct 8, 2024

Chat bundle size is not changed.

  • Current size: 1756786
  • Base size: 1756786
  • Diff size: 0

Copy link
Contributor

github-actions bot commented Oct 8, 2024

CallWithChat bundle size is not changed.

  • Current size: 11750193
  • Base size: 11750193
  • Diff size: 0

Copy link
Contributor

github-actions bot commented Oct 8, 2024

Calling bundle size is not changed.

  • Current size: 11750180
  • Base size: 11750180
  • Diff size: 0

Copy link
Contributor

github-actions bot commented Oct 8, 2024

@cn0151 cn0151 changed the title Implementation of call feature streams. This will be used to create streams that is not tied to participant Implementation of call feature streams Support Oct 8, 2024
Copy link
Contributor

github-actions bot commented Oct 8, 2024

Copy link
Contributor

github-actions bot commented Oct 8, 2024

@azure/communication-react jest test coverage for stable.

Lines Statements Functions Branches
Base 26726 / 42984
62.17%
26726 / 42984
62.17%
729 / 1333
54.68%
2118 / 3387
62.53%
Current 26717 / 42980
62.16%
26717 / 42980
62.16%
729 / 1333
54.68%
2128 / 3396
62.66%
Diff -9 / -4
-0.01%
-9 / -4
-0.01%
0 / 0
0%
10 / 9
0.13%

Copy link
Contributor

github-actions bot commented Oct 8, 2024

@azure/communication-react jest test coverage for beta.

Lines Statements Functions Branches
Base 54006 / 88291
61.16%
54006 / 88291
61.16%
1096 / 2485
44.1%
3166 / 5259
60.2%
Current 54267 / 88865
61.06%
54267 / 88865
61.06%
1097 / 2507
43.75%
3204 / 5287
60.6%
Diff 261 / 574
-0.1%
261 / 574
-0.1%
1 / 22
-0.35%
38 / 28
0.4%

Copy link
Contributor

github-actions bot commented Oct 8, 2024

Copy link
Contributor

github-actions bot commented Oct 8, 2024

Copy link
Contributor

github-actions bot commented Oct 8, 2024

Failed to pass the UI Test. If this PR is for UI change and the error is snapshot mismatch, please add "update_snapshots" label to the PR for updating the snapshot.

Copy link
Contributor

github-actions bot commented Oct 8, 2024

Copy link
Contributor

github-actions bot commented Oct 8, 2024

Copy link
Contributor

github-actions bot commented Oct 8, 2024

Copy link
Contributor

github-actions bot commented Oct 8, 2024

Copy link
Contributor

github-actions bot commented Oct 9, 2024

Copy link
Contributor

github-actions bot commented Oct 9, 2024

Copy link
Contributor

@dmceachernmsft
Copy link
Member

Hey @cn0151 Can you please add a changelog to this PR? if there are API changes there should always be one.

@cn0151 cn0151 removed the does not need changelog Changes that does not affect the published package in any way do not need changelog entry label Oct 10, 2024
Copy link
Contributor

Failed to pass the UI Test. If this PR is for UI change and the error is snapshot mismatch, please add "update_snapshots" label to the PR for updating the snapshot.

Copy link
Contributor

if (!stream[1].view) {
const createViewResult = await callClient.createCallFeatureView(call.id, stream[1], options);
// SDK currently only supports 1 Video media stream type
if (stream[1].mediaStreamType === 'Video') {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a way we can tell from the Together mode feature which stream is which? I feel that we might be at the mercy here of which stream is first for the positions in the array. We need to make sure that when we are assigning the stream to the MainVideoView position that it is indeed the main video and not the screenshare view.

@@ -278,21 +278,39 @@ export interface RaiseHandCallFeatureState {
/**
* State only version of {@link @azure/communication-calling#TogetherModeCallFeature}. {@link StatefulCallClient} will
* automatically listen for raised hands on the call and update the state exposed by {@link StatefulCallClient} accordingly.
* @alpha
* @beta
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a nit with these tags in the UI lib we don't have a use for Alpha tags so anything not ready to go public just hit them with the @beta tag from the start

* @beta
*/
export interface TogetherModeSeatingCoordinatesState {
// the y coordinate of the participant seating position in the together mode stream
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we denote here which corner of the bounding box this will be?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm guessing top left

*/
export interface TogetherModeCallFeatureState {
/**
* Proxy of {@link @azure/communication-calling#TogetherModeCallFeature.togetherModeStream}.
*/
stream: TogetherModeStreamState[];
streams: Map<string, TogetherModeStreamState>;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a way that we can assign this as a object like { primaryStream: TogetherModeStreamState, secondary: TogetherModeStreamState }

If this is a map Contoso won't know what the keys are defined as when trying to access this state.

Same applies with the seatingCoordinates as well.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, like we discussed on previously Chuk, having an object is much more simple for contoso to tell what is available and what is not. Especially if we are keeping this under the TogeterModeCallFeatureState


/* @conditional-compile-remove(together-mode) */
// This function is used to create a view for a stream that is part of a call feature.
async function createCallFeatureViewVideo(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is all new for the call feature, I think we can move this out to its own file. We should also write a dispose for this so we can properly clean up the stream when the user changes the gallery view or together mode stops.

@@ -457,11 +459,25 @@ export class CallContext {
}

/* @conditional-compile-remove(together-mode) */
public setTogetherModeVideoStream(callId: string, addedStream: TogetherModeVideoStream[]): void {
public setTogetherModeVideoStream(callId: string, addedStreams: TogetherModeVideoStream[]): void {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, can we have this an an object for the TogetherModeVideoStream instead of an array?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants