UNPKG

@4players/odin

Version:

A cross-platform SDK enabling developers to integrate real-time VoIP chat technology into their projects

15 lines (14 loc) 608 B
import { assert } from './utils/helpers'; export let PLUGIN; export const SUPPORTED_API_VERSION = '8'; /** * Initializes the WebSDK with the specified plugin, enabling support for specific platforms and features. * * IMPORTANT: This function must be called before attempting to join a room. * * @param {Plugin} plugin - The plugin instance to initialize the WebSDK with. The plugin must have a version of '1' or higher. */ export function init(plugin) { assert(plugin.version === SUPPORTED_API_VERSION, `Only plugins with version "${SUPPORTED_API_VERSION}" are supported.`); PLUGIN = plugin; }