2.2.0 • Published 5 years ago

groupwat.ch v2.2.0

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

GroupWat.ch

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

Demo

Here's is a demo : https://groupwat.ch/examples/advanced.html

Features

  • Play videos in sync with people from anywhere on the globe
  • Video call, voice call, chat room
  • Support .srt and .vtt subtitles, can be added from your local disk
  • Play your local video files No downloding or streaming
  • Video.js video player, highly customizable and open-source
  • Uses WebSocket server not WebRTC, hence easy to deploy without HTTPS
  • Handy to use as a standalone in your web-browser

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

QuickStart

Include CSS

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/simple-line-icons/2.4.1/css/simple-line-icons.css">
<link href="https://unpkg.com/video.js@7.1.0/dist/video-js.css" rel="stylesheet">
<link rel="stylesheet" href="https://unpkg.com/groupwat.ch/dist/css/styles.min.css">

Include JS

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://unpkg.com/video.js@7.1.0/dist/video.js"></script>
<script src="https://unpkg.com/groupwat.ch"></script>

Initialize the plugin

Replace YOUR_CHANNEL_ID and YOUR_ROOM_ID with your own unique identifiers.

Read WebSocket.in docs to get help with choosing YOUR_CHANNEL_ID and YOUR_ROOM_id.

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

var config = {
  socket_server:'wss://connect.websocket.in/YOUR_CHANNEL_ID?room_id=YOUR_ROOM_ID',
  container : 'video_container',
  src : 'https://vjs.zencdn.net/v/oceans.mp4',
  socket_server : "wss://YOUR_SOCKET_SERVER",
  videoCall:true
}

var mGWatch = new GWatch(config);
</script>

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

Codepen : https://codepen.io/hack4mer/full/dgVJpN

Configuration

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.

OptionDescriptionValue
containerID of the div in which the GWatch UI should loadrequired
socket_serverComplete URL of the socket serverrequired
srcURL of the video file to playrequired, if localSource != true
localSourceShow a local-disk video file selectorDefault: false
videoCallEnable video, voice & chat featuresDefault: false
disableVideoWhen true: Disables video & voice features, allows chat onlyDefault: false
disableChatWhen true: Disables the chat feature, allows video & voice onlyDefault: false
devmodeDevevelopment mode, informative console logs are disabled is set to falseDefault: false
onSocketConnectedFunction to be fired when socket connection is succesfulfunction(){ console.log("socket connected");
onSocketErrorFunction to be fired when socket connection failsfunction(){ console.error("socket connection failed");}

License

MIT

2.2.0

5 years ago

2.1.0

5 years ago

2.0.4

5 years ago

2.0.3

5 years ago

2.0.2-beta.1

5 years ago

2.0.1-beta.1

5 years ago

2.0.0-beta.3

5 years ago

2.0.0-beta.2

5 years ago

2.0.0-beta.1

6 years ago

2.0.0-beta.0

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.0

6 years ago