diff --git a/dailyjs/basic-call/README.md b/dailyjs/basic-call/README.md index 037ae34..3ff3e4b 100644 --- a/dailyjs/basic-call/README.md +++ b/dailyjs/basic-call/README.md @@ -18,7 +18,7 @@ Please note: this demo is not currently mobile optimised ``` # set both DAILY_API_KEY and DAILY_DOMAIN -mv env.example env.local +mv env.example .env.local # from project root... yarn @@ -43,9 +43,3 @@ Abstraction hook that manages Daily call state and error handling **[ParticipantProvider.js](../shared/contexts/ParticipantProvider.js)** Manages participant state and abstracts common selectors / derived data - -## Deploy your own - -Deploy the example using Vercel - -[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/git/external?repository-url=https%3A%2F%2Fgithub.com%2Fdaily-demos%2Fexamples%2Ftree%2Fmain%2Fdailyjs%2Fbasic-call&env=DAILY_DOMAIN,DAILY_API_KEY&project-name=dailyjs-basic-call&demo-title=Daily%20Basic%20Call%20Demo) diff --git a/dailyjs/text-chat/README.md b/dailyjs/text-chat/README.md new file mode 100644 index 0000000..e3d56cb --- /dev/null +++ b/dailyjs/text-chat/README.md @@ -0,0 +1,29 @@ +# Text Chat + +![Text Chat](./image.png) + +## What does this demo do? + +- Use ![sendAppMessage](https://docs.daily.co/reference#%EF%B8%8F-sendappmessage) to send messages +- Listen for incoming messages using the call object `app-message` event +- Extend the basic call demo with a chat provider and aside + +Please note: this demo is not currently mobile optimised + +### Getting started + +``` +# set both DAILY_API_KEY and DAILY_DOMAIN +mv env.example .env.local + +yarn +yarn workspace @dailyjs/text-chat dev +``` + +## How does this example work? + +In this example we extend the ![basic call demo](../basic-call) with the ability to send chat messages. + +We pass a custom tray object, a custom app object (wrapping the original in a new `ChatProvider`) as well as add our `ChatAside` panel. We also symlink both the `public` and `pages/api` folders from the basic call. + +In a real world use case you would likely want to implement serverside logic so that participants joining a call can retrieve previously sent messages. This round trip could be done inside of the Chat context. diff --git a/dailyjs/text-chat/image.png b/dailyjs/text-chat/image.png new file mode 100644 index 0000000..8f4995c Binary files /dev/null and b/dailyjs/text-chat/image.png differ