Recently, I have a project to build an application of live online classroom. After the rapid development in the past few years, there are also many platforms in the field of live online education that provide related video and audio services. Compared with video and audio services in other industries, the hard requirements of live online education are mainly as follows:

  • Low delay: In the process of live teaching, the interaction between teachers and students usually involves one-to-one or one-to-many audio and video connections. Due to the particularity of the education scene, the requirements for low delay are extremely strict. In particular, many cases involve special situations such as transnational or for students in remote areas.
  • Smooth and clear audio and video: in the process of live broadcast, there will be no lag, picture shake, sound and picture out of sync, blurred picture and so on.
  • Teaching functions: such as whiteboard, timely questions and answers, Pointers and so on
  • Playback function: enables students to review the course content in time and locate specific knowledge points in the class.

Project structures,

Agora has two versions of eEducation Demo, web version demo (Eeducation-with-Web) based on Express (Server) + React (Client), Electron(Agora e-Education Demo with Electron) is based on Express (Room Control + Recording) + Electron(Client). I really know very little about Electron. Besides, the project is also the main web and wechat small program at present, so directly pass Electron to choose the Web version.

Setting up an environment: Server: Ubuntu 18.04 + NodeJS 8.10.0 Browser: Chorme 74.0.3729

  1. Register your voice account, create a project, and get your APP ID. These are all routine procedures, nothing good to explain, but the voice network is too enthusiastic, the next day after the registration customer service call back visit. Technical support also added wechat to ask if they need any help, the service is very enthusiastic.

  2. Git clone https://github.com/AgoraIO-Usecase/eEducation-with-Web.git, the project to the local.

  3. Go to the server and client directories and run the NPM install command to install the dependencies. Fatal Error: event2/buffer.h: No such file or dicectory Well, the Libevenet library is missing. This library is an event-based network library and is one of the required libraries for WeBRTC. It has the following characteristics and advantages:

  • I/O events, signals, and timers are unified.
  • Portable, cross-platform support for a variety of I/O multiplexing technologies, such as epoll, poll, dev/poll, SELECT and Kqueue.
  • Concurrency support to avoid race conditions;
  • High performance, event-driven;
  • Lightweight, focused on the web.
  1. Libevent can be downloaded and compiled by yourself. It is easy to install libevent from github.
  2. Then continue tonpm installAnd continue to report the errorfatal error: uuid/uuid.h: No such file or dicectory, it issudo apt-get install uuid-dev.
  3. Continue to report errorsfatal error: IAgoraService.h: No such file or dicectoryThe name is a header file written by Agora itself. Agora-npm-rtm package is installed in npm-rtm package.
  4. findagora-npm-rtm githubREADME, which uses Agora RTM Linux SDK (C++) as a plugin for nodejs. Need to benode-gypSupport. I don’t know what it’s for. Quickly learned a wave. Node-gyp is primarily used to compile native C++ modules.sudo npm install -g node-gypThe installation is complete.
  5. I looked it up and found it under another accountRTM githubThere is a file under Linux RTM C++ SDK. Download, follow the prompts to decompress to the directory, or the same error. I’m really freaked out about this operation.
  6. First you have to copylibagora_rtm_sdk.so/usr/lib/I didn’t notice it was in the folderdocker-compose.ymlDockerfileTwo files. Open theDockerfileIt is found that there is an installationuuid-devlibeventAnd will belibagora_rtm_sdk.soInto the/usr/lib/Table of contents, but not mentionedincludeDirectory containing three header files. I copied these three files directly to/usr/include/Directory. No longer tofatal error: IAgoraService.h: No such file or dicectoryHowever, the following error is the one I can’t solve:error: 'agora::rtm::CHANNEL_MESSAGE_ERR_CODE' has not been declared.

server
README.md
npm start
routes/App.tsx
REACT_AOO_AGORA_APPID
export REACT_AOO_AGORA_APPID=MY_AGORA_APP_ID

conclusion

  1. The service is great in terms of people following up after registration.
  2. The document and demo are quite comprehensive, but the browser plug-in is missing now.
  3. The demo deployment document needs to be optimized. References to libraries or related materials are best linked, as they are learning opportunities.

Agora SDK experience essay contest essay | the nuggets technology, the campaign is underway