mytaverse-agora-module
v0.3.33
Published
Video/Voice Chat Agora
Downloads
27
Keywords
Readme
Mytaverse Agora Module
Especially for reactJs
This module is especially a react hook which contains the actions on the video/voice chat such as toggle voice, channel change, share screen etc. Among the actions we have the following:
- Active Proxy.
- Change Device Input/Output
- Disconnect
- Init
- Region Change
- Share Camera
- Shara Screen
- Subscribe
- Toggle Voice
- Unsubscribe
- Change Role
Arquirectura
We can see diagrams of the architecture of this module in the following link: https://miro.com/app/board/uXjVOlm16oo=/
Terminology
- ActionsHook: It is the react hook that contains the main functions to call the module's actions.
- Actions: The actions are each of the events that the user can carry out with respect to the video/voice chat, either through an interface event or a logical event of the module.
- Context: Is all the data where the business rules operate (connection status, current channel, user role, etc) and all the audio/video resources for the agora sdk (tracks, client agora, listeners agora , etc)
- Worker: It is an entity in charge of monitoring the list of actions to be done, this worker removes the action from a queue and sends it to the action's own manager.
- Manager: Is the entity that contains both the invocation of the business rules, as well as the call to the operations of the agora sdk such as join, publish, leave, etc. this manager is the one who alters the state of an action.
- Rules: These are the definition of the business rules, for example the pertinent validations of the module context, such as validation of the connection status, of the channel where the user is connected, of the user role, etc.
- Operations: Represent the logic that interacts with the agora sdk directly, here we will find the implementation of the use of the agora sdk such as to join a channel, to mute an audio or video track, or to change the role. etc.
- Logger: It is the entity that is in charge of processing the output of the actions, this entity can define engines, by default the available engines are console and view.
Tech
Main modules/module dependencies:
- [Redux Js] - @reduxjs/toolkit
- [Agora Web SDK] - agora-rtc-sdk-ng
- [Validatorjs] - validatorjs
Installation
This module requires Node.js v10+ to run.
For production environments...
npm i mytaverse-agora-module --save
For development environments...
npm i mytaverse-agora-module --save-dev
npm install [email protected] --save --legacy-peer-deps
Building for source
For production release:
npx -typescript tsc
License
MIT