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

77 lines
1.9 KiB
Markdown
Raw Normal View History

# openvidu-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-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
```
2. Also you need Angular Material:
```
ng add @angular/material
```
2022-04-18 12:50:20 +02:00
## Configure it
2022-04-11 16:03:48 +02:00
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 {
--ov-primary-color: #303030;
--ov-secondary-color: #3e3f3f;
--ov-tertiary-color: #598eff;
--ov-warn-color: #EB5144;
--ov-accent-color: #ffae35;
--ov-light-color: #e6e6e6;
--ov-logo-background-color: #3a3d3d;
2022-04-18 12:50:20 +02:00
--ov-text-color: #ffffff;
--ov-panel-text-color: #1d1d1d;
--ov-panel-background: #ffffff;
--ov-buttons-radius: 50%;
--ov-leave-button-radius: 10px;
--ov-video-radius: 5px;
--ov-panel-radius: 5px;
}
2022-04-08 14:01:47 +02:00
```