0.2.3 • Published 3 months ago

@swmansion/smelter-node v0.2.3

Weekly downloads
-
License
MIT
Repository
-
Last release
3 months ago

@swmansion/smelter-node

Provides API to create and manage Smelter instances for Node.js environment.

When you call registerOutput on the Smelter instance, you can pass a ReactElement that represents a component tree built from components included in @swmansion/smelter package. Those components will define what will be rendered on the output stream.

Usage

import Smelter from '@swmansion/smelter-node';
import { View, Text } from '@swmansion/smelter';

function ExampleApp() {
  return (
    <View>
      <Text style={{ fontSize: 20 }}>Hello world</Text>
    </View>
  );
}

async function run() {
  const smelter = new Smelter();
  await smelter.init();

  // register input/outputs/images/shaders/...

  await smelter.registerOutput('example_output', <ExampleApp />, {
    type: 'rtp_stream',
    port: 8001,
    ip: '127.0.0.1',
    transportProtocol: 'udp',
    video: {
      encoder: { type: 'ffmpeg_h264', preset: 'ultrafast' },
      resolution: { width: 1920, height: 1080 },
    },
    audio: {
      encoder: { type: 'opus', channels: 'stereo' },
    },
  });

  await smelter.start();
}
run();

See our docs to learn more.

License

@swmansion/smelter-node is MIT licensed, but internally it is downloading and using Smelter server that is licensed under a custom license.

Smelter is created by Software Mansion

swm

Since 2012 Software Mansion is a software agency with experience in building web and mobile apps as well as complex multimedia solutions. We are Core React Native Contributors and experts in live streaming and broadcasting technologies. We can help you build your next dream product – Hire us.

0.2.3

3 months ago

0.2.2

3 months ago

0.2.1

4 months ago

0.2.0-rc.3

5 months ago

0.2.0

5 months ago

0.2.0-rc.2

5 months ago

0.2.0-rc.1

5 months ago

0.2.0-rc.0

5 months ago