mirror of https://github.com/OpenVidu/openvidu.git
openvidu-components: Clean code
parent
fd6a076f55
commit
df128e0591
|
@ -58,9 +58,6 @@ export class OpenViduComponentsPO {
|
||||||
expect(await this.isPresent('#media-buttons-container')).to.be.true;
|
expect(await this.isPresent('#media-buttons-container')).to.be.true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Angular library
|
|
||||||
|
|
||||||
async clickOn(selector: string): Promise<void> {
|
async clickOn(selector: string): Promise<void> {
|
||||||
const element = await this.waitForElement(selector);
|
const element = await this.waitForElement(selector);
|
||||||
await element.click();
|
await element.click();
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Connection, OpenVidu, OpenViduError, OpenViduErrorName, Publisher, PublisherProperties, Session, SignalOptions, Stream } from 'openvidu-browser';
|
import { Connection, OpenVidu, OpenViduError, OpenViduErrorName, Publisher, PublisherProperties, Session, SignalOptions } from 'openvidu-browser';
|
||||||
|
|
||||||
import { LoggerService } from '../logger/logger.service';
|
import { LoggerService } from '../logger/logger.service';
|
||||||
|
|
||||||
import { ILogger } from '../../models/logger.model';
|
|
||||||
import { Signal } from '../../models/signal.model';
|
|
||||||
import { OpenViduAngularConfigService } from '../config/openvidu-angular.config.service';
|
|
||||||
import { PlatformService } from '../platform/platform.service';
|
|
||||||
import { DeviceService } from '../device/device.service';
|
|
||||||
import { CameraType } from '../../models/device.model';
|
import { CameraType } from '../../models/device.model';
|
||||||
import { ScreenType, VideoType } from '../../models/video-type.model';
|
import { ILogger } from '../../models/logger.model';
|
||||||
import { ParticipantService } from '../participant/participant.service';
|
|
||||||
import { TokenService } from '../token/token.service';
|
|
||||||
import { OpenViduEdition } from '../../models/openvidu.model';
|
import { OpenViduEdition } from '../../models/openvidu.model';
|
||||||
|
import { Signal } from '../../models/signal.model';
|
||||||
|
import { ScreenType, VideoType } from '../../models/video-type.model';
|
||||||
|
import { OpenViduAngularConfigService } from '../config/openvidu-angular.config.service';
|
||||||
|
import { DeviceService } from '../device/device.service';
|
||||||
|
import { ParticipantService } from '../participant/participant.service';
|
||||||
|
import { PlatformService } from '../platform/platform.service';
|
||||||
|
import { TokenService } from '../token/token.service';
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
|
@ -444,19 +444,19 @@ export class OpenViduService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private destroyPublisher(publisher: Publisher): void {
|
// private destroyPublisher(publisher: Publisher): void {
|
||||||
if (!!publisher) {
|
// if (!!publisher) {
|
||||||
if (publisher.stream.getWebRtcPeer()) {
|
// if (publisher.stream.getWebRtcPeer()) {
|
||||||
publisher.stream.disposeWebRtcPeer();
|
// publisher.stream.disposeWebRtcPeer();
|
||||||
}
|
// }
|
||||||
publisher.stream.disposeMediaStream();
|
// publisher.stream.disposeMediaStream();
|
||||||
if (publisher.id === this.participantService.getMyCameraPublisher().id) {
|
// if (publisher.id === this.participantService.getMyCameraPublisher().id) {
|
||||||
this.participantService.setMyCameraPublisher(publisher);
|
// this.participantService.setMyCameraPublisher(publisher);
|
||||||
} else if (publisher.id === this.participantService.getMyScreenPublisher().id) {
|
// } else if (publisher.id === this.participantService.getMyScreenPublisher().id) {
|
||||||
this.participantService.setMyScreenPublisher(publisher);
|
// this.participantService.setMyScreenPublisher(publisher);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
private async createMediaStream(pp: PublisherProperties): Promise<MediaStream> {
|
private async createMediaStream(pp: PublisherProperties): Promise<MediaStream> {
|
||||||
let mediaStream: MediaStream;
|
let mediaStream: MediaStream;
|
||||||
|
|
Loading…
Reference in New Issue