Pages Menu
TwitterRssFacebook

Posted by on Apr 25, 2022 in Development, Microsoft Teams | 0 comments

How to: Get the mixed video stream of Large Gallery View of participants in a meeting

How to: Get the mixed video stream of Large Gallery View of participants in a meeting

Thanks to some new Graph calls that have recently shown up in the /beta space, developers can now subscribe to receive a video feed that represents the large gallery view – a view that automatically resizes and renders multiple participants together.

Large Galley View is available in the Microsoft Teams client when there are at least 10 participants and can be enabled manually by anyone in the meeting:

Credit: Microsoft

The interesting thing here though is that when this happens, technically a new participant joins the Teams call: the “large gallery view participant”. You won’t see this participant show in the roster though – but internally that’s what happening.

This is interesting because this new participant shows up in the participant roster that developers can access for a meeting (using the onlineMeeting subscription), and that also includes enough information about the media streams for an application to access the raw video media – giving applications a nicely-mixed single view of all participants in a meeting!

There were just two problems to this approach previously though: firstly it required someone in the meeting to “turn on” large gallery view in order for the participant to be added. Secondly, it wasn’t obvious which participant was the large gallery view participant.

Both these issues have now been addressed.

User Not Needed: automatically adding the large gallery view participant

There is a new Microsoft Graph API call to add the large gallery participant to a meeting automatically, with needing a user to do it. As you might imagine, this is a call that has only application-level permissions (not user delegated ones), and requires one of: Calls.JoinGroupCallAsGuest.All, Calls.JoinGroupCall.All, Calls.InitiateGroupCall.All.

It’s a POST call that’s sent to the meeting with a client context. It’s an aynchronous call so the expected result is a HTTP 202 code (not 200) with enough information to continue to check the status of the operation:

POST https://graph.microsoft.com/beta/communications/calls/57dab8b1-894c-409a-b240-bd8beae78896/addLargeGalleryView
Content-Type: application/json
Content-Length: 46

{
  "clientContext": "785f4929-92ca-497b-863f-c778c77c9758"
}

Read more about this call in the docs: call: addLargeGalleryView – Microsoft Graph beta | Microsoft Docs

Identifying the large gallery view participant

Now that developers have a way of making sure the large gallery view participant is added to a meeting, how can they then identify that participant from the roster?

In a newly published article, Microsoft recommend using the following methods to identify the large gallery view participant:

  • Use ApplicationType = LargeGallery-V2.
  • The direction of the video media stream will be set to sendReceive.

There is also some metadata returned in the participant object which provides some additional information about the large galley view experience, including which page is currently being viewed, and whether the view is being shown in the meeting.


This is a significant and useful development for the Microsoft Teams Developer Platform (in my view). Giving developers access to mixed feeds of busy meetings will mean more opportunities for integration and platform development, and more applications meeting user needs. With this new API call developers can now ensure that they can configure any meeting they want to in order to get a mixed feed as needed.

I haven’t yet been able to try this, in order to know whether the API call to add large gallery view only works if there are 10 or more participants in the meeting (as the client does) or whether it’s possible to run it against meetings of any size. If anyone gets there first and can let me know, I’ll update this blog.

Written by Tom Morgan

Tom is a Microsoft Teams Platform developer and Microsoft MVP who has been blogging for over a decade. Find out more.
Buy the book: Building and Developing Apps & Bots for Microsoft Teams. Now available to purchase online with free updates.

Post a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.