UNPKG

@4players/odin

Version:

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

18 lines (17 loc) 775 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SUPPORTED_API_VERSION = exports.PLUGIN = void 0; exports.init = init; const helpers_1 = require("./utils/helpers"); exports.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. */ function init(plugin) { (0, helpers_1.assert)(plugin.version === exports.SUPPORTED_API_VERSION, `Only plugins with version "${exports.SUPPORTED_API_VERSION}" are supported.`); exports.PLUGIN = plugin; }