userid
) information.token
information.classid
) information.scene
, debugjs
, and debugcss
are optional and only need to be set when you customize the UI. For more information, refer to Custom UI Integration. debugjs
and debugcss
are used only for debugging custom layouts and components, and are only accessible through addresses localhost
or 127.0.0.1
. Do not use these parameters in the release phase.lng
, location
, and layout
are also optional parameters. You can determine whether to enter these parameters based on actual business needs. If not, they will use the default values. The layout
parameter is only effective when the classroom layout is set to video + document layout (videodoc
).Field | Type | Meaning | Remarks | Mandatory | |
userid | String | Username | Yes | | |
classid | String | Classroom ID | Yes | | |
token | String | Backend authentication parameters | Yes | | |
version | String | Version number of the classroom | (This parameter will be officially deprecated from tcic-electron-sdk version 1.9.0) The corresponding version can be selected from the release logs. | No | |
scene | String | Scene name | It is used to distinguish different custom layouts. It is configured through the SetAppCustomContent interface. | No | |
role | String | Role for entering the classroom, default is empty | Optional parameter supervisor (Patrol Classes/Content Review) is only available to registered users who can patrol classes within the application. | No | |
debugjs | String | JS link of the custom defined UI | It is obtained through the custom defined UI integration. | No | |
debugcss | String | CSS link of the custom defined UI | It is obtained through the custom defined UI integration. | No | |
lng | String | Language parameter, which is zh-CN by default | Currently zh-CN and en-US are supported. | No | |
location | Boolean | Whether to report geographical location information | It is set to false by default, indicating no reporting. | No | |
layout | String | Page layout | It is set to top (top) by default. Currently, it supports double row layout (double), right layout (right), left layout (left), and three-part layout (three). | No | |
tcic://class.qcloudclass.com/latest/class.html?classid=${classId}&userid=${userId}&token=${token}
in a browser, the browser will request to open the LCIC-Demo Client.tcic://class.qcloudclass.com/latest/class.html?classid=${classId}&userid=${userId}&token=${token}
, the client application can be invoked.// For ElectronProtocolCheck file code, see the GitHub exampleimport ElectronProtocolCheck from './ElectronProtocolCheck';// The ID required to enter the classroomconst classId = 368507569;// The ID of the user currently entering the classroomconst userId = "JIUzI1NiIsIn123456";// The token needs to be dynamically obtained from the backend interface to prevent login state expiration and invalidationconst token = 'yJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2ODAwNzQwMjEsImlhdCI6MTY3OTQ2OTIyMSwiaXNzIjoibFpNQ2tvTjNkSGlnVmhhcXJkdFc0cU9JYWpleVh2RWwiLCJzY2hvb2xfaWQiOjM5MjMxOTMsInVzZXJfaWQiOiIyTG9XREU2aHhzOUNCNVhCczZHT1BnVXpweUgifQ.2wzh6eUC4llbbGhchGDOYbDrsdSdymfP3zjLLPjnOII';const url = `tcic://class.qcloudclass.com/latest/class.html?classid=${classId}&userid=${userId}&token=${token}`;console.log(`callClient->start: ${url}`);// Invoke clientElectronProtocolCheck(url,successCallBack: (res) => {// Call successfulconsole.log('callClient->success! ');},failCallBack: (res) => {console.log('callClient->failed! ');// If the call fails, it is recommended to pop up a window that suggests the download here.// If the user clicks to download --> Change the pop-up window information, and open the client.// If the user cancels the download or closes the pop-up window, let the user try the Web/H5 version of the classroom.// You can also add a timeout pop-up window. Generally, if the user does not click within 2500 ms, a modal click box can be displayed.},unsupportedCallBack: () {// For browsers that are not supported, you can use a web link to load.});
userid
matches the teacherid
specified for the current classroom, the current user is a teacher. If it matches the current classroom's assistant ID (assistantid
), the user is an assistant. Otherwise, the user is a student.Development framework | Version |
Electron | 10.4.3+ |
Node | 10.14.1+ |
npm install tcic-electron-sdk@latest
const TCIC = require('tcic-electron-sdk')TCIC.initialize({classId: '368507569',userId: '123456',token: 'yJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2ODAwNzQwMjEsImlhdCI6MTY3OTQ2OTIyMSwiaXNzIjoibFpNQ2tvTjNkSGlnVmhhcXJkdFc0cU9JYWpleVh2RWwiLCJzY2hvb2xfaWQiOjM5MjMxOTMsInVzZXJfaWQiOiIyTG9XREU2aHhzOUNCNVhCczZHT1BnVXpweUgifQ.2wzh6eUC4llbbGhchGDOYbDrsdSdymfP3zjLLPjnOII',})
window
global variable's joinClass
method on the business side. If the course entry logic has been implemented through URL or SDK integration on the business side, see the following example for compatibility.const options = {classId: '368507569',userId: '123456',token: 'yJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2ODAwNzQwMjEsImlhdCI6MTY3OTQ2OTIyMSwiaXNzIjoibFpNQ2tvTjNkSGlnVmhhcXJkdFc0cU9JYWpleVh2RWwiLCJzY2hvb2xfaWQiOjM5MjMxOTMsInVzZXJfaWQiOiIyTG9XREU2aHhzOUNCNVhCczZHT1BnVXpweUgifQ.2wzh6eUC4llbbGhchGDOYbDrsdSdymfP3zjLLPjnOII',};// Logic method for clicking to enter the classroomwindow.joinClass(options);// How to maintain compatibility with the existing logic? Refer to the code logic below.// Check whether the method exists.if (window.joinClass) {window.joinClass(options);} else {// Original logic for entering the classroom}
window
global variable's closeWin
method.window.closeWin();
Field | Meaning | Mandatory |
AppName | App name, such as XX Classroom | Yes |
Logo | Application Logo, which should be an ico/png image with specifications of 256x256 | Yes |
URL | Business URL | Yes |
debugjs
and debugcss
parameters to the above link (these parameters are for debugging purposes only), as shown in the following code:// URL Concatenation Methodconst url = `tcic://class.qcloudclass.com/latest/class.html?classid=${classId}&userid=${userId}&token=${token}debugjs=%!s(<nil>)&debugcss=%!s(<nil>)`;// SDK Integration MethodTCIC.initialize({classId: '368507569',userId: '123456',token: 'yJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2ODAwNzQwMjEsImlhdCI6MTY3OTQ2OTIyMSwiaXNzIjoibFpNQ2tvTjNkSGlnVmhhcXJkdFc0cU9JYWpleVh2RWwiLCJzY2hvb2xfaWQiOjM5MjMxOTMsInVzZXJfaWQiOiIyTG9XREU2aHhzOUNCNVhCczZHT1BnVXpweUgifQ.2wzh6eUC4llbbGhchGDOYbDrsdSdymfP3zjLLPjnOII',debugjs: '%!s(<nil>)',debugcss: '%!s(<nil>)',})// Pipeline Packaging Methodconst options = {classId: '368507569',userId: '123456',token: 'yJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2ODAwNzQwMjEsImlhdCI6MTY3OTQ2OTIyMSwiaXNzIjoibFpNQ2tvTjNkSGlnVmhhcXJkdFc0cU9JYWpleVh2RWwiLCJzY2hvb2xfaWQiOjM5MjMxOTMsInVzZXJfaWQiOiIyTG9XREU2aHhzOUNCNVhCczZHT1BnVXpweUgifQ.2wzh6eUC4llbbGhchGDOYbDrsdSdymfP3zjLLPjnOII',debugjs: '%!s(<nil>)',debugcss: '%!s(<nil>)',};window.joinClass(options);
scene
parameter to the URL or adding it to the corresponding entry when you enter the classroom, the layout and components of the specific scene will be loaded. When dealing with multiple class types and layouts, you can switch scenes using this parameter on the business side.
Was this page helpful?