How to use openvidu-node-client - 10 common examples

To help you get started, we’ve selected a few openvidu-node-client examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github OpenVidu / openvidu / openvidu-testapp / src / app / components / test-scenarios / test-scenarios.component.ts View on Github external
users: SessionConf[] = [];
  connections: string[] = [];
  publishers: StreamManagerWrapper[] = [];
  subscribers: { connectionId: string, subs: StreamManagerWrapper[] }[] = [];
  totalNumberOfStreams = 0;
  manyToMany = 2;
  oneToMany = 2;

  // OpenVidu Browser objects
  OVs: OpenVidu[] = [];
  sessions: Session[] = [];

  // OpenVidu Node Client objects
  OV_NodeClient: OpenViduAPI;
  sessionProperties: SessionPropertiesAPI = {
    mediaMode: MediaMode.ROUTED,
    recordingMode: RecordingMode.MANUAL,
    defaultRecordingLayout: RecordingLayout.BEST_FIT,
    defaultCustomLayout: '',
    customSessionId: ''
  };

  turnConf = 'auto';
  manualTurnConf: RTCIceServer = { urls: [] };

  publisherProperties: PublisherProperties = {
    audioSource: false,
    videoSource: undefined,
    frameRate: 2,
    resolution: '320x240',
    mirror: true,
    publishAudio: true,
github OpenVidu / openvidu / openvidu-testapp / src / app / components / openvidu-instance / openvidu-instance.component.ts View on Github external
disablePublishTo = false;
  disableSendAudio = false;
  disableSendVideo = false;
  disableActiveAudio = false;
  disableActiveVideo = false;
  disableRadioButtons = false;

  // OpenVidu Browser objects
  OV: OpenVidu;
  session: Session;
  publisher: Publisher;
  subscribers = {};

  // OpenVidu Node Client objects
  sessionProperties: SessionPropertiesAPI = {
    mediaMode: MediaMode.ROUTED,
    recordingMode: RecordingMode.MANUAL,
    defaultRecordingLayout: RecordingLayout.BEST_FIT,
    defaultCustomLayout: '',
    customSessionId: ''
  };

  // Session audio and video status
  audioMuted = false;
  videoMuted = false;
  unpublished = false;
  publisherChanged = false;
  audioIcon = 'mic';
  videoIcon = 'videocam';
  publishIcon = 'stop';

  sendAudioChange: boolean;
github OpenVidu / openvidu / openvidu-testapp / src / app / components / openvidu-instance / openvidu-instance.component.ts View on Github external
disableSendVideo = false;
  disableActiveAudio = false;
  disableActiveVideo = false;
  disableRadioButtons = false;

  // OpenVidu Browser objects
  OV: OpenVidu;
  session: Session;
  publisher: Publisher;
  subscribers = {};

  // OpenVidu Node Client objects
  sessionProperties: SessionPropertiesAPI = {
    mediaMode: MediaMode.ROUTED,
    recordingMode: RecordingMode.MANUAL,
    defaultRecordingLayout: RecordingLayout.BEST_FIT,
    defaultCustomLayout: '',
    customSessionId: ''
  };

  // Session audio and video status
  audioMuted = false;
  videoMuted = false;
  unpublished = false;
  publisherChanged = false;
  audioIcon = 'mic';
  videoIcon = 'videocam';
  publishIcon = 'stop';

  sendAudioChange: boolean;
  sendVideoChange: boolean;
github OpenVidu / openvidu / openvidu-testapp / src / app / components / test-scenarios / test-scenarios.component.ts View on Github external
publishers: StreamManagerWrapper[] = [];
  subscribers: { connectionId: string, subs: StreamManagerWrapper[] }[] = [];
  totalNumberOfStreams = 0;
  manyToMany = 2;
  oneToMany = 2;

  // OpenVidu Browser objects
  OVs: OpenVidu[] = [];
  sessions: Session[] = [];

  // OpenVidu Node Client objects
  OV_NodeClient: OpenViduAPI;
  sessionProperties: SessionPropertiesAPI = {
    mediaMode: MediaMode.ROUTED,
    recordingMode: RecordingMode.MANUAL,
    defaultRecordingLayout: RecordingLayout.BEST_FIT,
    defaultCustomLayout: '',
    customSessionId: ''
  };

  turnConf = 'auto';
  manualTurnConf: RTCIceServer = { urls: [] };

  publisherProperties: PublisherProperties = {
    audioSource: false,
    videoSource: undefined,
    frameRate: 2,
    resolution: '320x240',
    mirror: true,
    publishAudio: true,
    publishVideo: true
  };
github OpenVidu / openvidu / openvidu-testapp / src / app / components / openvidu-instance / openvidu-instance.component.ts View on Github external
disableSendAudio = false;
  disableSendVideo = false;
  disableActiveAudio = false;
  disableActiveVideo = false;
  disableRadioButtons = false;

  // OpenVidu Browser objects
  OV: OpenVidu;
  session: Session;
  publisher: Publisher;
  subscribers = {};

  // OpenVidu Node Client objects
  sessionProperties: SessionPropertiesAPI = {
    mediaMode: MediaMode.ROUTED,
    recordingMode: RecordingMode.MANUAL,
    defaultRecordingLayout: RecordingLayout.BEST_FIT,
    defaultCustomLayout: '',
    customSessionId: ''
  };

  // Session audio and video status
  audioMuted = false;
  videoMuted = false;
  unpublished = false;
  publisherChanged = false;
  audioIcon = 'mic';
  videoIcon = 'videocam';
  publishIcon = 'stop';

  sendAudioChange: boolean;
  sendVideoChange: boolean;
github OpenVidu / openvidu / openvidu-testapp / src / app / components / test-scenarios / test-scenarios.component.ts View on Github external
connections: string[] = [];
  publishers: StreamManagerWrapper[] = [];
  subscribers: { connectionId: string, subs: StreamManagerWrapper[] }[] = [];
  totalNumberOfStreams = 0;
  manyToMany = 2;
  oneToMany = 2;

  // OpenVidu Browser objects
  OVs: OpenVidu[] = [];
  sessions: Session[] = [];

  // OpenVidu Node Client objects
  OV_NodeClient: OpenViduAPI;
  sessionProperties: SessionPropertiesAPI = {
    mediaMode: MediaMode.ROUTED,
    recordingMode: RecordingMode.MANUAL,
    defaultRecordingLayout: RecordingLayout.BEST_FIT,
    defaultCustomLayout: '',
    customSessionId: ''
  };

  turnConf = 'auto';
  manualTurnConf: RTCIceServer = { urls: [] };

  publisherProperties: PublisherProperties = {
    audioSource: false,
    videoSource: undefined,
    frameRate: 2,
    resolution: '320x240',
    mirror: true,
    publishAudio: true,
    publishVideo: true
github OpenVidu / openvidu-tutorials / openvidu-js-node / server.js View on Github external
/* CONFIGURATION */

var OpenVidu = require('openvidu-node-client').OpenVidu;
var Session = require('openvidu-node-client').Session;
var OpenViduRole = require('openvidu-node-client').OpenViduRole;
var TokenOptions = require('openvidu-node-client').TokenOptions;

// Check launch arguments: must receive openvidu-server URL and the secret
if (process.argv.length != 4) {
    console.log("Usage: node " + __filename + " OPENVIDU_URL OPENVIDU_SECRET");
    process.exit(-1);
}
// For demo purposes we ignore self-signed certificate
process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0"

// Node imports
var express = require('express');
var fs = require('fs');
var session = require('express-session');
var https = require('https');
var bodyParser = require('body-parser'); // Pull information from HTML POST (express4)
github OpenVidu / openvidu-tutorials / openvidu-mvc-node / server.js View on Github external
/* CONFIGURATION */

var OpenVidu = require('openvidu-node-client').OpenVidu;
var OpenViduRole = require('openvidu-node-client').OpenViduRole;

// Check launch arguments: must receive openvidu-server URL and the secret
if (process.argv.length != 4) {
    console.log("Usage: node " + __filename + " OPENVIDU_URL OPENVIDU_SECRET");
    process.exit(-1);
}
// For demo purposes we ignore self-signed certificate
process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0"

// Node imports
var express = require('express');
var fs = require('fs');
var session = require('express-session');
var https = require('https');
var bodyParser = require('body-parser'); // Pull information from HTML POST (express4)
var app = express(); // Create our app with express
github OpenVidu / openvidu-tutorials / openvidu-recording-node / server.js View on Github external
/* CONFIGURATION */

var OpenVidu = require('openvidu-node-client').OpenVidu;
var OpenViduRole = require('openvidu-node-client').OpenViduRole;

// Check launch arguments: must receive openvidu-server URL and the secret
if (process.argv.length != 4) {
    console.log("Usage: node " + __filename + " OPENVIDU_URL OPENVIDU_SECRET");
    process.exit(-1);
}
// For demo purposes we ignore self-signed certificate
process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0"

// Node imports
var express = require('express');
var fs = require('fs');
var https = require('https');
var bodyParser = require('body-parser'); // Pull information from HTML POST (express4)
var app = express(); // Create our app with express
github OpenVidu / openvidu-tutorials / openvidu-js-node / server.js View on Github external
/* CONFIGURATION */

var OpenVidu = require('openvidu-node-client').OpenVidu;
var Session = require('openvidu-node-client').Session;
var OpenViduRole = require('openvidu-node-client').OpenViduRole;
var TokenOptions = require('openvidu-node-client').TokenOptions;

// Check launch arguments: must receive openvidu-server URL and the secret
if (process.argv.length != 4) {
    console.log("Usage: node " + __filename + " OPENVIDU_URL OPENVIDU_SECRET");
    process.exit(-1);
}
// For demo purposes we ignore self-signed certificate
process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0"

// Node imports
var express = require('express');
var fs = require('fs');
var session = require('express-session');
var https = require('https');