Howen: How to display live-streaming video
With Howen VSS (Video Service System), video streaming from Howen devices (MDVR) is stored on Howen's VSS system. Within GpsGate, you can use click script to load and play all live and historical streams of fleet movements.
Requirements
- Enable ClickScripts in your application
- Enable Custom Fields for your application
- Auto-Generate Token for Howen Devices
- Download the full sample scripting package here
Set up Device ID
On Howen's system, each vehicle/camera has its own DeviceID. You will need to enter them in GpsGate to map the devices between Howen and GpsGate. Here's how:
1. Set up a user custom field with the label DeviceID.
2. Edit the unit by adding the Howen DeviceID
Set up live stream scripting
Go to Admin > Development > App Builder and create a new app. The name of the app can be anything you want.
4. Inside this new app, expand Click Scripts, and add a new Click Script.
5. Select UserRightClickMenu as its kind. Call it Play Stream. Click Edit and add the following script:
var deviceID = user.getCustomFieldValue('DeviceID');
var token = user.getCustomFieldValue('Token');
var bas = " https://YOUR_HOWEN_VSS_Domain/vss/apiPage/RealVideo.html?token=" + token + "&deviceId=";
var last = "&chs=1_2_3_4&stream=0&wnum=4&panel=1&buffer=2000";
var url = bas + deviceID + last;
if (url != null) {
ui.iframe(
'ShowSteamWindow',
'Stream for ' + user.name,
url,
100,100,800,600
)
}
6. Select the user that has the DeviceID value set when testing the script from the editor. Clicking Run Script will already open the URL in a new window, but you may close this window for now and save the script.
7. Click on Save.
How to display the video within GpsGate
If you have a user role with _UseClickScript privilege and Auto-allow new items enabled, the added script should immediately be available as a Show Camera option in the right-click menu of the vehicle list.
Clicking the option will open a window and load the live stream of the selected user. The final result will look like this: