Home > rainway-sdk-native > Runtime
Runtime class
Signature:
export declare class Runtime
Properties
| Property | Modifiers | Type | Description |
|---|---|---|---|
| callbacks | Partial<RuntimeCallbacks> | ||
| peerId | PeerId | Get our own peer id | |
| peers | ReadonlyMap<PeerId, Peer> | A map of connected peers, keyed by their Peer IDs. | |
| setLogLevel | typeof Runtime.setLogLevel | ||
| setLogSink | typeof Runtime.setLogSink | ||
| version | string | The current native runtime version as a semver compatible string. |
Methods
| Method | Modifiers | Description |
|---|---|---|
| initialize(cfg) | static | Initializes rainway with the config and waits for it to connect to instant relay. |
| instance() | static | Get the current runtime instance. Undefined if the runtime has not been initialized. |
| setLogLevel(lv) | static | Sets 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) | static | Sets the method that receives all log messages from the RainwaySDK. |
| shutdown() | Destroys the Rainway Runtime and all associated resources. | |
| startExportingCaptureStreamToFile(streamId, 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. | |
| stopStream(stream) | Stop an active stream. | |
| submitAudio(stream, submission) | Submit audio to a BYOFB stream: https://docs.rainway.com/docs/byofb | |
| submitFrame(stream, texture) | Submit video to a BYOFB stream: https://docs.rainway.com/docs/byofb | |
| version() | static | The current native runtime version as a semver compatible string. |
