我一直在尝试从 Teams 上下文中获取 hostClientType。我获得了下面代码的上下文,但 hostClientType 未填充/可用。我需要区分在团队 webapp 或团队桌面应用程序中运行,并因此认为该属性是。任何帮助表示赞赏。
microsoftTeams.getContext(function (context) {
alert(context.hostClientType) // undefined
})
它不在 .getContext 返回的对象中。
尝试navigator.userAgent的-它会返回类似:"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"
。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句