Make your own video room to watch videos remotely with all your friends

Make your own video room to watch videos remotely with all your friends


Here’s is a demo :


Note : current version on supports two peers (people) only, we are adding multiple peer support very soon


Include CSS

<link rel="stylesheet" href="">
<link href="" rel="stylesheet">
<link rel="stylesheet" href="">

Include JS

<script src=""></script>
<script src=""></script>
<script src=""></script>

Initialize the plugin

Replace YOUR_CHANNEL_ID and YOUR_ROOM_ID with your own unique identifiers.

Read docs to get help with choosing YOUR_CHANNEL_ID and YOUR_ROOM_id.

<div id="video_container"></div>  
<script type="text/javascript">

var config = {
  container : 'video_container',
  src : '',
  socket_server : "wss://YOUR_SOCKET_SERVER",

var mGWatch = new GWatch(config);

This example code usage free WebSocket server from for WebRTC signaling, you may use your own WebSocket server if you wish to.

Codepen :


Following are configuration options available for the GWatch API

Note: This doc table might be outdated, see GWatch.js source for updated configurations and Event.js for all supported events.

Option Description Value
container ID of the div in which the GWatch UI should load required
socket_server Complete URL of the socket server required
src URL of the video file to play required, if localSource != true
localSource Show a local-disk video file selector Default: false
videoCall Enable video, voice & chat features Default: false
disableVideo When true: Disables video & voice features, allows chat only Default: false
disableChat When true: Disables the chat feature, allows video & voice only Default: false
devmode Devevelopment mode, informative console logs are disabled is set to false Default: false
onSocketConnected Function to be fired when socket connection is succesful function(){ console.log("socket connected");
onSocketError Function to be fired when socket connection fails function(){ console.error("socket connection failed");}