Node.js SDK - Runtime

Home > rainway-sdk-native > Runtime

Runtime class

Signature:

export declare class Runtime 

Properties

PropertyModifiersTypeDescription
callbacksPartial<RuntimeCallbacks>
peerIdPeerIdGet our own peer id
peersReadonlyMap<PeerId, Peer>A map of connected peers, keyed by their Peer IDs.
setLogLeveltypeof Runtime.setLogLevel
setLogSinktypeof Runtime.setLogSink
versionstringThe current native runtime version as a semver compatible string.

Methods

MethodModifiersDescription
initialize(cfg)staticInitializes rainway with the config and waits for it to connect to instant relay.
instance()staticGet the current runtime instance. Undefined if the runtime has not been initialized.
setLogLevel(lv)staticSets the global Rainway Runtime log level.WARNING: callbacks into JS are very slow, using even Warning level of logs may cause timeouts during network handling.
setLogSink(cb)staticSets the method that receives all log messages from the RainwaySDK.
shutdown()Destroys the Rainway Runtime and all associated resources.
startExportingCaptureStreamToFile(path)Starts exporting the locally captured audio and video stream to a pair of files in the specified directory.
stopExportingCaptureStreamToFile()Stops exporting the specified guest's audio and video stream.
version()staticThe current native runtime version as a semver compatible string.