Skip to content

dearplain/parsec-web-client

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

license style

Overview

The Parsec web client allows you to connect to a Parsec host via Chrome 69+. It is written in vanilla ES2018 and has no development or runtime dependencies.

This fork enables importing and building with webpack.

Usage

// hack for emscripten .wasm to work with webpack
{
    test: /\.wasm$/,
    type: 'javascript/auto',
    use: [
        {
            loader: 'file-loader',
        },
    ],
}

First of all, add rules above to your webpack config to enable .wasm loading.

import {Client} from './client.js';

const client = new Client(videoElement);

client.connect(sessionId, serverId, {
    encoder_bitrate: 15,
    server_resolution_x: 1366,
    server_resolution_y: 768,
    ...
});

The constructor takes an HTML5 <video> element and can take an optional second callback argument that can receive events such as connect, exit, and shutter. The connect method's third argument is the usual Parsec configuration file in JSON format.

For a more detailed example, check out the example directory.

Development

You'll need Node.js to run the development server. This project was tested with node 8.12.0 LTS.

git clone https://github.com/parsec-cloud/web-client.git
cd web-client
npm start

The development server will be running on port 443, and should be accessed via https://devlocal.info. The web client must run on a secure origin or it will fail the origin check on the Parsec signal server.

Contributing

Please make sure eslint is not throwing any errors before submitting a PR. You can run eslint with --fix to automatically clean up the style.

npm install -g eslint
eslint web-client/src/*

We hope to see your username on our list of contributors soon! 🎉🎉🎉

Bugs & Known Issues

  • The audio may crackle when using macOS. We will be switching to MSE for Opus with the release of Chrome 70.

Resources

About

Parsec client that runs in the browser

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 82.4%
  • HTML 11.4%
  • C 3.6%
  • CSS 1.3%
  • Makefile 1.3%