{"id":14035915,"url":"https://github.com/opentok/accelerator-core-js","last_synced_at":"2025-10-28T08:08:25.605Z","repository":{"id":16708300,"uuid":"68642221","full_name":"opentok/accelerator-core-js","owner":"opentok","description":"Accelerator Core provides a simple way to integrate real-time audio/video into your web application using the OpenTok Platform","archived":false,"fork":false,"pushed_at":"2024-08-22T19:31:05.000Z","size":5700,"stargazers_count":25,"open_issues_count":33,"forks_count":39,"subscribers_count":27,"default_branch":"main","last_synced_at":"2025-08-08T14:17:36.537Z","etag":null,"topics":["annotations","javascript","opentok","screensharing","tokbox","video","webrtc"],"latest_commit_sha":null,"homepage":"https://www.vonage.com/communications-apis/video/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/opentok.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-09-19T20:09:17.000Z","updated_at":"2024-08-22T19:28:27.000Z","dependencies_parsed_at":"2024-06-18T16:57:42.297Z","dependency_job_id":"99ba5a94-e78c-4642-adb2-d52c918b14af","html_url":"https://github.com/opentok/accelerator-core-js","commit_stats":{"total_commits":423,"total_committers":25,"mean_commits":16.92,"dds":"0.27895981087470445","last_synced_commit":"176e97d68bd597662b3e48f553c16e149b515aad"},"previous_names":[],"tags_count":66,"template":false,"template_full_name":null,"purl":"pkg:github/opentok/accelerator-core-js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opentok%2Faccelerator-core-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opentok%2Faccelerator-core-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opentok%2Faccelerator-core-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opentok%2Faccelerator-core-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opentok","download_url":"https://codeload.github.com/opentok/accelerator-core-js/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opentok%2Faccelerator-core-js/sbom","scorecard":{"id":710554,"data":{"date":"2025-08-11","repo":{"name":"github.com/opentok/accelerator-core-js","commit":"df83ec7bf0cacd531e481e63eff9c2cda4fbaa3f"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.1,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":3,"reason":"Found 3/10 approved changesets -- score normalized to 3","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/metrics.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: third-party GitHubAction not pinned by hash: .github/workflows/metrics.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/opentok/accelerator-core-js/metrics.yml/main?enable=pin","Info:   0 out of   1 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 23 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"61 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-wf5p-g6vw-rhxx","Warn: Project is vulnerable to: GHSA-jr5f-v2jv-69x6","Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-cwfw-4gq5-mrqx","Warn: Project is vulnerable to: GHSA-g95f-p29q-9xw4","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-x9w5-v3q2-3rhw","Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-h6ch-v84p-w6p9","Warn: Project is vulnerable to: GHSA-434g-2637-qmqr","Warn: Project is vulnerable to: GHSA-49q7-c7j4-3p7m","Warn: Project is vulnerable to: GHSA-977x-g7h5-7qgw","Warn: Project is vulnerable to: GHSA-f7q4-pwc6-w24p","Warn: Project is vulnerable to: GHSA-fc9h-whq2-v747","Warn: Project is vulnerable to: GHSA-vjh7-7g9h-fjfh","Warn: Project is vulnerable to: GHSA-j4f2-536g-r55m","Warn: Project is vulnerable to: GHSA-r7qp-cfhv-p84w","Warn: Project is vulnerable to: GHSA-jchw-25xp-jwwc","Warn: Project is vulnerable to: GHSA-cxjh-pqwp-8mfp","Warn: Project is vulnerable to: GHSA-74fj-2j2h-c42q","Warn: Project is vulnerable to: GHSA-pw2r-vq6v-hr8c","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-4q6p-r6v2-jvc5","Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6","Warn: Project is vulnerable to: GHSA-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-7x7c-qm48-pq9c","Warn: Project is vulnerable to: GHSA-rc3x-jf5g-xvc5","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-wc69-rhjr-hc9g","Warn: Project is vulnerable to: GHSA-6fx8-h7jm-663j","Warn: Project is vulnerable to: GHSA-h7cp-r72f-jxh6","Warn: Project is vulnerable to: GHSA-v62p-rq8g-8h59","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-g4rg-993r-mgx7","Warn: Project is vulnerable to: GHSA-25hc-qcg6-38wj","Warn: Project is vulnerable to: GHSA-qm95-pgcg-qqfq","Warn: Project is vulnerable to: GHSA-cqmj-92xf-r6r9","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-662x-fhqg-9p8v","Warn: Project is vulnerable to: GHSA-394c-5j6w-4xmx","Warn: Project is vulnerable to: GHSA-78cj-fxph-m83p","Warn: Project is vulnerable to: GHSA-fhg7-m89q-25r3","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q","Warn: Project is vulnerable to: GHSA-72mh-269x-7mh5","Warn: Project is vulnerable to: GHSA-h4j5-c7cj-74xg"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-22T08:06:32.783Z","repository_id":16708300,"created_at":"2025-08-22T08:06:32.783Z","updated_at":"2025-08-22T08:06:32.783Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273035590,"owners_count":25034604,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-31T02:00:09.071Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["annotations","javascript","opentok","screensharing","tokbox","video","webrtc"],"created_at":"2024-08-12T03:01:45.967Z","updated_at":"2025-10-28T08:08:20.555Z","avatar_url":"https://github.com/opentok.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Accelerator Core JS\n\n[![Build Status](https://travis-ci.org/opentok/accelerator-core-js.svg?branch=master)](https://travis-ci.org/opentok/accelerator-core-js)\n[![GitHub release](https://img.shields.io/github/release/opentok/accelerator-core-js.svg)](./README.md)\n[![license](https://img.shields.io/github/license/opentok/accelerator-core-js.svg)](./.github/CONTRIBUTING.md)\n[![npm](https://img.shields.io/npm/v/opentok-accelerator-core.svg)](https://www.npmjs.com/package/opentok-accelerator-core)\n\n\u003cimg src=\"https://assets.tokbox.com/img/vonage/Vonage_VideoAPI_black.svg\" height=\"48px\" alt=\"Tokbox is now known as Vonage\" /\u003e\n\nOpenTok's Accelerator Core JS provides easy integration for OpenTok libraries. Whether you've already built your application using the OpenTok platform or are just getting started, Accelerator Core JS helps you implement:\n\n- Multi-Party Audio/Video Communication\n- Text Chat\n- Screen Sharing\n- Annotation\n- Archiving\n\n## Quickstart\n\nTo start using audio/video communication with OpenTok's libraries go to [Using Accelerator Core](#using-accelerator-core). To implement a more granular and complex management for OpenTok's session you can check [Using Accelerator Core JS with SDK Wrapper](#using-accelerator-core-js-with-sdk-wrapper).\n\n## Using Accelerator Core\n\n`OpenTok Accelerator Core JS` provides a simple way to integrate real-time audio/video into your web application using the OpenTok Platform. It also integrates with, manages, and provides a single API for the following accelerator packs:\n\n- [Text Chat](https://www.npmjs.com/package/opentok-text-chat)\n- [Screen Sharing](https://www.npmjs.com/package/opentok-screen-sharing)\n- [Annotation](https://www.npmjs.com/package/opentok-annotation)\n- [Archiving](https://www.npmjs.com/package/opentok-archiving)\n\n## Sample Applications\n\nThere are two sample applications for `Core` .  The [React](https://github.com/opentok/accelerator-sample-apps-js/tree/master/react-sample-app) sample application was built with [Create React App](https://github.com/facebookincubator/create-react-app) and uses [webpack](https://webpack.github.io/) to transpile code.  The other [sample application](https://github.com/opentok/accelerator-sample-apps-js/tree/master/vanilla-js-sample-app) is built with vanilla JavaScript.\n\n## Installation\n\n```bash\nnpm i --save opentok-accelerator-core\n```\n\n```javascript\nconst AccCore = require('opentok-accelerator-core');\n```\n\n```javascript\n\u003cscript src=\"path/to/browser/opentok-accelerator-core.js\"\u003e\u003c/script\u003e\n```\n\n### Configuration\n\n`Core` can be configured in a number of ways, but the only required options property is `credentials`, which includes an OpenTok API Key, Session ID, and Token.  These can be obtained from the [developer dashboard](https://tokbox.com/account/#/) or generated with one of the [OpenTok Server SDKs](https://tokbox.com/developer/).\n\n```javascript\nconst options = {\n  credentials: {\n    apiKey: yourOpenTokApiKey,\n    sessionId: yourOpenTokSessionId,\n    token: yourOpenTokToken,\n  },\n\n```\n\nOther properties are the following.\n\n#### Packages\n\nThe `packages` property specifies which accelerator packs should be included in the application.  If using a bundler like [`webpack`](https://webpack.github.io/) or [`Browserify`](http://browserify.org/), you'll need to install the additional packages using `npm`.  Otherwise `Core` will look for them in global scope.\n\n```javascript\n  packages: ['textChat', 'screenSharing', 'annotation', 'archiving'],\n```\n\n#### Containers\n\nThe `streamContainers` property is a function that specifies which DOM element should be used as a container for a video stream.  The `controlsContainer` property specifies the element to be used as the container for the local audio/video and accelerator pack controls.  These elements can either be [query selectors](https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelector) or references to DOM elements.  The default containers are specified below.  If these containers do not exist in the DOM, `Core` will be append new elements to the `body`.\n\n```javascript\n  /**\n * @param {String} pubSub - 'publisher' or 'subscriber'\n * @param {String} type - 'camera' or 'screen'\n * @param {*} data - Parsed stream connection data (subscriber only)\n * @param {Object} stream - The new stream (subscriber only)\n   */\n  streamContainers(pubSub, type, data, stream){\n    return {\n      publisher: {\n        camera: '#cameraPublisherContainer',\n        screen: '#screenPublisherContainer',\n      },\n      subscriber: {\n        camera: '#cameraSubscriberContainer',\n        screen: '#screenSubscriberContainer',\n      },\n    }[pubSub][type];\n  },\n  controlsContainer: '#videoControls',\n```\n\n#### Large-Scale Session\n\nIf you need to support an OpenTok session with [more than 300 connections](https://tokbox.com/developer/beta/large-sessions/), set `largeScale` to `true`.  This option is set to `false` by default.\n\n```javascript\n  largeScale: false,\n```\n\n#### Communication Options\n\nThe `communication` properties relate to the multi-party communication provided by `Core`:\n\n- `autoSubscribe` dictates whether or not `Core` automatically subscribes to new streams and is set to `true` by default.\n- `subscribeOnly`, which is set to `false` by default, allows users to join an OpenTok session and subscribe to streams without publishing any audio or video.\n- `connectionLimit` limits the number of parties that may publish/subscribe to the session.\n- `callProperties` allows for [customization](https://www.tokbox.com/developer/guides/customize-ui/js/) of the UI.\n\n```javascript\n  communication: {\n    autoSubscribe: true,\n    subscribeOnly: false,\n    connectionLimit: null,\n    callProperties: myCallProperties,\n  },\n```\n\n*See more on manually subscribing to streams [below](#autoSubscribe).*\n\n#### Accelerator Pack Properties\n\nThe remainder of the options properties are specific to individual accelerator packs.\n\n```javascript\n  textChat: {\n    name: `David`,\n    waitingMessage: 'Messages will be delivered when other users arrive',\n    container: '#chat',\n    alwaysOpen: true,\n  },\n  screenSharing: {\n    extensionID: 'yourChromeExtensionId',\n    extensionPathFF: 'yourFireFoxExtensionURL',\n    annotation: true, // 'true' required if sharing current browser window\n    externalWindow: false,\n    dev: true, // Allow http in development(localhost)\n    screenProperties: null,\n  },\n  annotation: {\n    items: myToolbarItems,\n    colors: myColorPalette,\n    onScreenCapture: myScreenCaptureCallback,\n    absoluteParent: {\n      publisher: '#videoWrapper',\n      subscriber: '#videoWrapper',\n    }\n  },\n  archiving: {\n    startURL: 'https://yourapi.com/startArchive',\n    stopURL: 'https://yourapi.com/stopArchive',\n  }\n};\n\n```\n\n## Usage\n\nInitialize `Core`:\n\n```javascript\nconst otCore = new AccCore(options);\n```\n\nConnect to the session:\n\n```javascript\notCore.connect().then(() =\u003e this.setState({ connected: true }));\n```\n\n`Core` also internally maintains the state of your OpenTok session for you.  Calling `otCore.state()` returns an object containing:\n\n```javascript\n  streams     =\u003e All current streams\n  streamMap   =\u003e The map of stream ids to publisher/subscriber ids\n  publishers  =\u003e All current publishers\n  subscribers =\u003e All current subscribers\n  meta        =\u003e The count of all current publishers and subscribers by type\n```\n\n*See an example of the publisher, subscriber, and meta data [below](#pubSubData).*\n\n## Exploring the code\n\nAside from the `connect` method the other `Core` **API methods** include:\n\n```javascript\ngetAccPack              =\u003e Get a reference to an individual accelerator pack\nstartCall               =\u003e Publish audio/video and subscribe to streams\nendCall                 =\u003e Stop publishing and unsubscribe from all streams\ngetSession              =\u003e Get the OpenTok Session Object\nforceDisconnect         =\u003e Force a remote connection to leave the session\nforceUnpublish          =\u003e Force the publisher a stream to stop publishing\ngetPublisherForStream   =\u003e Get the local publisher object for a stream\ngetSubscribersForStream =\u003e Get the local subscriber objects for a stream\ntoggleLocalAudio        =\u003e Toggle publishing local audio\ntoggleLocalVideo        =\u003e Toggle publishing local video\ntoggleRemoteAudio       =\u003e Toggle subscribing to remote audio\ntoggleRemoteVideo       =\u003e Toggle subscribing to remote video\nsignal                  =\u003e Send a signal using the OpenTok signaling API [1]\nstate                   =\u003e Get the OpenTok session state\nsubscribe               =\u003e Manually subscribe to a stream\n```\n\n[1] [OpenTok Signaling API](https://www.tokbox.com/developer/guides/signaling/js/)\n\nFull documentation for the `Core` API can be found [here](https://github.com/opentok/accelerator-core-js/blob/master/API.md).\n\n### Events\n\n`Core` exposes a number of events, including all OpenTok [session events](https://www.tokbox.com/developer/sdks/js/reference/Session.html#events), which can be accessed using the `on` method:\n\n```javascript\notCore.on('streamCreated', callback);\n```\n\nThe data passed to the callback for the following events...\n\n```javascript\nconst events = [\n    'subscribeToCamera',\n    'unsubscribeFromCamera',\n    'subscribeToScreen',\n    'unsubscribeFromScreen',\n    'startScreenShare',\n    'endScreenShare',\n];\n```\n\nwill always include the current `publishers`, `subscribers`, and a `meta` object which provides a count of the current `publishers` and `subscribers`, making it easy to keep your UI in sync.  If subscribing to a new stream, the `subscriber` object will be included as well.\n\n\u003ca name=\"pubSubData\"\u003e\u003c/a\u003e\n```javascript\n  meta: {\n    publishers: {\n      camera: 1,\n      screen: 0,\n      custom: 0,\n      total: 1,\n    },\n    subscribers: {\n      camera: 2,\n      screen: 1,\n      custom: 0,\n      total: 3,\n    },\n  },\n  publishers: {\n    camera: {\n      'OT_d18d5027-21eb-093f-8c18-e3959f3e7585': OTPublisherObject,\n    },\n    screen: {},\n    custom: {},\n  },\n  subscribers: {\n    camera: {\n      'OT_d18nd82s-21eb-4b3f-82n8-e3nd723e7585': OTSubscriberObject,\n      'OT_d38n82s-9n2b-4sdf-82n8-eadnfdf92nf90': OTSubscriberObject,\n    },\n    screen: {\n      'OT_nd872bd9s-0d82-n431-809l-k1kdjd72mdks': OTSubscriberObject,\n    },\n    custom: {\n      'OT_d38n82s-21eb-8dn8-8c18-eadnfdf92nf90': OTSubscriberObject,\n    }\n  }\n```\n\nThe full list of events can be seen [here](https://github.com/opentok/accelerator-core-js/blob/master/src/events.js).\n\n----------\n\n\u003ca name=\"autoSubscribe\"\u003e\u003c/a\u003e\n*There may be situations where you need to manually subscribe to streams.  For example,  you need to call `setState` in your React component, wait for the update to finish and your component to re-render so that the container for the new stream is available before subscribing.  In this case, you can set `autoSubscribe` to `false`, listen for new streams, update your state, and subscribe once the update is complete:*\n\n```javascript\notCore.on('streamCreated', ({ stream }) =\u003e {\n  this.setState({ streams: streams.concat(stream) }, () =\u003e {\n    otCore.subscribe(stream);\n  });\n});\n```\n\n## UI Styling\n\nDefault icons and styling for accelerator pack components are provided by `opentok-solutions-css`, which is available as an [npm](https://www.npmjs.com/package/opentok-solutions-css) module or from our [CDN](https://assets.tokbox.com/solutions/css/style.css).  To customize the layout and styling in your application, simply override these CSS rules with your own.\n\n## Using Accelerator Core JS with SDK Wrapper\n\n`Accelerator Core` will cover the use cases for most projects. If you have a special use case, your first course of action should be to open a Github issue. If there is a way that we can add functionality or increase the flexibility of core or one of the accelerator packs while maintaining backwards compatibility, we’re happy to do so. Another option is to use the [OpenTok JS SDK Wrapper](https://github.com/opentok/accelerator-core-js/blob/master/sdkWrapper.MD). The `SDK Wrapper` extends the functionality of the [OpenTok JS Client library](https://tokbox.com/developer/sdks/js/)  with the same state management provided by `Accelerator Core`. Some use cases for the SDK Wrapper may be:\n\n- Creating a messaging or signaling layer using OpenTok sessions.\n- Managing presence without any audio/video, using OpenTok sessions.\n\nYou can also use Accelerator Core and the SDK Wrapper in conjunction with each other since multiple instances of each may be created and used simultaneously.\n\n## Development and Contributing\n\nInterested in contributing? We :heart: pull requests! See the [Contribution](CONTRIBUTING.md) guidelines.\n\n## Getting Help\n\nWe love to hear from you so if you have questions, comments or find a bug in the project, let us know! You can either:\n\n- Open an issue on this repository\n- See \u003chttps://support.tokbox.com/\u003e for support options\n- Tweet at us! We're [@VonageDev](https://twitter.com/VonageDev) on Twitter\n- Or [join the Vonage Developer Community Slack](https://developer.nexmo.com/community/slack)\n\n## Further Reading\n\n- Check out the Developer Documentation at \u003chttps://tokbox.com/developer/\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopentok%2Faccelerator-core-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopentok%2Faccelerator-core-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopentok%2Faccelerator-core-js/lists"}