Custom panel example: real-time stream player

Now more and more devices are supporting real-time streaming with MDVR and Camera. You can view video, streams, and audio in GpsGate to keep your tracking all in one place. Multimedia telematics can be used to complement other fleet data.

GpsGate supports embedding custom panels in the workspace that show an html page playing video, stream and audio. 

Since there are many different kinds of media services (and they output different media/stream formats), we'll change/modify the html page to adapt to different formats. 


In this example, we are using video js and Jquery lib in the html. It can auto-detect the stream format and decode them with different decoders. 

The html supports:

  • m3u8
  • mp4/m4p/m4v/mov
  • f4m
  • mpd
  • webm
  • youtube


  1. Host the html page on your on-site GpsGate server or any web server where your GpsGate system can reach. 
  2. Follow the steps of the guide embed custom panels in the workspace to create the custom field and save the stream url in the custom field. 
  3. Create the right-click script and send the stream url as an Html parameter in the iframe as below:
var url = user.getCustomFieldValue('VehicleCameraURL'); //Replace with your custom field name

url = 'http://YOUR_HTML_HOST_ADDRESS/video_player.html?stream=' + url ;

if (url != null) {
'Camera for ' +,


You're ready to start viewing!

In the application, right-click on the vehicle and choose the option you just created. The stream shows in the popup iframe. 



Can I send a command to the device before starting the stream? The device should start the stream function when getting the command. 

Yes, you can add the command sending function in the click script before calling the iframe. 


Can I stop the stream by sending a command to the device when I close the iframe? 

Add a button on the html page and use the jquery or javascript to call GpsGate's REST API to send out the command to the device and stop the stream. Learn more about how to use REST API.


Can I use it to play back the history stream? 

If your media service supplied the playback with the parameter in the video url, this is possible. Create your own html page and include the timestamp for the video recording. Create the click script logic to get the appropriate video file names and play it in the iframe.