27

Jun

"WebHID" and "Webassembly", the most advanced web technology that came so far

 We don't have a day when we don't use web browsers on PCs and smartphones.In addition to reading a variety of articles, emails, music, videos, SNS, shopping, chatting, chatting, video conferences, and documents, you can now do many things that can be done on the OS on the web.In this special feature, we will explain the latest technologies of such Web.

 This time, we will introduce "WebHID (Human Interface Device)" and "WASM (WebASSEMBLY)", which are increasing interest in the new usage of the Web.

ハードを直接操作できるWebHID

 WebHID is a specification for connecting to external devices such as Nintendo Switch Joy-Con and PlayStation DualShock to perform input and output.By executing the API through JavaScript, you can control the input / output with the external device.

「WebHID」や「WebAssembly」、ここまで来たWeb技術の最先端

WebHIDを使ってJoy-Conの情報を取得WebHIDはWebからHuman Interface Deviceを制御できるAPI。現在のところ、主要なブラウザーではChrome、Edge、Operaが対応している。グーグルのエンジニアがJoy-Conを制御するWebページをGitHubで公開しており、それを使って実際に接続してみた。ボタン類の操作、加速度センサーやジャイロの値を取得できる[画像のクリックで拡大表示]

 I actually connected Joy-Con via Mac and tried it.It took less than 1-2 minutes from the state where nothing was set and used in Google Chrome, so I started using it immediately.

 In addition to WebHID, webSerial (you can access IoT devices via Serial, you can rewrite the application of the external device from the Web), and "WebNFC" (you can read and write NFC tags via JavaScript)APIs have been developed that can directly access physical external devices throughout.

 In the past, it was not possible to use a dedicated program for each sensor or device with C / C ++, etc., but anyone can use it easily using JavaScript.

It is necessary to register as a Nikkei Clostek Active member in the future

日経クロステック Activeは、IT/製造/建設各分野にかかわる企業向け製品・サービスについて、選択や導入を支援する情報サイトです。製品・サービス情報、導入事例などのコンテンツを多数掲載しています。初めてご覧になる際には、会員登録(無料)をお願いいたします。