pagecall
TypeScript icon, indicating that this package has built-in type declarations

1.6.0 • Public • Published

PageCall SDK NodeJS

1. Install

npm install --save pagecall

2. Import

ES6+

import {PageCall} from 'pagecall';

Javascript

const PageCall = require('pagecall').PageCall;

3. Initiate

const pagecall = new PageCall({
  apiKey: '<API key as string>',
  apiSecret: '<secret as string>',
  apiEndPoint: '<API Endpoint as url>' // ex) https://api-endpoint.com
});

4. Use example

use with router handler

  • more than two users with same publicRoomId can meet each other.
router.post('/join-meeting', function(req, res){
  pagecall.connectIn({
    userId: req.body.userId,
    publicRoomId: req.body.publicRoomId,
    allowedTime: '60', // 60 minutes limit, 
    template: JSON.stringify({
      language: 'ko',
      videoPosition: 'fixed', 
      optionalTools: { shape: true, textbox: false },
    })
  }).then(function(data) {
    res.send(data.html); // << client has to render this html.
  });
});

A part of the following interface can be template

interface Template {
  language: 'ko' | 'en',
  videoPosition: 'floating' | 'fixed',
  optionalTools: { shape?: boolean, textbox?: boolean},
  chat: boolean,
  memo: boolean,
  host: boolean,
  userList: boolean,
  pushToTalk: boolean
}

Package Sidebar

Install

npm i pagecall

Weekly Downloads

1

Version

1.6.0

License

MIT

Unpacked Size

115 kB

Total Files

34

Last publish

Collaborators

  • jurungpark