2022-01-20 09:58:12 +01:00
|
|
|
# openvidu-angular
|
2022-01-19 17:24:11 +01:00
|
|
|
|
2022-04-11 16:03:48 +02:00
|
|
|
[](http://www.apache.org/licenses/LICENSE-2.0)
|
2022-04-08 14:01:47 +02:00
|
|
|
[](https://npmjs.org/package/openvidu-angular)
|
|
|
|
[](https://npmjs.org/package/openvidu-angular)
|
|
|
|
|
|
|
|
**The easier way to build powerful OpenVidu videoconference frontend applications.**
|
2022-01-19 17:24:11 +01:00
|
|
|
|
2022-04-11 16:03:48 +02:00
|
|
|
## Requirements:
|
|
|
|
|
|
|
|
You will need angular-cli (and of course NPM) to serve the Angular frontend. You can check it with the following command:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
npm -v
|
|
|
|
ng v
|
|
|
|
```
|
|
|
|
|
2022-04-18 12:50:20 +02:00
|
|
|
## How to install it
|
2022-01-19 17:24:11 +01:00
|
|
|
|
2022-04-11 16:03:48 +02:00
|
|
|
1. You need to install the openvidu-angular library in your Angular application:
|
|
|
|
|
2022-03-28 16:51:12 +02:00
|
|
|
```
|
2022-04-11 16:03:48 +02:00
|
|
|
npm install openvidu-angular
|
|
|
|
```
|
|
|
|
|
|
|
|
2. Also you need Angular Material:
|
|
|
|
|
|
|
|
```
|
|
|
|
ng add @angular/material
|
2022-03-28 16:51:12 +02:00
|
|
|
```
|
|
|
|
|
2022-04-18 12:50:20 +02:00
|
|
|
## Configure it
|
2022-03-28 16:51:12 +02:00
|
|
|
|
2022-04-11 16:03:48 +02:00
|
|
|
|
|
|
|
You need import the openvidu-angular module in your `app.module.ts`:
|
2022-01-19 17:24:11 +01:00
|
|
|
|
2022-04-08 13:52:12 +02:00
|
|
|
```typescript
|
|
|
|
import { OpenViduAngularConfig, OpenViduAngularModule } from 'openvidu-angular';
|
2022-04-18 12:50:20 +02:00
|
|
|
import { environment } from 'src/environments/environment';
|
2022-01-19 17:24:11 +01:00
|
|
|
|
2022-04-08 13:52:12 +02:00
|
|
|
const config: OpenViduAngularConfig = {
|
|
|
|
production: environment.production
|
|
|
|
};
|
2022-01-19 17:24:11 +01:00
|
|
|
|
|
|
|
@NgModule({
|
2022-04-08 13:52:12 +02:00
|
|
|
imports: [
|
|
|
|
...
|
|
|
|
OpenViduAngularModule.forRoot(config)
|
|
|
|
]
|
|
|
|
})
|
2022-04-18 12:50:20 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
You also can add the default styles in your `styles.scss` file:
|
|
|
|
|
|
|
|
```css
|
|
|
|
:root {
|
|
|
|
--ov-primary-color: #303030;
|
|
|
|
--ov-secondary-color: #3e3f3f;
|
|
|
|
--ov-tertiary-color: #598eff;
|
|
|
|
--ov-warn-color: #EB5144;
|
|
|
|
--ov-accent-color: #ffae35;
|
2022-04-18 13:33:53 +02:00
|
|
|
--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
|
|
|
```
|