Socket
Socket
Sign inDemoInstall

@opentok/client

Package Overview
Dependencies
0
Maintainers
1
Versions
117
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opentok/client

The OpenTok.js library lets you use OpenTok-powered video sessions on the web


Version published
Maintainers
1
Weekly downloads
82,268
increased by7.63%

Weekly downloads

Readme

Source

OpenTok.js

npm version

The OpenTok.js library lets you use OpenTok-powered video sessions on the web.

Installation

yarn add @opentok/client

or

npm install --save @opentok/client

Usage

As a module

The library is bundled as a standalone UMD module so it is CommonJS compatible.

Create your application file app.js:

const OT = require('@opentok/client');
const publisher = OT.initPublisher();

Bundle the application with your favourite bundler. For browserify just run:

browserify app.js > bundle.js

And include the bundle in your webpage:

<script src="bundle.js"></script>

Source maps can be found in dist/js/. Make sure your bundler is configured to include them if you need to generate source maps.

As a global window object

Include the dist/js/opentok.min.js script in your webpage.

Then use the OT object exposed in the global scope.

<script src="node_modules/@opentok/client/dist/js/opentok.min.js"></script>
<script>
const publisher = OT.initPublisher();
</script>

Note: OpenTok.js automatically loads CSS and image files from the TokBox CDN when included in a webpage.

Documentation

The API reference and tutorials can be found at https://tokbox.com/developer/sdks/js/

Keywords

FAQs

Last updated on 03 Apr 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc