Netless

Netless

  • JavaScript
  • Android
  • iOS
  • Server
  • FAQ
  • GitHub
  • 🇨🇳 中文

›Installation guide

Document structure

  • Outline

Installation guide

  • SDK install
  • Version history
  • Open source
  • Debug

Quick start

  • Precondition
  • Room authentication
  • Real-time room
  • replay

Initialization

  • SDK parameters
  • Room parameters
  • Replay parameters

Features

  • Tools
  • Perspective operation
  • Page (scene) management
  • Status listen
  • Whiteboard operation
  • Custom event
  • Cursor position sync
  • Document conversion
  • Replay
  • Big class read-only
  • Plugins

Upgrade

  • SDK v2 migration

SDK install

SDK

  1. white-web-sdk
    • Recommended for non-React framework development
  2. white-react-sdk
    • React framework development (depending on white-web-sdk, no need to repeat installation)

white-web-sdk is the same as white-react-sdk version, and it is published at the same time every time.

How to install

1. Package management tool integration

Develop with js sdk
Developing with react-sdk

Add dependency:

# yarn
yarn add white-web-sdk
# npm
npm install white-web-sdk --save

Code:

import "white-web-sdk/style/index.css";
import {WhiteWebSdk} from 'white-web-sdk';

Add dependency:

# yarn
yarn add white-react-sdk
# npm
npm install white-react-sdk --save

Code:

import * as React from "react";
import "white-web-sdk/style/index.css";
import {Room, RoomPhase, RoomWhiteboard, WhiteWebSdk} from "white-react-sdk";

2. script tag integration

<link rel="stylesheet" href="https://sdk.herewhite.com/white-web-sdk/2.7.1.css">
<script src="https://sdk.herewhite.com/white-web-sdk/2.7.1.js"></script>
<script>
    //Global variables WhiteWebSdk
    let sdk = new WhiteWebSdk();
</script>

TypeScript support

When using TypeScript, add the following configuration to the project tsconfig.json to get syntax tips.

{
    "compilerOptions": {
        "skipLibCheck": true,
        "paths": {
            "*" : ["node_modules/white-web-sdk/types/*"]
        }
    }
}

Recommended reading

  1. Open source
  2. Quick Start-Prerequisites
  3. Quick Start-Authentication
  4. Quick start-sdk
Last updated on 3/21/2020 by Tao Zeyu
← OutlineVersion history →
  • SDK
  • How to install
    • 1. Package management tool integration
    • 2. script tag integration
  • TypeScript support
  • Recommended reading
Netless
Let's interactive.
Product
ConsoleHomepageDemoGithub
Company
Join usServicePrivacy
Contact
support@netless.linkCommunity
Copyright © 2020 Netless