Google Meet如何显示CPU使用率? [英] How is Google Meet able to show CPU usage?

查看:97
本文介绍了Google Meet如何显示CPU使用率?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我今天在Chrome浏览器中注意到了这一点.

Google Meet在其疑难解答"(Troubleshooting)中显示一张CPU使用情况图表.控制板.我想知道是否已有用于此的API,还是我不知道的聪明技巧?

解决方案

当我在Google Meet页面的疑难解答"页面上看到CPU使用情况图时,我也对此感到很好奇.因此,谷歌搜索了很多,除此链接外,我找不到任何有关其实现方式的正确答案:

chrome扩展程序正在调用 chrome.system.cpu API来获取有关处理器,核心数量,温度等的信息,这些详细信息将通过传递给Google Meets页面 window.postMessage API和消息传递之间Chrome扩展程序和网页.

如果您是浏览器:P的创建者,那么这是一种简洁的方法.

I noticed this today in my Chrome.

Google Meet is showing a chart of CPU usage in their "Troubleshooting" panel. I'm wondering if there's an existing API for this or is it a clever trick I'm not aware of.

解决方案

I was curious about this as well when I saw the CPU USage graph on the Troubleshooting page on the Google Meet's page. So googled a lot and I couldn't find any proper answer as to how it is being achieved apart from this link: https://developer.chrome.com/extensions/system_cpu#method-getInfo.

So, I went through the minified source code of the Google Meet's site and it turns out Google Meet is using this but not on their webpage directly, because it is for chrome extensions only, but through the Google Hangouts Extension which is present in Chrome, Brave and the new Microsoft Edge (Chromium-based).

The chrome extension is calling the chrome.system.cpu API to get the information about the processor, core count, temperatures, etc., and these details are being passed to the Google Meets page via window.postMessage API and Message Passing between Chrome Extension and a Webpage.

This is a neat little way to achieve this if you are the creator of the browser :P.

这篇关于Google Meet如何显示CPU使用率?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆