MicrosoftDocs / msteams-docs

Source for the Microsoft Teams developer platform documentation.
https://aka.ms/teamsdev
Creative Commons Attribution 4.0 International
280 stars 501 forks source link

Stage View - Screen Share Mode #10844

Open Prithvi-MSFT opened 4 months ago

Prithvi-MSFT commented 4 months ago

Type of issue

Typo

Feedback

The code snippet added in below section does not mention how to configure option for sharingProtocol https://review.learn.microsoft.com/en-us/microsoftteams/platform/apps-in-teams-meetings/build-apps-for-teams-meeting-stage?branch=pr-en-us-10143&tabs=desktop%2Capp-content#advanced-share-to-stage-apis

Also the value is given as string with accepted value as screenshare. However inside sdk source code, value is ScreenShare. https://github.com/OfficeDev/microsoft-teams-library-js/blob/024a64cca928c59acaac2ef78b23150ad2539955/packages/teams-js/src/public/meeting.ts#L538

Page URL

https://review.learn.microsoft.com/en-us/microsoftteams/platform/apps-in-teams-meetings/build-apps-for-teams-meeting-stage?branch=pr-en-us-10143&tabs=desktop%2Capp-content

Content source URL

https://github.com/MicrosoftDocs/msteams-docs/blob/main/msteams-platform/apps-in-teams-meetings/build-apps-for-teams-meeting-stage.md

Author

@Prithvi-MSFT

Document Id

5ca1f6b3-347e-7182-0d26-d282e26f3614

microsoft-github-policy-service[bot] commented 4 months ago

Hi Prithvi-MSFT! Thank you for bringing this issue to our attention. We will investigate and if we require further information we will reach out in one business day. Please use this link to escalate if you don't get replies.

Best regards, Teams Platform

ChetanSharma-msft commented 4 months ago

Hello @Prithvi-MSFT - Please help to assign this issue to appropriate person or team from engineering team.

v-ypalikila commented 4 months ago

Hi @Prithvi-MSFT,

Can you please confirm if the following code snippet is correct to be added in the docs:

expect(shareAppContentToStageMessage.args[1]).toMatchObject(shareOptions); }); it (should successfully share app content to stage. content: ${context} context`, async () => { await utils.initializeWithContext(context);

        let callbackCalled = false;
        let returnedSdkError: SdkError | null;
        let returnedResult: boolean | null;
        const requestUrl = 'validUrl';
        const shareOptions = {
          sharingProtocol: meeting.SharingProtocol.ScreenShare,
        };
        meeting.shareAppContentToStage(
          (error: SdkError, result: boolean) => {
            callbackCalled = true;
            returnedResult = result;
            returnedSdkError = error;
          },
          requestUrl,
          shareOptions,
        );

        const shareAppContentToStageMessage = utils.findMessageByFunc('meeting.shareAppContentToStage');
        expect(shareAppContentToStageMessage).not.toBeNull();
        const callbackId = shareAppContentToStageMessage.id;
        utils.respondToFramelessMessage({
          data: {
            id: callbackId,
            args: [null, true],
          },
        } as DOMMessageEvent);
        expect(callbackCalled).toBe(true);
        expect(returnedSdkError).toBeNull();
        expect(returnedResult).toBe(true);
        expect(shareAppContentToStageMessage.args).toContain(requestUrl);
        expect(shareAppContentToStageMessage.args[1]).toMatchObject(shareOptions);
      });

      it('should throw if the shareAppContentToStage message sends and fails', async () => {`
Prithvi-MSFT commented 2 months ago

Hi @v-ypalikila Below function code snippet we can use https://github.com/OfficeDev/Microsoft-Teams-Samples/blob/207430f8104b93ff18a3344b0ef128e77db898b2/samples/meetings-stage-view/csharp/AppInMeeting/ClientApp/src/components/app-in-meeting.jsx#L107