зеркало из
1
0
Форкнуть 0
communication-ui-library/samples/CallWithChat
edwardlee-msft b40b11601e
Update lock files and minimum typescript version (#5399)
* Update lock files

* Update node types

* Update node types

* Update minimum supported typescript version

* Update minimun typescript version and resolve styling issue with update packages for controlbar button

* Change files

* remove conflicting height
2024-11-07 11:34:38 -08:00
..
public
src
.babelrc.js
.eslintignore
.eslintrc.js
CHANGELOG.json
LICENSE
README.md
package.json
tsconfig.json
tsconfig.preprocess.json
webpack.config.js

README.md

Call with Chat Sample

🚧 Be advised we are currently working on polishing the samples in this repo. 🚧

Overview

This is a sample application to show how we can use the @azure/communication-react package to build a Call with chat experience. The client-side application is a React based user interface. Alongside this front-end is a NodeJS web application powered by ExpressJS that performs functionality like minting new user tokens for each call participant.

Prerequisites

Before running the sample for the first time

  1. Open an instance of PowerShell, Windows Terminal, Command Prompt, or equivalent, and navigate to the directory that you'd like to clone the sample to and clone the repo.

    git clone https://github.com/Azure/communication-ui-library.git
    
  2. Get the Connection String from the Azure portal. For more information on connection strings, see Create an Azure Communication Resources

  3. Once you get the Connection String, add the connection string to the samples/Server/appsetting.json file. Input your connection string in the variable: ResourceConnectionString.

  4. Once you get the Endpoint, add the endpoint string to the samples/Server/appsetting.json file. Input your connection string in the variable: EndpointUrl.

  5. Get the identity from the Azure portal. Click on Identities & User Access Tokens in Azure portal. Generate a user with Chat scope.

  6. Once you get the identity string, add the identity string to the samples/Server/appsetting.json file. Input your identity string in the variable: AdminUserId. This is the server user to add new users to the chat thread.

Local run

  1. Install dependencies

    npm i -g @microsoft/rush
    rush install
    
  2. Start the call with chat app

    cd samples/CallWithChat
    rushx start
    

    This will open a client server on port 3000 that serves the website files, and an api server on port 8080 that performs functionality like minting tokens for call participants.

Additional Reading