Abstract: in the process of developing skills, matching video stream debugging skills is a very necessary link, and it is also an important link to test the effectiveness of the skills. HiLens Studio introduces the function of using the mobile phone real-time video stream to debug the code, using the real-time video stream of the mobile phone camera as the skill input to view the skill output.

This article is shared from the HUAWEI CLOUD community " Cloud Lesson | Play with HiLens Studio's Mobile Phone Real-time Video Stream Debugging Code ", the original author: Hi,EI.
image.png

HiLens Studio is a multi-language integrated development environment (IDE) for developers, including code editors, compilers, debuggers, etc. Developers can write and debug skill codes in HiLens Studio.

In the process of developing skills, matching video stream debugging skills is a very necessary link, and it is also an important link to test the effects of skills. However, in general debugging, you need to upload the recorded video first, or use the preset video stream in the HiLens Studio skill template, and you cannot observe the skill effect through the real-time video stream.

Recently, HiLens Studio launched use the mobile phone real-time video stream to debug code function , using the real-time video stream of the mobile phone camera as the skill input to view the skill output.

The debugger of HiLens Studio allows the use of breakpoints, single-step debugging, etc., to be used in conjunction with the editor. In the process of debugging the code, you can log in to HiLens Studio with your mobile phone and use the real-time video stream of the mobile phone camera as the skill input to view the skill output.

Ready to work

  1. To use HiLens Studio for the first time, please activate HiLens Studio. If you are not using HiLens Studio for the first time, please order the HiLens Studio version.
  2. Create a new skill project in HiLens Studio and open the skill project.

Step 1: Bind the phone and HiLens Studio account

1. Click the user name in the upper right corner of the HiLens Studio interface and select "Connect to the phone camera (Beta)".

The "Connect to the phone camera (Beta)" dialog box pops up.
image.png

2. Follow the instructions in the "Connect to the phone camera (Beta)" dialog box, open the phone WeChat, and scan the QR code in the dialog box.

Mobile WeChat enters the "EI Experience Space" applet.
image.png

3. In the mobile WeChat applet, select "HiLens Studio".

Enter the HiLens Studio mobile applet interface.
image.png

4. Click "Next" in the "Connect to the phone camera (Beta)" dialog box on the HiLens Studio interface.

The dialog box displays the QR code that the camera pushes.
image.png

5. Check the "User Agreement" on the HiLens Studio mobile applet interface, and then click "Scan" to scan the QR code in step 4 with your mobile phone.

Enter the phone debugging interface, as shown in the figure below. At this time, the phone is bound to the HiLens Studio account, and you can use the phone camera to debug skills online.
image.png
image.png

Step 2: Debug and run the skill code

1. Click the mouse on the left side of the code in the HiLens Studio editing area, and a breakpoint appears.
image.png

2. Debug the code.

Click HiLens Studio above the navigation bar interface http://resource.idp.huawei.com/idpresource/nasshare/editor/image/8200791467/1_zh-cn_image_0000001136772155.png , select "Read Stream from Mobile Phone".
image.png

Check the code debugging information in the "Debug Console" at the bottom of the HiLens Studio interface.
image.png

3. Run the code

After the code debugging is completed, you can run the code to view the skill output.

Click the Run button in the navigation bar at the top of the HiLens Studio interface.

After the HDMI skill runs the skill code, you can view the skill output on the HiLens Studio applet interface.
image.png

At the same time, you can also click on the right side of the HiLens Studio interface to view the skill output in the "Video Output" area.
image.png

What are you waiting for? Practice and teach you how to quickly play HiLens Studio!

Please click here for details.

Click to follow to learn about Huawei Cloud's fresh technology for the first time~


华为云开发者联盟
1.4k 声望1.8k 粉丝

生于云,长于云,让开发者成为决定性力量