This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let videoElement, canvas, ctx, publisher, session, screenElement; | |
let stopped = false; | |
const handleError = e => console.log(e); | |
(async () => { | |
OT.setLogLevel(5) | |
session = OT.initSession(API_KEY, SESSION_ID) | |
try { | |
stream = await OT.getUserMedia(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express'); | |
const axios = require('axios'); | |
const bodyParser = require('body-parser'); | |
const jwt = require('jsonwebtoken'); | |
const { apiKey, apiSecret, sessionId } = require('./config'); | |
const app = express(); | |
app.use(bodyParser.urlencoded({ | |
extended: true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib.request | |
import urllib.error | |
try: | |
response = urllib.request.urlopen("https://preview.opentok.com/tls-check.json").read() | |
print ("Connection successfully established with your current TLS configuration, no further action required") | |
except urllib.error.URLError: | |
print ("Failed to connect to OpenTok, please check your system and upgrade your environment as needed.") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib2 | |
try: | |
response = urllib2.urlopen("https://preview.opentok.com/tls-check.json").read() | |
print "Connection successfully established with your current TLS configuration, no further action required" | |
except urllib2.URLError: | |
print "Failed to connect to OpenTok, please check your system and upgrade your environment as needed." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.net.URL; | |
import java.net.HttpURLConnection; | |
import java.net.MalformedURLException; | |
import java.net.SocketException; | |
import java.io.IOException; | |
class TestTls { | |
public static void main(String[] args){ | |
URL url = null; | |
try { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "net/https" | |
begin | |
uri = URI('https://preview.opentok.com/tls-check.json') | |
res = Net::HTTP.get(uri) | |
puts 'Connection successfully established with your current TLS configuration, no further action required.' | |
rescue Errno::ECONNRESET => e | |
puts 'Failed to connect to OpenTok, please check your system and upgrade your environment as needed.' | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Net; | |
namespace ConsoleApp1 | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
WebRequest request = WebRequest.Create( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$curl = curl_init(); | |
curl_setopt_array($curl, array( | |
CURLOPT_RETURNTRANSFER => 1, | |
CURLOPT_URL => 'https://preview.opentok.com/tls-check.json', | |
)); | |
$curlResponse = curl_exec($curl); | |
if ($curlResponse === false && curl_errno($curl) === 35) { | |
echo "Failed to connect to OpenTok, please check your system and upgrade your environment as needed."; | |
} elseif($curlResponse === false){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var https = require("https"); | |
var req = https.request({ | |
host: "preview.opentok.com", | |
port: "443", | |
path: "tls-check.json", | |
method: "GET", | |
}, function (res) { | |
res.on("data", function (data) { | |
console.log("Connection successfully established with your current TLS configuration, no further action required."); | |
}); |