Skip to content

Commit

Permalink
Updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
icywind committed Mar 21, 2023
1 parent 91f1571 commit af54476
Showing 1 changed file with 18 additions and 19 deletions.
37 changes: 18 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
This document describes the contents of the Agora Unity SDK and usage of the sample prefabs and scripts.

## SDK Contents
The Agora Unity SDK is based on the official Agora Video SDK for Unity, version 3.7.0. In this special bundle, we excluded the iOS and Android native plugins and included a Relish native plugins. The MacOS and X86/X86_64 plugins stay for the Editor testing purpose.
The Agora Unity SDK is based on the official Agora Video SDK for Unity, version 4.1.0.

In additional to the original plugin contents, a ML2Demo folder is added for MagicLeap2 exclusively.

Expand All @@ -13,7 +13,7 @@ The ML2 Unity Editor and Android API requirements supersedes Agora's SDK require

## Using Agora with ML2
### QuickStart with Prefab
Please see AgoraEngine/ML2Demo. Simply drag and drop the AgoraController prefab into your scene and fill out the information from the Inspector. See the AgoraRtcController section for explanation on each field item.
Please see Agora_MagicLeap2_Plugin/AgoraEngine/ML2Support/ML2Demo. Simply drag and drop the AgoraController prefab into your scene and fill out the information from the Inspector. See the **AgoraRtcController** section for explanation on each field item.
![MagicLeap_Examples_](https://user-images.githubusercontent.com/1261195/180874215-b2f73267-44d1-4dc3-a69d-28691e828e3a.png)

### Reusable Components
Expand All @@ -29,38 +29,36 @@ For the MagicLeap2, Application that uses Agora for native RTC support must use
## AgoraRtcController

The class AgoraRtcController provides an example on how to integrate the components to support RTC functionality within the ML2. The script is attached to a prefab called "AgoraController". Developer may simply drag and drop the prefab to a scene to use it.
![agorartccontroller](https://user-images.githubusercontent.com/1261195/173485404-2d0f6980-3565-4eae-91db-525eca6562f0.png)

![AgoraMLDemo_-_MagicLeap_Examples_-_Android_-_Unity_2022_2_3f1__OpenGL_4_1_](https://user-images.githubusercontent.com/1261195/226511386-58acc860-ab4d-4218-964d-7058a025e0b0.jpg)

The following tables explains the fields that should be filed in the Inspector.

|Name|Description |Required|
|--|--|--|
| APP_ID |the AppID obtained from Agora developer console |Yes|
| Use Token | enable it if the AppID is created with certificate option on|Yes|
|CHANNEL_NAME| the name of the channel to join. Note that this also affects TokenClient|Yes|
| APP_ID |The AppID obtained from Agora developer console |Yes|
| Use Token | Enable it if the AppID is created with certificate option on|Yes|
|CHANNEL_NAME| The name of the channel to join. Note that this also affects TokenClient|Yes|
|Spawn Point| the position where the remote user's view should be rendered|No
|Log Text| UI Text that can be used for on screen output|No
|New User View|a RawImage that shows the new user's video| No
|Mute Local Button|A Button that enables/disables local user's audio|No
|Mute Remote Button|A Button that enables/disables remote user's audio|No
|Custom Video Capture |The Video Capture component, see **CustomVideoCapturer**|Yes
|Custom Audio Sink|The audio sink component, see **CustomAudioSinkPlayer**| Yes
|Custom Audio Capture|The audio capture component, see **CustomAudioCapturer**|Yes

|Custom Video Capture |The Video Capture component, see **CustomVideoCapturer.cs**|Yes
|Custom Audio Sink|The audio sink component, see **CustomAudioSinkPlayer.cs**| Yes
|Custom Audio Capture|The audio capture component, see **CustomAudioCapturer.cs**|Yes

## Tokens ##
Agora recommends the use of tokens to add security for the channel communications. Please see [the online documentation](https://docs.agora.io/en/Video/token_server?platform=Unity) for better understanding. In this SDK, refactored component **TokenClient** simplifies the steps. There should also be a corresponding Token Server established for working with the client. The sample Go-Lang project can be found in [this Agora project repo](https://github.com/AgoraIO-Community/agora-token-service). From this project, you should find a deployment button that will help you to deploy a Heroku server instance.
Lastly there is also a VideoRenderManager class that implements the view placement of user video streams. It is recommended to implement the IVideoRenderManager interface for your own applications design.

You will get to this screen on the server deployment portal: ![Screen Shot 1](https://user-images.githubusercontent.com/1261195/173483016-c6e9f572-2c3e-45b0-aa8f-4c2d06fc3597.png)
The page is self-explanatory on what information you will need to fill and how you get them.

After the deployment, you should get the service endpoint for use. See the sample output screen:
![Screen Shot 2](https://user-images.githubusercontent.com/1261195/173483542-a129faa9-207f-4f40-b8bc-d07809091323.png)
## Tokens ##
Agora recommends the use of tokens to add security for the channel communications. Please see [the online documentation](https://docs.agora.io/en/video-calling/develop/authentication-workflow?platform=unity) for better understanding. In this SDK, refactored component **TokenClient** simplifies the steps. There should also be a corresponding Token Server established for working with the client. The sample Go-Lang project can be found in [this Agora project repo](https://github.com/AgoraIO-Community/agora-token-service). From this project, you should find choice buttons that will help you to deploy to different server instances.

In the example above the endpoint is "https://agoraml2test.herokuapp.com/". Copy and paste that to field in the TokenClient component.
As an example a chosen endpoint is "https://agoraml2test.herokuapp.com/". Copy and paste that to field in the TokenClient component.

![Screen Shot 2022-06-13 at 7 56 43 PM](https://user-images.githubusercontent.com/1261195/173483945-e15c85cf-5532-4b31-8618-afcb40357720.png)

Note: for POC development, you could skip the token client/server implementation and focus on the RTC logic first. In *AgoraRtcController*, you may just set UseToken to false and use a test-mode AppID for the integration. See the*AgoraRtcController* section for reference.
[Recommendation] For POC development, you can just skip the token client/server implementation and focus on the RTC logic first. In *AgoraRtcController*, set UseToken to *false* and use a test-mode AppID for the integration. See the*AgoraRtcController* section for reference.


## Resources
Expand All @@ -70,4 +68,5 @@ Note: for POC development, you could skip the token client/server implementation

## License

MIT license.
MIT license.

0 comments on commit af54476

Please sign in to comment.