mirror of https://github.com/OpenVidu/openvidu.git
29 lines
795 B
TypeScript
29 lines
795 B
TypeScript
![]() |
import { Inject, Injectable } from '@angular/core';
|
||
|
import { LibConfig } from '../../config/lib.config';
|
||
|
|
||
|
// import { version } from '../../../../package.json';
|
||
|
|
||
|
@Injectable()
|
||
|
export class LibraryConfigService {
|
||
|
private configuration: LibConfig;
|
||
|
|
||
|
constructor(@Inject('LIB_CONFIG') config: LibConfig) {
|
||
|
this.configuration = config;
|
||
|
console.log(this.configuration);
|
||
|
this.isUsingProLibrary() ? console.log('Using PRO library') : console.log('Using CE library');
|
||
|
if(this.isProduction()) console.log('Production Mode');
|
||
|
// console.log(version)
|
||
|
}
|
||
|
|
||
|
getConfig(): LibConfig {
|
||
|
return this.configuration;
|
||
|
}
|
||
|
isProduction(): boolean {
|
||
|
return this.configuration?.environment?.production;
|
||
|
}
|
||
|
|
||
|
isUsingProLibrary(): boolean {
|
||
|
return !!this.configuration?.environment?.useProdLibrary;
|
||
|
}
|
||
|
}
|