项目作者: twilio

项目描述 :
Twilio’s Programmable Video JavaScript SDK
高级语言: JavaScript
项目地址: git://github.com/twilio/twilio-video.js.git
创建时间: 2015-11-21T01:16:51Z
项目社区:https://github.com/twilio/twilio-video.js

开源协议:Other

下载


twilio-video.js

NPM CircleCI

twilio-video.js allows you to add real-time voice and video to your web apps.

We want your feedback! Please feel free to open a GitHub issue for suggested improvements or feature requests. If you need technical support, contact help@twilio.com.

Changelog

View CHANGELOG.md for details about our releases.

Browser Support

Chrome Edge (Chromium) Firefox Safari WebView
Android - - -
iOS - *
Linux - - -
macOS ✓ ** -
Windows ✓ ** - -

** twilio-video.js supports the Chromium-based Edge browser.

Installation

NPM

  1. npm install twilio-video --save

Using this method, you can require twilio-video.js like so:

  1. const Video = require('twilio-video');

TypeScript definitions can now be imported using this method.

  1. import * as Video from 'twilio-video';
  2. function participantDisconnected(participant: Video.RemoteParticipant) {
  3. console.log('Participant "%s" disconnected', participant.identity);
  4. document.getElementById(participant.sid).remove();
  5. }

Alternatively, you can import just the definitions you need like so:

  1. import { RemoteParticiant } from 'twilio-video';
  2. function participantDisconnected(participant: RemoteParticipant) {
  3. console.log('Participant "%s" disconnected', participant.identity);
  4. document.getElementById(participant.sid).remove();
  5. }

CDN

Releases of twilio-video.js are hosted on a CDN, and you can include these
directly in your web app using a