openvidu/openvidu-components-angular/projects/openvidu-angular/README.md

85 lines
2.6 KiB
Markdown
Raw Normal View History

# openvidu-angular
2022-10-07 16:40:25 +02:00
OpenVidu Components for Angular.
2022-04-11 16:03:48 +02:00
[![License badge](https://img.shields.io/badge/license-Apache2-orange.svg)](http://www.apache.org/licenses/LICENSE-2.0)
[![OpenVidu Tests](https://github.com/OpenVidu/openvidu/actions/workflows/openvidu-ce-test.yml/badge.svg)](https://github.com/OpenVidu/openvidu/actions/workflows/openvidu-ce-test.yml)
2022-06-13 14:05:22 +02:00
[![OpenVidu Tests](https://github.com/OpenVidu/openvidu/actions/workflows/openvidu-components-angular-E2E.yml/badge.svg)](https://github.com/OpenVidu/openvidu/actions/workflows/openvidu-components-angular-E2E.yml)
2022-04-08 14:01:47 +02:00
[![Npm version](https://img.shields.io/npm/v/openvidu-angular?label=npm-version)](https://npmjs.org/package/openvidu-angular)
[![Npm downloads](https://img.shields.io/npm/dw/openvidu-angular?label=npm2-downloads)](https://npmjs.org/package/openvidu-angular)
**The easier way to build powerful OpenVidu videoconference frontend applications.**
2022-04-11 16:03:48 +02:00
## Requirements:
2022-05-30 12:10:28 +02:00
You will need NPM and Angular CLI to serve the Angular app. Check your installation with the following command:
2022-04-11 16:03:48 +02:00
```bash
npm -v
ng v
```
2022-04-18 12:50:20 +02:00
## How to install it
2022-04-11 16:03:48 +02:00
1. You need to install the openvidu-angular library in your Angular application:
```
2022-04-11 16:03:48 +02:00
npm install openvidu-angular
```
2022-09-19 10:39:20 +02:00
<br>
2. Also you need Angular Material. Check the [Angular Material documentation](https://material.angular.io/guide/getting-started) for installing it.
2022-04-11 16:03:48 +02:00
2022-04-18 12:50:20 +02:00
## Configure it
2022-05-30 12:10:28 +02:00
You need to import the openvidu-angular module in your `app.module.ts`:
```typescript
import { OpenViduAngularConfig, OpenViduAngularModule } from 'openvidu-angular';
2022-04-18 12:50:20 +02:00
import { environment } from 'src/environments/environment';
const config: OpenViduAngularConfig = {
production: environment.production
};
@NgModule({
imports: [
...
OpenViduAngularModule.forRoot(config)
]
})
2022-04-18 12:50:20 +02:00
```
2022-05-30 12:10:28 +02:00
You can also add the default styles in your `styles.scss` file:
2022-04-18 12:50:20 +02:00
```css
:root {
2022-10-07 16:40:25 +02:00
--ov-primary-color: #303030;
--ov-secondary-color: #3e3f3f;
--ov-tertiary-color: #598eff;
--ov-warn-color: #eb5144;
--ov-accent-color: #ffae35;
--ov-light-color: #e6e6e6;
2022-10-07 16:40:25 +02:00
--ov-logo-background-color: #3a3d3d;
2022-04-18 12:50:20 +02:00
2022-10-07 16:40:25 +02:00
--ov-text-color: #ffffff;
2022-04-18 12:50:20 +02:00
2022-10-07 16:40:25 +02:00
--ov-panel-text-color: #1d1d1d;
--ov-panel-background: #ffffff;
2022-04-18 12:50:20 +02:00
2022-10-07 16:40:25 +02:00
--ov-buttons-radius: 50%;
--ov-leave-button-radius: 10px;
--ov-video-radius: 5px;
--ov-panel-radius: 5px;
2022-04-18 12:50:20 +02:00
}
2022-10-07 16:40:25 +02:00
```
2023-01-26 10:48:32 +01:00
## How to use it
OpenVidu team has created a few tutorials to help you to start using OpenVidu Angular components. You can find them [here](https://docs.openvidu.io/en/stable/components/#where-to-start).
## openvidu-angular API
openvidu-angular API documentation is available [here](https://docs.openvidu.io/en/stable/api/openvidu-angular/).