@pixstream/ballancer v1.0.28
@pixstream/universal
https://github.com/MetahumanSDK/pixstream.js
Easy to use library for creating reallistic chat bots based on Epic Games® MetaHumans.
It is heavily based on the Epic Games® pixel streaming source code. But it's ported to Typescript and splited to different logic parts.
Naming
Streamer – Unreal Engine® based application that we want to stream.
Companion – NodeJs server that arrange connections to streamer.
Ballancer – server that equally distribute load between pairs: streamer and companion.
Getting started
Sample project: https://github.com/MetahumanSDK/metahuman-unreal-chat-streamer
install package
npm i @pixstream/universal --save
then use is
const config = getConfigFromArgvOrDefault(DefaultBallancerConfig);
const ballancer = new BallancerServer({
port: config.ballancerServer.port
});
server.options('/api/companion', cors());
server.get('/api/companion', cors(), (req, res) => {
const companionServer = ballancer.getAvailableCompanionServer();
if (companionServer === undefined || companionServer === null) {
res.json({ error: 'No companion servers available' });
return;
}
const connectionStrings: ICompanionConnectionSettings = {
websocketUrl: Connection.toWebsocketUrl(companionServer.connection),
serverUrl: Connection.toHttpUrl(companionServer.connection)
}
res.json(connectionStrings);
});
ballancer.start();
4 months ago
5 months ago
11 months ago
11 months ago
7 months ago
7 months ago
7 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
12 months ago
12 months ago
1 year ago
1 year ago
1 year ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
1 year ago
1 year ago
1 year ago