Coder Social home page Coder Social logo

gitsnglory / communication-services-web-calling-hero Goto Github PK

View Code? Open in Web Editor NEW

This project forked from azure-samples/communication-services-web-calling-hero

0.0 1.0 0.0 1.26 MB

Hero sample to showcase web calling capabilities for Azure Communication Services

License: MIT License

JavaScript 0.33% HTML 0.45% TypeScript 94.35% CSS 0.40% C# 4.47%

communication-services-web-calling-hero's Introduction

page_type languages products
sample
javascript
nodejs
csharp
azure
azure-communication-services

Deploy to Azure

Group Calling Sample

This is a sample application to show how the Azure Communication Services Calling Web SDK can be used to build a group calling experience. The client-side application is a React based user interface which uses Redux for handling complex state while leveraging Microsoft Fluent UI. Powering this front-end is a C# web application powered by ASP.NET Core to connect this application with Azure Communication Services.

A separate branch with features currently in public preview is available. Features include: Teams Interop which in public preview and uses beta SDKs that are not meant for production use. Please use the main branch sample for any production scenarios.

Additional documentation for this sample can be found on Microsoft Docs.

Before contributing to this sample, please read our contribution guidelines.

Homepage

Prerequisites

Code structure

  • ./Calling/ClientApp: frontend client
    • ./Calling/ClientApp/src
      • ./Calling/ClientApp/src/Components : React components to help build the client app calling experience
      • ./Calling/ClientApp/src/Containers : Connects the redux functionality to the React components
      • ./Calling/ClientApp/src/Core : Containers a redux wrapper around the Azure Communication Services Web Calling SDK
    • ./ClientApp/src/index.js : Entry point for the client app
  • ./Calling/Controllers : Server app core logic for client app to get a token to use with the Azure Communication Services Web Calling SDK
  • ./Calling/Program.cs : Entry point for the server app program logic
  • ./Calling/Startup.cs : Entry point for the server app startup logic

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.
  2. git clone https://github.com/Azure-Samples/communication-services-web-calling-hero.git
  3. Get the Connection String from the Azure portal. For more information on connection strings, see Create an Azure Communication Resources
  4. Once you get the Connection String, add the connection string to the Calling/appsetting.json file found under the Calling folder. Input your connection string in the variable: ResourceConnectionString.

Locally deploying the sample app

  1. Go to Calling folder and open Calling.csproj solution in Visual Studio
  2. Run Calling project. The browser will open at localhost:5001

Troubleshooting

  1. Solution doesn't build, it throws errors during NPM installation/build

    Clean/rebuild the C# solution

  2. The app shows an "Unsupported browser" screen but I am on a supported browser.

    If your app is being served over a hostname other then localhost, you must serve traffic over https and not http.

Publish to Azure

  1. Right click the Calling project and select Publish.
  2. Create a new publish profile and select your app name, Azure subscription, resource group and etc.
  3. Before publish, add your connection string with Edit App Service Settings, and fill in ResourceConnectionString as key and connection string (copy from appsettings.json) as value

Note: While you may use http://localhost for local testing, the sample when deployed will only work when served over https. The SDK does not support http.

Building off of the sample

If you would like to build off of this sample to add calling capabilities to your own awesome application, keep a few things in mind:

  • The sample serves a Single Page Application. This has a few implications.
    • By default, the served app cannot be embedded in another frame (e.g. as a web widget). See ./Calling/Startup.cs for details on how to enable embedding.
    • By default, the backend disables Cross-Origin Resource Sharing (CORS). If you'd like to serve the backend APIs from a different domain than the static content, you must enable (restricted) CORS. This can be done by configuring a middleware in the backend in ./Calling/Startup.cs, or by configuring your server framework to modify HTTP response headers.

Additional Reading

communication-services-web-calling-hero's People

Contributors

alex-kwan avatar alkwa-msft avatar armansabaa avatar communication-ui-bot avatar ddematheu2 avatar dependabot[bot] avatar jamesburnside avatar microsoft-github-operations[bot] avatar microsoftopensource avatar porternan avatar prprabhu-ms avatar reedruddy avatar salujamanish avatar timheuer avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.