Netless

Netless

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

›FAQ

FAQ

  • Authentication information
  • Add storage driver
  • Prefetch
  • Playback speed
  • Debug center
  • Instructions
  • Network exception handling
  • Aliyun OSS config
  • How to use docs-transform
  • How to use the adaptation screen
  • Debug help
  • Whiteboard playback principle
  • Firewall
  • How to insert ppt, switch ppt
  • Log
  • Dosage
  • Large class

Network exception handling

The long connection service has higher requirements on the network quality. When using the netless whiteboard, you must deal with network abnormal conditions.

Callback provided by netless when the network is abnormal

const room = whiteWebSdk.joinRoom({
                uuid: uuid,
                roomToken: roomToken,
                {
                    onPhaseChanged: phase => {
                        console.log(`room ${"uuid"} changed: ${phase}`);
                        // When the connection status of the whiteboard changes, the phase may change to the following states
                        // Connecting = "connecting",
                        // Connected = "connected",
                        // Reconnecting = "reconnecting",
                        // Disconnecting = "disconnecting",
                        // Disconnected = "disconnected",
                    },
                });

Principles for handling network exceptions

  1. The member methods and member properties of room cannot be operated in the disconnected state.

    phase === "connected" // It is the state that the room is connected to the server, and the other four states must be stationary.
    
  2. Code case

        // This member method cannot be called
        room.setViewMode(ViewMode.Broadcaster);
        // This member property cannot be assigned
        room.disableCameraTransform = false;
    
  3. Error cases

    error

Last updated on 2/18/2020 by 伍双
← InstructionsAliyun OSS config →
  • Callback provided by netless when the network is abnormal
  • Principles for handling network exceptions
Netless
Let's interactive.
Product
ConsoleHomepageDemoGithub
Company
Join usServicePrivacy
Contact
support@netless.linkCommunity
Copyright © 2020 Netless