Spot Screenshot
When using PIXILAB Player 7.1 or later, you can obtain a Display Spot’s screenshot as a JPEG image at the following URL on your Blocks server:
/rest/spot/snap?path=Walls.main&scale=0.5&quality=50
- path is the dot-separated path to the Spot from which to load the image. This parameter is required.
- scale reduces the resolution of the screenshot by the factor specified. Default is 1 for no scaling, returning the screenshot in full resolution. 0.5, as shown above, loads an image scaled down to half its original width and height, thereby reducing the amount of data required as well as the load on the Spot to 25%.
- quality specifies the JPEG quality, as a percentage, where 100 is highest. Set this to a lower value to reduce the amount of data that needs to be sent.
In order to show such an image, the Spot or web page requesting it must provide either of the following:
- Pass an apiKey parameter with the value specified by a spotSnap key under apiKeys in Blocks’ configuration file.
- Be logged in to Blocks with a user name and password having at least the "Staff" role.
To render it on a Spot, login can be requested by setting the "Role Required to Use Spot" to at least "Staff".
You can use such a URL in conjunction with a Media URL or a Live Video block set to "JPEG Polling". The latter will render a low frame rate, live feed of the specified Spot.