Skip to content

simple introduction on how to use lark sr websdk to create a cloud rendering client

Notifications You must be signed in to change notification settings

ParaverseTechnology/lark_sr_websdk_demos

Repository files navigation

LarkSR WebClient SDK


English 中文


Develop webclient for LarkSR cloudrending or LarkSR VR monitor client. Free design UI and define operate.

For most common scene LarkSR default webclient, which is also developer with SDK same UI ui-mobile-vue, access cloudrending 3D app without develop.

Links:

Paraverse

LarkSR Doc

Experience

SDK include:

  • LarkSR restful request.
  • CloudRending Video.
  • Handle input, keyboard, gamepad, touchscreen.
  • Scale mode.
  • Fullscreen mode.
  • Landscap mode.

Notice

SDK V3.2.30 only support server version above V3.2.3.1 Old verion SDK Demo V3.2.314 server and datachannel above 3.2.5.1

Quick Start

install

  1. npm
npm i larksr_websdk
  1. plain html
<script src="larksr-web-sdk.min.js"></script>

Use

Import websdk with plain html SDK under global object larksr_websdk.

Connect cloud resource and all event access with new LarkSR object.

SDK default config html 100% height 100% width viewport. Auto handle input.

SDK mainly contain loading page and cloud video page no other ui.efore start:

  1. Lark SR server address, exp:http://222.128.6.137:8181/
  2. SDK auth code,connect [email protected]
  3. App id from Lark SR admin server applist.
var client = new LarkSR({ 
    // root html element
    // WARNING not document.documentElement
    rootElement: document.getElementById('container'),
    // Sever address
    serverAddress: "Lark Sever address",
    // SDK ID or set by call initSDKAuthCode
    // authCode: 'your SDK ID',
});

Set sdk auth code.

client.initSDKAuthCode('Your SDK ID')
.then(() => {
    // start connect;
    client.connect({
        // LarkSR cloud appid from LarkSR admin server.
        // doc
        // https://www.pingxingyun.com/online/api3_2.html?id=476
        appliId: "appid from LarkSR admin"
    })
    .then(() => {
        console.log('enter success');
    })
    .catch((e) => {
        console.error(e);
    }); 
})
.catch((e) => {
    console.error(e);
});
// ...
// close connection.
// client.close();
// release DOM element.
// client.destroy();

DEMO List

  1. sample-plain-html
  2. sample-react
  3. sample-vue
  4. sample-vue3
  5. ui-mobile-vue default webclient ui.
  6. AI Voice to cloud demo

Doc

LarkSR WebClient SDK

About

simple introduction on how to use lark sr websdk to create a cloud rendering client

Resources

Stars

Watchers

Forks

Packages

No packages published