Creating a widget to embed camera into your own website

Widgets are one of the ways by which customers can share their cameras with others. By using widgets you can embed the camera on your website which will be visible to all the users visiting your website. You can create a widget from the admin portal. 


1. Go to the Share menu and click on the Share button

After logging into the Admin portal, the user needs to go to the Sharing tab. Then click on the "Share" button to start the widget creation process.


         



2. Select Widget

After clicking on the Share button, a pop-up will open giving 3 options. From the options, select "widget".


          


3. Select the camera for which you want to create a widget

The last step will open a new pop-up where you can select the desired camera for which you want to create the widget. Click under the Select cameras option and this will open a drop-down list. 


Note: Only one camera can be selected per widget


      

Users can also enter the name of the camera if the list is long, to filter the camera list.


      


4. Add a name, the description is optional

After selecting the camera, Enter the desired name for the widget and type in the description or the user can leave the description part blank. This will help in identifying the widget over the period of time if the use case of the widget is forgotten. 


          


5. Click share

Click on share to create the widget. Please note that there are extra charges for creating a widget. Please contact the sales team for more information on this.

Also, the camera plan will be changed to Pay as you go as the user creates a widget. 


                            


Note: If the plan is already a Pay-as-you-go plan then the customer can create the widget at the same time else the Integrator has to be involved. Also, note that as long as the widget is active all the other camera plans will be disabled. To change the camera plan, the widget must be deleted first.

                          


6. Select options for the widget. 

a. If autoplay is selected widget will start streaming as soon as the visitor opens your page and it loads, without autoplay the visitor will have to press the play button to start playback.
b. If Disable WebRTC is selected then the camera will work in DVR mode only (works better on slower computers or if there are issues with internet connectivity)
c. If Timeline is selected your visitor will be able to see the timeline for the camera and navigate through the archives of the camera.
d. Enable events will reveal events from the camera to your visitors if object detection is configured for this camera visitors will see those events as well.
e. Hide the camera title will remove the camera name from the widget. Removes only the cloud camera name, if the camera has an OSD name it will still be shown.

f. PTZ feature can be enabled to add controls in your widgets to allow visitors to your website to interact with the PTZ camera. 

g. Autopause is an extra safety measure to limit the Traffic cost incurred by misuse of the widget i.e. if the visitor forgot to close the webpage then the autopause feature will stop playing the stream.


              


7. Copy the HTML code at the bottom of the widget properties window and paste it into your webpage code. The exact procedure will depend on the structure of your website.


                       


If you wish to change widget options in the future you need to do so only in the admin portal, you do not need to modify the code on your page after you save changes in the Admin portal. 


Note: Please note that widget will create traffic and will increase camera consumption. Whenever a visitor views the camera feed it will generate traffic for that camera. As the camera is on a Pay-as-you-go plan, the cost associated with the camera is not fixed and will depend on the number of times the visitors viewed the camera feed which can lead to a huge monthly bill for that camera. For example, if 1 camera is used for the widget and is at 750Kbps average bitrate then if a visitor view the camera for 1 minute the traffic generated will be as follow:

1. Find the total bitrate for the camera 1* 750 = 750 Kbps

2. Convert Kbps into Kilobytes dividing by 8 so 750 / 8 = 93.75 KB is generated every second

3. Convert into MB dividing by 1024 so 93.75  / 1024 = 0.0915 MB 

4. Convert into GB dividing by 1024 again so 0.0915 / 1024 = 0.00008940 GB

5. Convert into GB per minute multiplying by 60 so 0.00008940* 60 = 0.005361 GB is generated every minute

So, if 100 visitors are viewing the widget for a minute, the traffic generated will be 0.53 GB, and in an hour they will generate 31.8 GB of traffic.

 

For more information on how to estimate data consumption, please visit this Page↗️

For more information on how to roughly estimate bandwidth requirements, please visit this Page↗️

Tags