mirror of https://github.com/OpenVidu/openvidu.git
openvidu-angular: Removed custom service for webcomponent logging
parent
1d70791fd9
commit
353dd2b545
|
@ -1,5 +1,5 @@
|
||||||
import { Component, ElementRef, Input, OnInit, Output, EventEmitter } from '@angular/core';
|
import { Component, ElementRef, Input, OnInit, Output, EventEmitter } from '@angular/core';
|
||||||
import { ILogger, LoggerService, OpenViduService, TokenModel, ParticipantAbstractModel, RecordingInfo } from 'openvidu-angular';
|
import { OpenViduService, TokenModel, ParticipantAbstractModel, RecordingInfo } from 'openvidu-angular';
|
||||||
import { Session } from 'openvidu-browser';
|
import { Session } from 'openvidu-browser';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -531,13 +531,11 @@ export class OpenviduWebComponentComponent implements OnInit {
|
||||||
* @internal
|
* @internal
|
||||||
*/
|
*/
|
||||||
success: boolean = false;
|
success: boolean = false;
|
||||||
private log: ILogger;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @internal
|
* @internal
|
||||||
*/
|
*/
|
||||||
constructor(private loggerService: LoggerService, private host: ElementRef, private openviduService: OpenViduService) {
|
constructor(private host: ElementRef, private openviduService: OpenViduService) {
|
||||||
this.log = this.loggerService.get('WebComponent');
|
|
||||||
this.host.nativeElement.disconnect = this.disconnect.bind(this);
|
this.host.nativeElement.disconnect = this.disconnect.bind(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -553,19 +551,19 @@ export class OpenviduWebComponentComponent implements OnInit {
|
||||||
*/
|
*/
|
||||||
@Input('tokens')
|
@Input('tokens')
|
||||||
set tokens(value: TokenModel | string) {
|
set tokens(value: TokenModel | string) {
|
||||||
this.log.d('Webcomponent tokens: ', value);
|
console.debug('Webcomponent tokens: ', value);
|
||||||
try {
|
try {
|
||||||
this._tokens = this.castToJson(value);
|
this._tokens = this.castToJson(value);
|
||||||
this.success = !!this._tokens?.webcam && !!this._tokens?.screen;
|
this.success = !!this._tokens?.webcam && !!this._tokens?.screen;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (typeof value === 'string' && value !== '') {
|
if (typeof value === 'string' && value !== '') {
|
||||||
this.log.d('Sigle token received.');
|
console.debug('Sigle token received.');
|
||||||
this._tokens = { webcam: value };
|
this._tokens = { webcam: value };
|
||||||
this.success = true;
|
this.success = true;
|
||||||
} else {
|
} else {
|
||||||
this.log.e(error);
|
console.error(error);
|
||||||
this.log.e('Parameters received are incorrect: ', value);
|
console.error('Parameters received are incorrect: ', value);
|
||||||
this.log.e('Session cannot start');
|
console.error('Session cannot start');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue