TestLCIC
. If you have already created an application, select Existing.userid
) will be returned.classid
) will be returned.scene
, debugjs
, and debugcss
are optional parameters. Set them only if you need to customize your own UI. debugjs
and debugcss
are used for custom layout debugging and can only be accessed via localhost
or 127.0.0.1
. Do not use them in a production environment.lng
, location
, and layout
are also optional parameters. If you don't specify them, the default values will be used. layout
is valid only if the room subtype is "Document + Video" (videodoc
).Field | Type | Description | Remarks | Required | |
userid | string | The user ID. | Yes | ||
classid | string | The class ID. | Yes | | |
token | string | The backend authentication token. | Yes | ||
version | string | The SDK version. | Refer to the release notes to determine which version you want to integrate. | Yes | |
scene | string | The scene name. | No | ||
debugjs | string | The JavaScript link of the custom UI. | See "Custom UI" below. | No | |
debugcss | string | The CSS link of the custom UI. | See "Custom UI" below. | No | |
lng | string | The language, which is zh-CN by default. | Valid values: zh-CN , en-US . | No | |
location | boolean | Whether to report the geographic coordinates (latitude and longitude). | The default value is false , which means the geographic coordinates will not be reported. | No | |
layout | string | The layout. | Valid values: top , double , right , left , three . | No | |
tcic://class.qcloudclass.com/${version}/class.html?classid=${classId}&userid=${userId}&token=${token}
. When a user opens this page, your application will be launched from this page.// ElectronProtocolCheck See the github example for the file codeimport ElectronProtocolCheck from './ElectronProtocolCheck';// The id that needs to enter the classconst classId = 368507569;// The id of the user currently entering the classroomconst userId = "JIUzI1NiIsIn123456";// token It needs to be dynamically obtained from the background interface to prevent the login state from expiring and failingconst token = 'yJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2ODAwNzQwMjEsImlhdCI6MTY3OTQ2OTIyMSwiaXNzIjoibFpNQ2tvTjNkSGlnVmhhcXJkdFc0cU9JYWpleVh2RWwiLCJzY2hvb2xfaWQiOjM5MjMxOTMsInVzZXJfaWQiOiIyTG9XREU2aHhzOUNCNVhCczZHT1BnVXpweUgifQ.2wzh6eUC4llbbGhchGDOYbDrsdSdymfP3zjLLPjnOII';const version = 1.8.0; // See the release log for the specific version numberconst url = `tcic://class.qcloudclass.com/${version}/class.html?classid=${classId}&userid=${userId}&token=${token}`;console.log(`callClient->start: ${url}`);// Evoke the clientElectronProtocolCheck(url,successCallBack: (res) => {// call for successconsole.log('callClient->success! ');},failCallBack: (res) => {console.log('callClient->failed! ');// Did not call out, it is recommended to implement a pop-up window prompting download here// If the user clicks Download --> Reload window information, open the client.// If the user cancels the download or closes the popup. In the class where users try to experience the web/H5 version// You can also add a timeout pop-up window. Generally, if the user does not make a click operation within 2500ms, a modal click box can appear},unsupportedCallBack: () {// If the browser does not support it, you can use the web link to load});
teacherid
specified for the current classroom, then the current user is the teacher. If it is the same as the assistantid
for the current classroom, then the user is an assistant. Otherwise, the user is a student.Framework | Version |
Electron | 10.4.3+ |
Node | 10.14.1+ |
Python | 2.7.x |
npm install tcic-electron-sdk@1.8.7
const TCIC = require('tcic-electron-sdk')TCIC.initialize({classId: '368507569',userId: '123456',token: 'yJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2ODAwNzQwMjEsImlhdCI6MTY3OTQ2OTIyMSwiaXNzIjoibFpNQ2tvTjNkSGlnVmhhcXJkdFc0cU9JYWpleVh2RWwiLCJzY2hvb2xfaWQiOjM5MjMxOTMsInVzZXJfaWQiOiIyTG9XREU2aHhzOUNCNVhCczZHT1BnVXpweUgifQ.2wzh6eUC4llbbGhchGDOYbDrsdSdymfP3zjLLPjnOII',version: '1.8.0'})
joinClass
of the window
global variable to enter a class. If you have already implemented the class entry logic for your project using either of the two integration methods mentioned above, the following code sample shows you how to process your business logic to make your project compatible.const options = {classId: '368507569',userId: '123456',token: 'yJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2ODAwNzQwMjEsImlhdCI6MTY3OTQ2OTIyMSwiaXNzIjoibFpNQ2tvTjNkSGlnVmhhcXJkdFc0cU9JYWpleVh2RWwiLCJzY2hvb2xfaWQiOjM5MjMxOTMsInVzZXJfaWQiOiIyTG9XREU2aHhzOUNCNVhCczZHT1BnVXpweUgifQ.2wzh6eUC4llbbGhchGDOYbDrsdSdymfP3zjLLPjnOII',version: '1.8.0'};// Method for clicking to enter a classwindow.joinClass(options);// The following shows how to make your existing logic compatible.// Determine whether the method existsif (window.joinClass) {window.joinClass(options);} else {// Existing class entering logic}
closeWin
of the window
global variable to close the client.window.closeWin();
Field | Description | Required |
AppName | Your application name. | Yes |
Logo | Your application logo. Please provide a 256 x 256 image in ICO/PNG format. | Yes |
URL | Your URL. | Yes |
debugjs
and debugcss
(for debugging only) parameters to the above URL.// If you splice the URLconst url = `tcic://class.qcloudclass.com/${version}/class.html?classid=${classId}&userid=${userId}&token=${token}debugjs=%!s(<nil>)&debugcss=%!s(<nil>)`;// If you integrate the SDK into your projectTCIC.initialize({classId: '368507569',userId: '123456',token: 'yJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2ODAwNzQwMjEsImlhdCI6MTY3OTQ2OTIyMSwiaXNzIjoibFpNQ2tvTjNkSGlnVmhhcXJkdFc0cU9JYWpleVh2RWwiLCJzY2hvb2xfaWQiOjM5MjMxOTMsInVzZXJfaWQiOiIyTG9XREU2aHhzOUNCNVhCczZHT1BnVXpweUgifQ.2wzh6eUC4llbbGhchGDOYbDrsdSdymfP3zjLLPjnOII',version: '1.7.2',debugjs: '%!s(<nil>)',debugcss: '%!s(<nil>)',})// If you use our integration serviceconst options = {classId: '368507569',userId: '123456',token: 'yJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2ODAwNzQwMjEsImlhdCI6MTY3OTQ2OTIyMSwiaXNzIjoibFpNQ2tvTjNkSGlnVmhhcXJkdFc0cU9JYWpleVh2RWwiLCJzY2hvb2xfaWQiOjM5MjMxOTMsInVzZXJfaWQiOiIyTG9XREU2aHhzOUNCNVhCczZHT1BnVXpweUgifQ.2wzh6eUC4llbbGhchGDOYbDrsdSdymfP3zjLLPjnOII',version: '1.8.0',debugjs: '%!s(<nil>)',debugcss: '%!s(<nil>)',};window.joinClass(options);
scene
parameter to the URL or pass in the parameter to load the layout of the corresponding scene. This is useful if you have different types of classes with different layout designs.
Was this page helpful?