UNPKG

kurento-module-chroma

Version:

JavaScript Client API for Kurento Media Server

122 lines (105 loc) 3.53 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 ComplexType = kurentoClient.register.complexTypes.ComplexType; /** * Parameter representing a window in a video stream. * It is used in command and constructor for media elements. * All units are in pixels, X runs from left to right, Y from top to bottom. * * @constructor module:chroma/complexTypes.WindowParam * * @property {external:Integer} topRightCornerX * X coordinate of the left upper point of the window * @property {external:Integer} topRightCornerY * Y coordinate of the left upper point of the window * @property {external:Integer} width * width in pixels of the window * @property {external:Integer} height * height in pixels of the window */ function WindowParam(windowParamDict){ if(!(this instanceof WindowParam)) return new WindowParam(windowParamDict) windowParamDict = windowParamDict || {} // Check windowParamDict has the required fields // // checkType('int', 'windowParamDict.topRightCornerX', windowParamDict.topRightCornerX, {required: true}); // // checkType('int', 'windowParamDict.topRightCornerY', windowParamDict.topRightCornerY, {required: true}); // // checkType('int', 'windowParamDict.width', windowParamDict.width, {required: true}); // // checkType('int', 'windowParamDict.height', windowParamDict.height, {required: true}); // // Init parent class WindowParam.super_.call(this, windowParamDict) // Set object properties Object.defineProperties(this, { topRightCornerX: { writable: true, enumerable: true, value: windowParamDict.topRightCornerX }, topRightCornerY: { writable: true, enumerable: true, value: windowParamDict.topRightCornerY }, width: { writable: true, enumerable: true, value: windowParamDict.width }, height: { writable: true, enumerable: true, value: windowParamDict.height } }) } inherits(WindowParam, ComplexType) // 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(WindowParam.prototype, { __module__: { enumerable: true, value: "chroma" }, __type__: { enumerable: true, value: "WindowParam" } }) /** * Checker for {@link module:chroma/complexTypes.WindowParam} * * @memberof module:chroma/complexTypes * * @param {external:String} key * @param {module:chroma/complexTypes.WindowParam} value */ function checkWindowParam(key, value) { if(!(value instanceof WindowParam)) throw ChecktypeError(key, WindowParam, value); }; module.exports = WindowParam; WindowParam.check = checkWindowParam;