JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 59
  • Score
    100M100P100Q69322F
  • License MIT

Package Exports

  • @netless/cursor-tool

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@netless/cursor-tool) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Cursor Tool

实时房间装载

    const cursorAdapter = new CursorTool(); // Step1:初始化(必选)
    const room = await whiteWebSdk.joinRoom({
            uuid: uuid,
            roomToken: roomToken,
            cursorAdapter: cursorAdapter, // Step2:载入(必选)
            userPayload: {
                userId: userId,
                cursorName: cursorName, // Step4:cursorName 显示名称
                avatar: "url", // Step5:avatar 显示头像地址
            },
            ...
        },
        {
            onPhaseChanged: phase => {
                this.setState({phase: phase});
            },
            ...
        });
    cursorAdapter.setRoom(room); // Step3:装载 room 实例(必选)

回放房间装载

        const cursorAdapter = new CursorTool(); // Step1:初始化(必选)
        const player = await whiteWebSdk.replayRoom(
            {
                room: uuid,
                roomToken: roomToken,
                cursorAdapter: cursorAdapter, // Step2:载入(必选)
                ...
            }, {
                onPhaseChanged: phase => {
                    this.setState({phase: phase});
                },
                ...
            });
        cursorAdapter.setPlayer(player); // Step3:装载 player 实例(必选)