42 lines
1.1 KiB
JavaScript
42 lines
1.1 KiB
JavaScript
/**
|
|
* R3.API.Socket.Cast
|
|
* @param apiComponent
|
|
* @property castType
|
|
* @property source
|
|
* @property sourceProperties
|
|
* @constructor
|
|
*/
|
|
R3.API.Socket.Cast = function(
|
|
apiComponent
|
|
) {
|
|
|
|
R3.API.Socket.call(
|
|
this,
|
|
apiComponent
|
|
);
|
|
|
|
if (R3.Utils.UndefinedOrNull(apiComponent.castType)) {
|
|
apiComponent.castType = R3.API.Socket.Cast.CAST_TYPE_ROOM;
|
|
}
|
|
this.castType = apiComponent.castType;
|
|
|
|
if (R3.Utils.UndefinedOrNull(apiComponent.source)) {
|
|
apiComponent.source = null;
|
|
}
|
|
this.source = apiComponent.source;
|
|
|
|
if (R3.Utils.UndefinedOrNull(apiComponent.sourceProperties)) {
|
|
apiComponent.sourceProperties = null;
|
|
}
|
|
this.sourceProperties = apiComponent.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;
|