@vonage/video-client
TypeScript icon, indicating that this package has built-in type declarations

2.25.1 • Public • Published

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/

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i @vonage/video-client

      Weekly Downloads

      17

      Version

      2.25.1

      License

      https://www.vonage.com/legal/communications-apis/terms-of-use/

      Unpacked Size

      14.7 MB

      Total Files

      7

      Last publish

      Collaborators

      • mprabhu1
      • gpojula
      • omrizilber
      • elimenko.vonage
      • thealmoggvonage
      • saurabh.vonage
      • aviadhouri.va
      • daniel-sapir
      • llihovodov
      • tabdullah
      • jmoramunoz2
      • sailusha
      • hilakl
      • leppelin
      • molszewski_v
      • twilliams253
      • abolles
      • lallen2
      • yonatan.kra
      • jtiet
      • vonage-frontier
      • vonage_client_media_processing
      • or.cpc
      • jeffswartz
      • rhainer
      • deliajolt
      • liranbin
      • javiermolsanz
      • v-kpheng
      • vgai-dev
      • web-il
      • iceberg-team
      • unified_portal
      • vreporter-npm
      • vbcbe
      • voxip_team
      • yuri.guller
      • idanvon
      • nexmo-devrel
      • vvd
      • vonagemeetings
      • vonage-jenkins
      • maikthomas
      • arivonage