Total Pageviews

Saturday, 3 June 2023

基于浏览器的开源视频会议解决方案Hublin



Hublin是一个免费开源基于浏览器的视频会议解决方案,基于WebRTC技术,不需要任何插件即可实现不同浏览器间分散的通信方式。视频通信信息并不会以任何形式的视频流经过服务器,提高了实时通讯的安全和效率。Hubl.in获得了2015年度黑鸭子开源年度最佳新秀奖。

源代码:https://github.com/linagora/hublin

-------------------------------------------------------

 

Hublin

Join the chat at https://gitter.im/linagora/hublin

Code Climate Codacy Badge CodeFactor Build Status Docker Build Status

Hubl.in is a free and open source video conference solution built with love and designed with ethics in mind. It's the best way to initiate a communication anywhere with anybody and brings real time conversation to the next level. Hubl.in allows free communication without additional plugins.

Installation

A complete and more advanced documentation is available at https://linagora.github.io/hublin-doc. The following instructions assumes that you are installing Hublin on a debian distribution.

  1. clone the repository
git clone https://github.com/linagora/hublin.git
  1. Install node.js

Hublin uses Node 8. It is highly recommended that you use nvm to install a specific version of node.

nvm use
# will install and use required node version (lts/carbon)
  1. Go into the project root directory and install project dependencies
npm install
  1. Install and configure MongoDB

You must install mongoDB. We suggest you to use mongoDB version 2.6.5.

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
echo 'deb http://downloads-distro.mongodb.org/repo/debian-sysvinit dist 10gen' | tee /etc/apt/sources.list.d/mongodb.list
apt-get install -y mongodb-org=2.6.5 mongodb-org-server=2.6.5 mongodb-org-shell=2.6.5 mongodb-org-mongos=2.6.5 mongodb-org-tools=2.6.5
service mongod start
  1. Copy the sample db.json configuration file and adapt it to your needs (especially the mongodb URL)
cp config/db.json.sample config/db.json
  1. Install Redis
apt-get install redis-server

A more advanced deployment using the Janus WebRTC Gateway is possible and described in the Hublin + Janus documentation.

Starting the server

Once all your services are ready and started (Mongo, Redis and optionally Janus), use npm start to start the server

npm start

Hublin is now available on http://localhost:8080.

Testing

First, install the required npm dependencies (as an administrator):

npm install -g mocha grunt-cli bower karma-cli

You can check that everything works by launching the test suite:

grunt

If you want to launch tests from a single test, you can specify the file as command line argument. For example, you can launch the backend tests on the test/unit-backend/webserver/index.js file like this:

grunt test-unit-backend --test=test/unit-backend/webserver/index.js

Note: This works for backend and midway tests.

Some specialized Grunt tasks are also available, check the Gruntfile.js file for more:

grunt linters # launch hinter and linter against the codebase
grunt test-frontend # only run the fontend unit tests
grunt test-unit-backend # only run the unit backend tests
grunt test-midway-backend # only run the midway backend tests
grunt test # launch all the testsuite

Fixtures

Fixtures can be configured in the fixtures folder and injected in the system using grunt:

grunt fixtures

Note that this will override all the current configuration resources with the fixtures ones.

Develop

Running grunt dev will start the server in development mode. Whenever you make changes to server files, the server will be restarted. Make sure you have started the mongodb and redis services beforehand.

Updating files for distribution

grunt plugins are used to process files and generate distribution. You will have to follow some rules to not break the distribution generation which are defined here.

Frontend

Any project frontend JS file which is under frontend/js and used in a web page must be placed between generator tags. For example, in frontend/views/meetings/index.pug file:

// <!--build:js({.tmp,frontend}) meetings.js-->
script(src='/js/modules/user/user.js')
...
script(src='/js/meetings/app.js')
// <!--endbuild-->

The files placed between the two comment lines will be used to generate a meetings.js file (concatenate and minify all).

Backend

All the files from backend are copied into the dist/backend folder without any change.

Static files

These folders are pushed in the distribution:

  • config
  • templates

If you need to add more, you will have to change the copy:dist and dist-files tasks in Gruntfile.js

Create a distribution

To create a distribution with clean environment, minified files and install production dependencies:

grunt dist-all
cd dist
npm install --production

Then you can start the server with npm start, node server, or your favorite tool (Kudos to forever).

Embedding

Want to embed hubl.in on your website? Read more here.

from https://github.com/linagora/hublin

 

No comments:

Post a Comment