如何获取 Microsoft Teams 上下文 属性 hostClientType
How to get Microsoft Teams context property hostClientType
我一直在尝试从 Teams 上下文中获取 hostClientType。我通过下面的代码获得上下文,但 hostClientType 未填充/可用。我需要区分团队网络应用程序或团队桌面应用程序中的 运行,因此认为 属性 是。任何帮助表示赞赏。
microsoftTeams.getContext(function (context) {
alert(context.hostClientType) // undefined
})
.getContext returns.
不在对象中
尝试 navigator.userAgent - 它会 return 类似于:"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Teams/1.1.00.22163 Chrome/61.0.3163.100 Electron/2.0.4 Safari/537.36"
.
我一直在尝试从 Teams 上下文中获取 hostClientType。我通过下面的代码获得上下文,但 hostClientType 未填充/可用。我需要区分团队网络应用程序或团队桌面应用程序中的 运行,因此认为 属性 是。任何帮助表示赞赏。
microsoftTeams.getContext(function (context) {
alert(context.hostClientType) // undefined
})
.getContext returns.
不在对象中尝试 navigator.userAgent - 它会 return 类似于:"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Teams/1.1.00.22163 Chrome/61.0.3163.100 Electron/2.0.4 Safari/537.36"
.