|
| 1 | +import { Meta, Source } from '@storybook/addon-docs'; |
| 2 | + |
| 3 | +import CustomMediaAccessCompositeText from '!!raw-loader!./snippets/MediaAccessComposite.snippet.tsx'; |
| 4 | +import MediaAccessMicCameraCapabilitiesText from '!!raw-loader!./snippets/MediaAccessMicCameraCapabilities.snippet.tsx'; |
| 5 | +import MediaAccessRemoteParticipantsText from '!!raw-loader!./snippets/MediaAccessRemoteParticipants.snippet.tsx'; |
| 6 | + |
| 7 | +<Meta title="Concepts/MediaAccess" /> |
| 8 | + |
| 9 | +# Media access |
| 10 | + |
| 11 | +The media access feature in Teams meetings allows the Organizer, Co-organizer, and Presenter to control whether attendees can enable their mic or camera. |
| 12 | +This can be managed through the Teams meeting options “Allow mic/camera for attendees” or on a per-participant basis with the options “Disable mic/camera” and “Enable mic/camera.” |
| 13 | + |
| 14 | +Teams meeting attendees can check their own media access state using the capabilities `unMuteMic` and `turnVideoOn`, or view the media states for remote participants. |
| 15 | + |
| 16 | +ACS users must have the Organizer, Co-organizer, or Presenter role to use the media access feature. |
| 17 | + |
| 18 | +The supported scenarios for the media access feature are: |
| 19 | + |
| 20 | +- Teams Interop Meetings |
| 21 | +- Teams Interop Meetings as a Teams user |
| 22 | +- Teams ad-hoc call |
| 23 | + |
| 24 | +Participants can disable/enable audio/video using the contextual menu button on their video gallery tile like shown below: |
| 25 | + |
| 26 | +<img |
| 27 | + style={{ width: 'auto', height: 'auto' }} |
| 28 | + src="images/media-access/media-access-disable-mic-camera-video-tile.png" |
| 29 | +/> |
| 30 | + |
| 31 | +Participants can also disable/enable audio/video using the contextual menu button on their participant item in the people pane like |
| 32 | +shown below: |
| 33 | + |
| 34 | +<img |
| 35 | + style={{ width: 'auto', height: 'auto' }} |
| 36 | + src="images/media-access/media-access-disable-mic-camera-people-pane.png" |
| 37 | +/> |
| 38 | + |
| 39 | +A local participant with audio or video disabled will see a mic or camera disabled icon on the control bar, notifications that mic and camera have been disabled and will not be able to unmute or turn the video on, as shown below: |
| 40 | + |
| 41 | +<img |
| 42 | + style={{ width: 'auto', height: 'auto' }} |
| 43 | + src="images/media-access/media-access-local-participant-mic-camera-disabled.png" |
| 44 | +/> |
| 45 | + |
| 46 | +The concept of the media access feature is the same in Microsoft Teams which you can read |
| 47 | +more about here - |
| 48 | +[Manage attendee audio and video permissions in Microsoft Teams meetings](https://support.microsoft.com/en-us/office/manage-attendee-audio-and-video-permissions-in-microsoft-teams-meetings-f9db15e1-f46f-46da-95c6-34f9f39e671a). |
| 49 | + |
| 50 | +## Listening to local participant `unmuteMic` and `turnVideoOn` capabilities changes |
| 51 | + |
| 52 | +You can listen to `capabilitiesChanged` events on the CallAdapter or CallWithChatAdapter by defining your own |
| 53 | +`capabilitiesChangedListener` callback. The following code snippet shows an example of listening to `capabilitiesChanged` |
| 54 | +events on the CallAdapter to log the added and removed participants to the browser console. But you can choose to |
| 55 | +do more if you wish. |
| 56 | + |
| 57 | +<Source code={MediaAccessMicCameraCapabilitiesText} /> |
| 58 | + |
| 59 | +Note: Assigning a `capabilitiesChangedListener` callback to listen for 'capabilitiesChanged' events will not override the |
| 60 | +behavior of CallComposite and CallWithChatComposite which places participants in the main view of |
| 61 | +VideoGallery. |
| 62 | + |
| 63 | +## UI component to use remote participant(s) media access state |
| 64 | + |
| 65 | +If you want to build your own UI components using the media access states we suggest using the `VideoGallerySelector` or creating your own custom selector to pipe in the media access states for remote participants to your UI component. |
| 66 | +Here is an example of how we put to together the VideoGallery component with these media access states. |
| 67 | + |
| 68 | +<Source code={MediaAccessRemoteParticipantsText} /> |
| 69 | + |
| 70 | +## Programatic media access for participants |
| 71 | + |
| 72 | +The CallAdapter and CallWithChatAdapter can also be used to programatically change media access one or more participants using |
| 73 | +the functions `forbidAudio`, `permitAudio`, `forbidVideo`, `permitVideo`, `forbidOthersAudio`, `permitOthersAudio`, `forbidOthersVideo` and `permitOthersVideo`. |
| 74 | +The example below shows a code snippet where a button is added to invoke the `forbidAudio` and `permitAudio` function to change media access state |
| 75 | +for remote participants from an added dropdown that is populated by remote participants in the call. |
| 76 | + |
| 77 | +<Source code={CustomMediaAccessCompositeText} /> |
0 commit comments