cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

Playing a video after QR-Code Scan

MS_FLiX_HSD
7-Bedrock

Playing a video after QR-Code Scan

Hey Guys! 

 

I am facing another problem. I want to scan different QR-Codes with the Hololens 2. Depending on which QR-Code is scanned I want to make videos visible in order to build up a learning platform with Vuforia Studio. 

 

I guess I need a Java Script code to do so as the scanning function is not able to to it directly.

 

Can anybody help me with that? I am really struggling with the Code or to find a solution.

 

Thank you in advance!

 

Marius 

1 ACCEPTED SOLUTION

Accepted Solutions
sebben
12-Amethyst
(To:MS_FLiX_HSD)

Hi,

yes, if you have more 3D Video Panels you don't have to change the source.

You can change the visibility instead: 

 $scope.view.wdg["3DVideo-x"].visible = true;

But I'm not sure if I get your use case. The User could just go around and watch all the videos. Why do you need the scanning?

And how do you position the videos on the parts, what  target are you going to use?

View solution in original post

5 REPLIES 5

Some related useful topics:

sebben
12-Amethyst
(To:MS_FLiX_HSD)

Hi,

if you can choose the QR-codes freely, you can just bind the scanned value property to the video source property.

Then generate QR-codes with the path to the video source, for example : app/resources/Uploaded/video1.mp4

 

If not, you need a function like this and execute it from the value acquired event for the scan widget.

$scope.changeVideo = function(){

  if($scope.view.wdg["scan-1"].scannedValue == "QR-Code1-URL"){
   $scope.view.wdg["3DVideo-1"].src="app/resources/Uploaded/video1.mp4";
  }
                                                                 
  else if($scope.view.wdg["scan-1"].scannedValue == "QR-Code2-URL"){
    $scope.view.wdg["3DVideo-1"].src="app/resources/Uploaded/video2.mp4";
  }
}

 

Thank you for the hints! I have different QR-Codes for different videos. Each Video is positioned in a different Location in my 3D Container. For Example there is a video for how to repair parts of the High Bay Warehouse & a Video for repairing the motor of a Vacuum gripper arm. The videos are positioned next to the parts itself. So I have to call a specific 3D Video with the scan of a QR Code. At the moment I can chose the freely. 

 

The source is a youtube video as a test & the source is already assigned to the 3D-Video Widget. Can I then let the 

.src="app/resources/Uploaded/video1.mp4";

out?

 

Or how do I have to change this in order to make it work with my circumstances?

 if($scope.view.wdg["scan-1"].scannedValue == "QR-Code1-URL"){
   $scope.view.wdg["3DVideo-1"].src="app/resources/Uploaded/video1.mp4";

 

Sorry for the maybe stupid question. I am not an expert in Java Script. 

 

Thank you,

Marius 

sebben
12-Amethyst
(To:MS_FLiX_HSD)

Hi,

yes, if you have more 3D Video Panels you don't have to change the source.

You can change the visibility instead: 

 $scope.view.wdg["3DVideo-x"].visible = true;

But I'm not sure if I get your use case. The User could just go around and watch all the videos. Why do you need the scanning?

And how do you position the videos on the parts, what  target are you going to use?

Okay perfect! 🙂 

 

Yes the user goes around but the panels should just pop up after the scan as it makes the whole container to full if they are there all the time. 

Within the container there is also status data pictured & an ordering dashboard. I position them above or next to the part which is under consideration. 

 

Top Tags