amazon-chime-sdk-js
amazon-chime-sdk-js copied to clipboard
Refactor content share usage in demo, add example usage of video transform device
Issue #: None, though there was a request for something along the lines of 'video transform device API for content share that I was looking into.
Description of changes: As mentioned above I was looking into the possibility of a new content share API and did some refactoring along the way as I found the UX to be confusing. The changes are:
- The button is now the only way to start/stop content share.
- The dropdown separates out the configuration button and the pause button from the input source options.
- The input sources is now a 'selection' and picking a value will not automatically start sharing unless already sharing something else.
- The pause button has been merged into the dropdown. Not sure why this deserved its own button in the first place :P.
I also refactored most of the content share functionality into a single class and changed the behavior of audio file and local file playback to support pausing the stream like done for the test video. I also added examples of transforming media before sending via content share (i.e. a circular crop and a volume reduction).
Overall though it does require some Web API finagling to work, I didn't find it super complicated and in need of an explicit API to abstract away the difficulties (yet though i will keep this in mind in the future).
Testing:
I clicked like every button.
Can these tested using a demo application? Please provide reproducible step-by-step instructions.
- Start up two clients (one just to confirm receipt).
- On one client start screen share and confirm receipt. a. Enable volume reduction and confirm receipt, may not have any impact. b. Enable circular crop and confirm receipt, may not have any impact. c. Click pause content share, and resume content share
- Repeat step 2 with all test videos, and test audio options. Stereo needs to be enabled to access all.
- Repeat step 2 with local file playback.
Checklist:
-
Have you successfully run
npm run build:release
locally? y -
Do you add, modify, or delete public API definitions? If yes, has that been reviewed and approved? n
-
Do you change the wire protocol, e.g. the request method? If yes, has that been reviewed and approved? n
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Thanks for doing the refactor on content share :)