/** * R3.API.Video * @param id * @param name * @param parentEntity * @param autoUpdateSize * @param width * @param height * @param offset * @param source * @constructor */ R3.API.Video = function( id, name, parentEntity, autoUpdateSize, width, height, offset, source ) { if (R3.Utils.UndefinedOrNull(id)) { id = R3.Utils.RandomId(); } this.id = id; if (R3.Utils.UndefinedOrNull(name)) { name = 'Video (' + id + ')'; } this.name = name; if (R3.Utils.UndefinedOrNull(autoUpdateSize)) { autoUpdateSize = true; } this.autoUpdateSize = autoUpdateSize; var size = R3.Utils.GetWindowSize(); if (R3.Utils.UndefinedOrNull(width)) { width = size.width; } this.width = width; if (R3.Utils.UndefinedOrNull(height)) { height = size.height; } this.height = height; if (R3.Utils.UndefinedOrNull(offset)) { offset = new R3.API.Vector2(0,0); } this.offset = offset; if (R3.Utils.UndefinedOrNull(source)) { source = null; } this.source = source; R3.API.Component.call( this, R3.Component.VIDEO, parentEntity ); }; R3.API.Video.prototype = Object.create(R3.API.Component.prototype); R3.API.Video.prototype.constructor = R3.API.Video;