r3-legacy/src/r3-api-socket-cast.js

42 lines
1.1 KiB
JavaScript
Raw Normal View History

2018-04-09 09:35:04 +02:00
/**
2018-08-17 14:53:02 +02:00
* R3.API.Socket.Cast
2019-10-06 21:11:18 +02:00
* @param apiComponent
* @property castType
* @property source
* @property sourceProperties
2018-04-09 09:35:04 +02:00
* @constructor
*/
R3.API.Socket.Cast = function(
2019-10-06 21:11:18 +02:00
apiComponent
2018-04-09 09:35:04 +02:00
) {
2019-07-24 14:45:42 +02:00
R3.API.Socket.call(
this,
2019-10-06 21:11:18 +02:00
apiComponent
2019-07-24 14:45:42 +02:00
);
2018-04-09 09:35:04 +02:00
2019-10-06 21:11:18 +02:00
if (R3.Utils.UndefinedOrNull(apiComponent.castType)) {
apiComponent.castType = R3.API.Socket.Cast.CAST_TYPE_ROOM;
2018-04-09 09:35:04 +02:00
}
2019-10-06 21:11:18 +02:00
this.castType = apiComponent.castType;
2018-04-09 09:35:04 +02:00
2019-10-06 21:11:18 +02:00
if (R3.Utils.UndefinedOrNull(apiComponent.source)) {
apiComponent.source = null;
2018-04-09 09:35:04 +02:00
}
2019-10-06 21:11:18 +02:00
this.source = apiComponent.source;
2018-04-09 09:35:04 +02:00
2019-10-06 21:11:18 +02:00
if (R3.Utils.UndefinedOrNull(apiComponent.sourceProperties)) {
apiComponent.sourceProperties = null;
2018-04-09 09:35:04 +02:00
}
2019-10-06 21:11:18 +02:00
this.sourceProperties = apiComponent.sourceProperties;
2018-04-09 09:35:04 +02:00
};
R3.API.Socket.Cast.prototype = Object.create(R3.API.Socket.prototype);
2018-08-17 14:53:02 +02:00
R3.API.Socket.Cast.prototype.constructor = R3.API.Socket.Cast;
2018-04-09 09:35:04 +02:00
R3.API.Socket.Cast.CAST_TYPE_ROOM = 0x1;
R3.API.Socket.Cast.CAST_TYPE_PEER = 0x2;
R3.API.Socket.Cast.CAST_TYPE_ALL = 0x3;
2019-07-24 14:45:42 +02:00
R3.API.Socket.Cast.CAST_TYPE_ALL_BUT_PEER = 0x4;