1. The plug-in cannot be used

  • Check the console prompt. Check whether the following prompt exists

    [JS FrameworkThe currently running base does not contain native plug-ins.AR-RtcModule], configure the plug-in in manifest and recreate the custom runtime base that includes the native plug-inCopy the code
  • The standard operating base is used

    • Custom running pedestals need to be made
    • Runtime select custom base to run (HBuilder default standard to run base)
  • Plugins only support APP;

2. Scenario Usage

  • Audio and video call related

    AnyRTC audio and video SDK plug-in

    Document address: UNIapp RTC API

  • Call invitation and real-time messages

    AnyRTC real-time message SDK plug-in

    Document address: UNIAPP RTM API

3. Combine the USER UID with its own service

  • User uid:
    • Must be a string
    • Identify the user, unique
    • Cannot be set to Chinese
    • A string of up to 64 bytes, ranging from 26 lowercase letters a to Z; 26 capital letters A-Z; 10 numbers 0-9; Space.” !” , “#”, “$”,” % “, “&”, “(“,”) “, “+”, “-“, “:”, “;” “, “<“, “=”, “, “>”, “? , the “@”, “/”, “”,” ^ “, “*”, “{}”, “”,” | “, “-“, “, “; Etc.)
    • You can use your own service ID, but it must match the user UID

4. Channel room channelId combines with its own services

Consistent with UID requirements;

5. Is related to the token

It is recommended that appID not be enabled during project debugging. When token verification is enabled, this parameter is mandatory when adding channels

6. Add a channel and set the UID or channelId

Set before joining the room

rtcModule.joinChannel({
  		"token": when you start the token check fill in the string (required) | |' '."channelId": to set (string) | |' '."uid": to set (string) | |' ',},(res) = > {
  		console.log('RTC joinChannel method call ', (res.code === 0 ? 'success' : 'Failure:') + res);
  	});
Copy the code

7. The function is valid for the first time, but an error occurs during the second operation

  • Create the instance repeatedly (mostly during debugging) and call it multiple timesrtmModule.createInstance
    • Restart the application every time
    • After the function is complete, the corresponding instance is destroyed

8. Ios and Android flash Back unexpectedly

* rtcModule. JoinChannel parameter uid is not a string…

9. No pictures, no sound

  • Check whether the mobile phone permission is enabled

  • The audio and video pages must be NVUE pages

  • Local Video rendering:

    <AR-CanvasView ref="location" style="flex: 1;" />
    Copy the code
    • You must get the video container
    • Call the corresponding method
    This $refs. Location. SetupLocalVideo ({" renderMode ": 1," channelId ": in the same room," uid ": user's uid," mirrorMode ": 0}, (res) => {console.log(' render video ', res); }); / / this local preview. $refs. Location. StartPreview ((res) = > {the console. The log (' local preview, res); })Copy the code
  • The remote video rendering: 1. Through the remote video frame callback onFirstRemoteVideoDecoded 2. The remote video container is then displayed

     <AR-CanvasView ref="remote" style="flex: 1;" />
    Copy the code

    3. Corresponding method (Remote video container must be obtained)

    This $refs. Remote. SetupRemoteVideo ({" renderMode ": 1," channelId ": in the same room," uid ": the distal uid," mirrorMode ": 0}, (res) => {console.log(' render remote video ', res); })Copy the code

10. Uniapp obtains the network status of the other party during communication

Plug-in can only obtain the corresponding user status through anyRTC real-time message SDK plug-in: Online/offline If you need to obtain more detailed network status: Uni. OnNetworkStatusChange access network through real-time message SDK plug-in, sends a message to the other party Receipt of each other, the network information back to the inquirers

11. Multi-person video presentation

Each user has his or her own video container that must be retrieved when rendering a video

12. Whether it can be converted to multiple terminals

  • Using plug-ins only supports APPS
  • If you need to convert into a small program, you can useWeb SDKConversion (using the SDK corresponding to the applet is recommended)