Open the Camera Resource in a full screen view inside Nx Witness
In ProgressHi,
I am using Nx vms api to show the list of available cameras in the locally hosted webpage. On selecting the camera resource it should get spawned in a full screen window. That is the requirement. I have the below function to do the functionality.
But the problem here is: sometimes it comes in full screen , most of the times it gets displayed with web page view which we dont want. On clicking on the camera resource it has to be the only view by keeping the localhost page somewhere in the layout.
-
Hello Jenifer,
Based on the methods used in the attached code snippet you are trying to utilize the In-Client JS API.
Sorry, I had to make this disclaimer because Nx Platform offers different types of the devtools so I am just trying to resolve a potential confusion for the people checking this public thread out in future.Unfortunately right now there is no way to full-screen the item on the layout utilizing this API set.
So far this could be done only by one of two actions:
- User Action - double-click over some item in the client GUI
- Event Action - by server executing certain action after something happened:
https://resources.vmsproxy.com/nx_6.0_help/action-set_to_fullscreen.html
The latter could be somewhat automated by utilizing the following chain:
- Create an Event "On Generic Event" -> "Set item to full screen"
- Modify the created in step 1 event on the fly by utilizing POST /ec2/saveEventRule api call signing it with the access token received from the JS API replacing values for the action parameters(layout id and camera id)
- Send the generic event to the server based on the necessity to trigger the rule modified in step 2
Although we do agree that setting items to fullscreen would be a reasonable expansion for the JS API. So I am going to add it to the future roadmap.
Please sign in to leave a comment.
Comments
1 comment