2020-09-18 15:15:55 +02:00
|
|
|
/*
|
2022-01-13 11:18:47 +01:00
|
|
|
* (C) Copyright 2017-2022 OpenVidu (https://openvidu.io)
|
2020-09-18 15:15:55 +02:00
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
import { Event } from './Event';
|
|
|
|
import { Session } from '../../OpenVidu/Session';
|
2020-10-09 12:46:33 +02:00
|
|
|
import { Connection } from '../../OpenVidu/Connection';
|
2020-09-18 15:15:55 +02:00
|
|
|
|
|
|
|
/**
|
2022-01-13 13:54:34 +01:00
|
|
|
* Triggered by [[networkQualityLevelChanged]]
|
2020-09-18 15:15:55 +02:00
|
|
|
*/
|
2020-10-09 10:52:01 +02:00
|
|
|
export class NetworkQualityLevelChangedEvent extends Event {
|
2020-09-18 15:15:55 +02:00
|
|
|
|
2020-10-17 19:46:22 +02:00
|
|
|
/**
|
|
|
|
* New value of the network quality level
|
|
|
|
*/
|
2020-11-04 19:27:58 +01:00
|
|
|
newValue: number;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Old value of the network quality level
|
|
|
|
*/
|
|
|
|
oldValue: number;
|
2020-09-18 15:15:55 +02:00
|
|
|
|
|
|
|
/**
|
2020-10-17 19:46:22 +02:00
|
|
|
* Connection for whom the network quality level changed
|
2020-09-18 15:15:55 +02:00
|
|
|
*/
|
2020-10-09 12:46:33 +02:00
|
|
|
connection: Connection
|
2020-09-18 15:15:55 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @hidden
|
|
|
|
*/
|
2020-11-04 19:27:58 +01:00
|
|
|
constructor(target: Session, newValue: number, oldValue: number, connection: Connection) {
|
2020-10-09 10:52:01 +02:00
|
|
|
super(false, target, 'networkQualityLevelChanged');
|
2020-11-04 19:27:58 +01:00
|
|
|
this.newValue = newValue;
|
|
|
|
this.oldValue = oldValue;
|
2020-10-09 12:46:33 +02:00
|
|
|
this.connection = connection;
|
2020-09-18 15:15:55 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @hidden
|
|
|
|
*/
|
|
|
|
// tslint:disable-next-line:no-empty
|
|
|
|
callDefaultBehavior() { }
|
|
|
|
|
|
|
|
}
|