FluidExamples/audience-demo
Scott Norton ad48ea2655
Standardize examples to use @fluidframework/azure-local-service instead of tinylicious (#797)
Standardizes all examples to use @fluidframework/azure-local-service instead of tinylicious
2023-10-31 15:48:38 -04:00
..
public Update audience-demo (#782) 2023-09-12 15:19:14 -07:00
src Setup jest in examples (#585) 2022-11-16 14:29:02 -08:00
test Setup jest in examples (#585) 2022-11-16 14:29:02 -08:00
.env Setup jest in examples (#585) 2022-11-16 14:29:02 -08:00
.gitignore Revert "Manage examples using lerna (#567)" (#578) 2022-10-31 22:50:34 -07:00
.prettierignore Update audience-demo (#782) 2023-09-12 15:19:14 -07:00
README.md Standardize examples to use @fluidframework/azure-local-service instead of tinylicious (#797) 2023-10-31 15:48:38 -04:00
babel.config.json Setup jest in examples (#585) 2022-11-16 14:29:02 -08:00
jest-puppeteer.config.js Un-revert dependency updates (#787) 2023-09-15 09:16:36 -07:00
jest.config.js Un-revert dependency updates (#787) 2023-09-15 09:16:36 -07:00
package-lock.json Standardize examples to use @fluidframework/azure-local-service instead of tinylicious (#797) 2023-10-31 15:48:38 -04:00
package.json Standardize examples to use @fluidframework/azure-local-service instead of tinylicious (#797) 2023-10-31 15:48:38 -04:00
prettier.config.cjs Update versions in examples (#586) 2022-11-02 10:02:43 -07:00
webpack.config.js Update versions in examples (#586) 2022-11-02 10:02:43 -07:00

README.md

@fluid-example/audience-demo

This repository contains a simple React application which demonstrates Fluid Audiences. The React client will display all users connected to a Fluid Container.

Start the app locally

To run an Azure Client service locally, on the default values of localhost:7070, enter the following into a terminal window:

npx @fluidframework/azure-local-service

With the local service running in the background, we need to connect the application to it. Run the following commands in a new terminal window to start the app:

npm install
npm start

Navigate to localhost:3000 in the browser to view the app.

Demo workflow

The browser will initially display three user ID buttons as well as an optional container ID input field. Leave the container ID field blank to create a new container (with a random UUID for its ID) or input an existing container ID to join an existing container. For your first client, leave the container ID blank and choose a user ID as there are no collaborative sessions to join yet.

The browser will display boxes which represents current members in the audience. The box with the blue border represents the current user who is viewing the browser client while the boxes with the black border represents the other members who are connected to the container.

To add another user to the session, copy the container ID from the URL of the first user (everything after the # in the URL). Then create a new browser tab and navigate localhost:3000 again. Enter the container ID from the first session, and select a user ID to join as. As you open and close new tabs, the corresponding member boxes will appear.

Note that new boxes will only generate for each unique user. Joining a container in a new browser while selecting an existing user ID will increase the number of connections for that user.