简体   繁体   English

检测 Microsoft Teams 中当前是否正在进行会议或通话

[英]Detect if a meeting or a call is currently going in Microsoft Teams

I would like to be able to detect if a meeting or a call is currently going on in Microsoft Teams.我希望能够检测 Microsoft Teams 中当前是否正在进行会议或通话。

Is there a way to detect if a call or a meeting is going on in Microsoft Teams using C#?有没有办法使用 C# 检测 Microsoft Teams 中是否正在进行通话或会议?

There is no such API to detect if a call or a meeting is going on in Microsoft Teams.没有这样的 API 可以检测 Microsoft Teams 中是否正在进行通话或会议。

To achieve your requirements, we recommend you to raise feature request here .为了满足您的要求,我们建议您在此处提出功能要求。

Alternatively, you can get real-time Teams meeting events using below API: https://docs.microsoft.com/en-us/microsoftteams/platform/apps-in-teams-meetings/api-references?tabs=json#get-real-time-teams-meeting-events-api或者,您可以使用以下 API 获取实时团队会议事件: https ://docs.microsoft.com/en-us/microsoftteams/platform/apps-in-teams-meetings/api-references?tabs=json#get -实时团队会议事件 API

The user can receive real-time meeting events.用户可以接收实时会议事件。 As soon as any app is associated with a meeting, the actual meeting start and end time are shared with the bot.一旦任何应用程序与会议相关联,实际会议开始和结束时间就会与机器人共享。

The Activity object in TurnContext contains the payload with the actual start and end time. TurnContext 中的 Activity 对象包含具有实际开始和结束时间的有效负载。 Real-time meeting events require a registered bot ID from the Teams platform.实时会议活动需要从 Teams 平台注册的机器人 ID。 The bot can automatically receive meeting start or end event by adding ChannelMeeting.ReadBasic.Group in the manifest.机器人可以通过在清单中添加ChannelMeeting.ReadBasic.Group来自动接收会议开始或结束事件。

Meeting Start Event:会议开始事件:

 protected override async Task OnTeamsMeetingStartAsync(MeetingStartEventDetails meeting, ITurnContext<IEventActivity> turnContext, CancellationToken cancellationToken)
{
    await turnContext.SendActivityAsync(JsonConvert.SerializeObject(meeting));
}

Meeting End Event:会议结束事件:

protected override async Task OnTeamsMeetingEndAsync(MeetingEndEventDetails meeting, ITurnContext<IEventActivity> turnContext, CancellationToken cancellationToken)
{
    await turnContext.SendActivityAsync(JsonConvert.SerializeObject(meeting));
}

Sample Code Link示例代码链接

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM