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

[Task8134448] Implementing the visualMedia API in teamsjs #1864

Merged
merged 9 commits into from
Oct 27, 2023

Conversation

MengyiGong
Copy link
Contributor

@MengyiGong MengyiGong commented Jul 28, 2023

Create a new API named visualMedia which will support image sub-capability.

Description

The goal of these changes is to introduce a new API called the 'visualMedia API'. It includes an image sub-capability that allows the host app to upload and capture up to 10 images for the Mos Apps.

Main changes in the PR:

  1. Implemented the visualMedia API
  2. Implemented the image sub-capability with two functions: captureImages() and uploadImages()

Validation

Validation performed:

  1. Build teamsjs code and start-test-app
  2. Build orange ios app (host app) and open local test app
  3. Scroll to the Visual Media API section, click on "check visual media image capability" to make sure image sub-capability is supported by the host app.
  4. Click on "request visual media permission" if the result is false from "has visual media permission"
  5. Use the testing inputs:
    For captureImages: { "maxVisualMediaCount": 5, "sourceProps": { "source": 1, "cameraRestriction": 1 }, "commonImageProps": { "shouldAllowInkingOnImages": false, "shouldAllowTextStickersOnImages": false, "enableFilterOnImages": false } }
    For retrieveImages: { "maxVisualMediaCount": 10, "sourceProps": {"source": 2}, "commonImageProps": { "shouldAllowInkingOnImages": false, "shouldAllowTextStickersOnImages": false, "enableFilterOnImages": false } }
  6. The expected result (contains image information) showed in the text box

Unit Tests added:

Yes

End-to-end tests added:

No

Change file added:

Yes

Next/remaining steps:

  • Back compt tests

Screenshots:

Screenshot 2023-10-24 at 9 15 39 PM Screenshot 2023-10-03 at 9 03 05 PM Screenshot 2023-10-25 at 12 01 34 PM Screenshot 2023-10-25 at 11 58 57 AM

@MengyiGong MengyiGong requested a review from a team as a code owner July 28, 2023 01:44
@github-actions
Copy link
Contributor

This pull request contains changes to the runtime.ts file. If you, as the author of this PR, have made changes to the Runtime interface please review RUNTIME.md to determine if a new runtime version is required. Please reply to this comment stating what changes, if any, were made to the runtime object and whether a new runtime version was required.

@MengyiGong MengyiGong marked this pull request as draft July 28, 2023 01:44
@MengyiGong MengyiGong changed the title [WIP][DRAFT][Task8134448] Implementing the new MediaAndVideo API in teamsjs [WIP][Task8134448] Implementing the new MediaAndVideo API in teamsjs Jul 28, 2023
packages/teams-js/src/public/imageAndVideo.ts Outdated Show resolved Hide resolved
packages/teams-js/src/public/imageAndVideo.ts Outdated Show resolved Hide resolved
packages/teams-js/src/public/imageAndVideo.ts Outdated Show resolved Hide resolved
packages/teams-js/src/public/imageAndVideo.ts Outdated Show resolved Hide resolved
packages/teams-js/src/public/imageAndVideo.ts Outdated Show resolved Hide resolved
packages/teams-js/src/public/imageAndVideo.ts Outdated Show resolved Hide resolved
packages/teams-js/src/public/imageAndVideo.ts Outdated Show resolved Hide resolved
packages/teams-js/src/public/imageAndVideo.ts Outdated Show resolved Hide resolved
packages/teams-js/src/public/imageAndVideo.ts Outdated Show resolved Hide resolved
packages/teams-js/src/public/imageAndVideo.ts Outdated Show resolved Hide resolved
@MengyiGong MengyiGong force-pushed the maggieg/new_imageAndVideo_api branch 2 times, most recently from 470e5dc to a6e4de3 Compare August 31, 2023 18:36
packages/teams-js/src/public/visualMedia.ts Outdated Show resolved Hide resolved
packages/teams-js/src/public/runtime.ts Outdated Show resolved Hide resolved
@MengyiGong MengyiGong force-pushed the maggieg/new_imageAndVideo_api branch 8 times, most recently from 9d3d011 to 46a6503 Compare September 26, 2023 21:42
@MengyiGong MengyiGong force-pushed the maggieg/new_imageAndVideo_api branch 2 times, most recently from b0b2d2d to 055a74c Compare September 28, 2023 20:43
@MengyiGong MengyiGong changed the title [WIP][Task8134448] Implementing the new MediaAndVideo API in teamsjs [WIP][Task8134448] Implementing the visualMedia API in teamsjs Sep 28, 2023
@MengyiGong MengyiGong force-pushed the maggieg/new_imageAndVideo_api branch 4 times, most recently from ee4ee5a to 0b3b2e7 Compare October 4, 2023 03:47
@MengyiGong MengyiGong changed the title [WIP][Task8134448] Implementing the visualMedia API in teamsjs [Task8134448] Implementing the visualMedia API in teamsjs Oct 4, 2023
@MengyiGong MengyiGong self-assigned this Oct 4, 2023
@MengyiGong MengyiGong marked this pull request as ready for review October 4, 2023 04:15
@MengyiGong MengyiGong requested a review from a team as a code owner October 4, 2023 04:15
@MengyiGong MengyiGong force-pushed the maggieg/new_imageAndVideo_api branch from 04ee276 to de54669 Compare October 4, 2023 04:20
@alicialu-MSFT
Copy link

@erikadoyle I will post a description by EOD today! thanks :)

@MengyiGong
Copy link
Contributor Author

@erikadoyle thanks a lot for reminding!! :) I removed the sharepoint link to dev spec from PR description and marked all doc comments @hidden.

packages/teams-js/src/public/constants.ts Outdated Show resolved Hide resolved
packages/teams-js/src/public/visualMedia.ts Outdated Show resolved Hide resolved
packages/teams-js/src/public/visualMedia.ts Outdated Show resolved Hide resolved
packages/teams-js/src/public/visualMedia.ts Outdated Show resolved Hide resolved
packages/teams-js/src/public/visualMedia.ts Outdated Show resolved Hide resolved
packages/teams-js/src/public/visualMedia.ts Outdated Show resolved Hide resolved
TrevorJoelHarris and others added 4 commits October 26, 2023 10:24
fix function naming

Co-authored-by: Trevor Harris <trharris@microsoft.com>
fix function naming

Co-authored-by: Trevor Harris <trharris@microsoft.com>
fix comment

Co-authored-by: Trevor Harris <trharris@microsoft.com>
AE-MS
AE-MS previously approved these changes Oct 26, 2023
KangxuanYe
KangxuanYe previously approved these changes Oct 26, 2023
Copy link
Contributor

@shrshindeMSFT shrshindeMSFT left a comment

Choose a reason for hiding this comment

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

Thank you for making the changes, I'm learning more about this complex capability as I review it.

apps/teams-test-app/src/components/VisualMediaAPIs.tsx Outdated Show resolved Hide resolved
packages/teams-js/src/public/visualMedia.ts Outdated Show resolved Hide resolved
packages/teams-js/src/public/visualMedia.ts Outdated Show resolved Hide resolved
packages/teams-js/src/public/visualMedia.ts Outdated Show resolved Hide resolved
packages/teams-js/src/public/visualMedia.ts Outdated Show resolved Hide resolved
packages/teams-js/src/public/visualMedia.ts Outdated Show resolved Hide resolved
packages/teams-js/src/public/visualMedia.ts Outdated Show resolved Hide resolved
packages/teams-js/src/public/visualMedia.ts Show resolved Hide resolved
packages/teams-js/src/public/visualMedia.ts Outdated Show resolved Hide resolved
packages/teams-js/src/public/visualMedia.ts Outdated Show resolved Hide resolved
fix comment.

Co-authored-by: Trevor Harris <trharris@microsoft.com>
Copy link
Contributor

@shrshindeMSFT shrshindeMSFT left a comment

Choose a reason for hiding this comment

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

Thank you for making changes. I've learnt a lot about VisualMedia capability. Can't wait to see developers using it. 🚢

@MengyiGong MengyiGong merged commit 2e4da9f into main Oct 27, 2023
17 checks passed
@MengyiGong MengyiGong deleted the maggieg/new_imageAndVideo_api branch October 27, 2023 00:21
Copy link
Contributor

@maglims maglims left a comment

Choose a reason for hiding this comment

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

Sorry for the late comment.

packages/teams-js/src/public/visualMedia.ts Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants