/** * R3.API.Socket.Cast * @param apiSocket * @param castType * @param source * @param sourceProperties * @constructor */ R3.API.Socket.Cast = function( apiSocket, castType, source, sourceProperties ) { if (R3.Utils.UndefinedOrNull(apiSocket)) { apiSocket = {} } this.apiSocket = apiSocket; R3.API.Socket.call( this, this.apiSocket, this.apiSocket.roomId, this.apiSocket.peerId, this.apiSocket.server ); if (R3.Utils.UndefinedOrNull(castType)) { castType = R3.API.Socket.Cast.CAST_TYPE_ROOM; } this.castType = castType; if (R3.Utils.UndefinedOrNull(source)) { source = null; } this.source = source; if (R3.Utils.UndefinedOrNull(sourceProperties)) { sourceProperties = null; } this.sourceProperties = sourceProperties; }; R3.API.Socket.Cast.prototype = Object.create(R3.API.Socket.prototype); R3.API.Socket.Cast.prototype.constructor = R3.API.Socket.Cast; R3.API.Socket.Cast.CAST_TYPE_ROOM = 0x1; R3.API.Socket.Cast.CAST_TYPE_PEER = 0x2; R3.API.Socket.Cast.CAST_TYPE_ALL = 0x3; R3.API.Socket.Cast.CAST_TYPE_ALL_BUT_PEER = 0x4;