Skip to content

Instantly share code, notes, and snippets.

View StereoPlaybackMonoCaptureDevice.swift
// DefaultAudioDevice.swift
// 4.Custom-Audio-Driver
// Created by Roberto Perez Cubero on 21/09/2016.
// Copyright © 2016 tokbox. All rights reserved.
import Foundation
import OpenTok
View connect_calls_conf
app.get("/answer", function (req, res) {
console.log("uuid is:"+req.query.uuid);
var ncco = [
action: "conversation",
name: "conf"+req.query.uuid ,
startOnEnter: true,
record: true
View Opentok_Screenshare_WithAudio
var videoConstraints = {};
/* Width and Height optional but, framerate is a must to avoid blinking */
/* videoConstraints.width = 1280;
videoConstraints.height = 720;*/
videoConstraints.frameRate = 25;
var displayMediaStreamConstraints = {
video: videoConstraints,
audio: true
try {
View opentok-faceid
1. sendScreenShot (front-end js) method uses subsciber.getImgData() method to capture screenshot of the subscriber (remote participant) and post it to the server.
2. On the server we use detectFace() method to detect the facial features in this image and we get a identifier for the detected face (id1)
3. we use detectFace() again with the image we want to compare with and we get identifier for the detected face (id2)
4. we use verifyFace() method and pass id1 and id2 as the inputs. Microsoft face API compares these two faces and provides a result that includes match/mismatch as well as a score.
Reference -
1. getImgData() -
2. Microsoft Face API -
rktalusani / WebAudioOpenTok.html
Created Aug 4, 2020
Mix Microphone+Mp3 and use it as audio source for Opentok
View WebAudioOpenTok.html
<script src=""></script>
<audio crossOrigin="anonymous" id="mp3file" controls>
<source src="helix.mp3"/>
<div id="layoutContainer"></div>
<button onclick="startProcess()">Let the magic begin</button>