UNPKG

kurento-client-core

Version:

JavaScript Client API for Kurento Media Server

104 lines (86 loc) 3.18 kB
/* Autogenerated with Kurento Idl */ /* * (C) Copyright 2013-2015 Kurento (https://kurento.openvidu.io/) * * 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. */ var inherits = require('inherits'); var kurentoClient = require('kurento-client'); var checkType = kurentoClient.checkType; var ChecktypeError = checkType.ChecktypeError; var RTCStats = require('./RTCStats'); /** * Statistics related to the peer connection. * * @constructor module:core/complexTypes.RTCPeerConnectionStats * * @property {external:int64} dataChannelsOpened * Represents the number of unique datachannels opened. * @property {external:int64} dataChannelsClosed * Represents the number of unique datachannels closed. * @extends module:core.RTCStats */ function RTCPeerConnectionStats(rTCPeerConnectionStatsDict){ if(!(this instanceof RTCPeerConnectionStats)) return new RTCPeerConnectionStats(rTCPeerConnectionStatsDict) rTCPeerConnectionStatsDict = rTCPeerConnectionStatsDict || {} // Check rTCPeerConnectionStatsDict has the required fields // // checkType('int64', 'rTCPeerConnectionStatsDict.dataChannelsOpened', rTCPeerConnectionStatsDict.dataChannelsOpened, {required: true}); // // checkType('int64', 'rTCPeerConnectionStatsDict.dataChannelsClosed', rTCPeerConnectionStatsDict.dataChannelsClosed, {required: true}); // // Init parent class RTCPeerConnectionStats.super_.call(this, rTCPeerConnectionStatsDict) // Set object properties Object.defineProperties(this, { dataChannelsOpened: { writable: true, enumerable: true, value: rTCPeerConnectionStatsDict.dataChannelsOpened }, dataChannelsClosed: { writable: true, enumerable: true, value: rTCPeerConnectionStatsDict.dataChannelsClosed } }) } inherits(RTCPeerConnectionStats, RTCStats) // Private identifiers to allow re-construction of the complexType on the server // They need to be enumerable so JSON.stringify() can access to them Object.defineProperties(RTCPeerConnectionStats.prototype, { __module__: { enumerable: true, value: "kurento" }, __type__: { enumerable: true, value: "RTCPeerConnectionStats" } }) /** * Checker for {@link module:core/complexTypes.RTCPeerConnectionStats} * * @memberof module:core/complexTypes * * @param {external:String} key * @param {module:core/complexTypes.RTCPeerConnectionStats} value */ function checkRTCPeerConnectionStats(key, value) { if(!(value instanceof RTCPeerConnectionStats)) throw ChecktypeError(key, RTCPeerConnectionStats, value); }; module.exports = RTCPeerConnectionStats; RTCPeerConnectionStats.check = checkRTCPeerConnectionStats;