This file contains hidden or 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
# For more information on configuration, see: | |
# * Official English Documentation: http://nginx.org/en/docs/ | |
# * Official Russian Documentation: http://nginx.org/ru/docs/ | |
user nginx; | |
worker_processes auto; | |
error_log /var/log/nginx/error.log; | |
pid /run/nginx.pid; | |
# Load dynamic modules. See /usr/share/nginx/README.dynamic. |
This file contains hidden or 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
// First option | |
application.callServer(JSON.stringify({number: 393201122334, clientRef: "my-reference"})) | |
// Second option | |
application.callServer("393201122334_my-ref") | |
// then split the number in your answer NCCO |
This file contains hidden or 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<!-- Latest compiled and minified CSS --> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" | |
integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> | |
<script src="nexmoClient.js"></script> | |
</head> |
This file contains hidden or 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
module.exports.handler = async (event) => { | |
console.log('Received event:', JSON.stringify(event, null, 2)); | |
try { | |
// Function Logic | |
} catch (err) { | |
console.log('[Handler] - Main function: ', err); | |
// Send the error to Third-party monitoring services | |
} | |
}; |
This file contains hidden or 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
Resources: | |
MyFunction: | |
Type: AWS::Lambda::Function | |
Properties: | |
DeadLetterConfig: | |
TargetArn: arn:aws:sqs:us-east-2:123456789012:dlq |
This file contains hidden or 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 currentRetryAttempt = 0; | |
const maxRetryAttempts = 3; | |
const retryAttemptTimeout = 1000; | |
function handleRetryPublisher() { | |
setTimeout(() => { | |
currentRetryAttempt += 1; | |
this.createPublisher(); | |
}, this.retryAttemptTimeout); | |
} |
This file contains hidden or 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 publisher; | |
const handleError = (e) => console.log(e); | |
const startScreenShareWithAudio = async () => { | |
let stream; | |
try { | |
stream = await navigator.mediaDevices.getDisplayMedia({video: true, audio: true}); | |
} catch (e) { | |
handleError(e); | |
} | |
if (stream) { |
This file contains hidden or 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 React, { Component } from 'react'; | |
import { View, Button, TextInput, Text, SafeAreaView } from 'react-native'; | |
import { OTSession, OTPublisher, OTSubscriber, OT } from 'opentok-react-native'; | |
import { Picker } from '@react-native-community/picker'; | |
export default class App extends Component { | |
constructor(props) { | |
super(props); | |
this.apiKey = ''; | |
this.sessionId = |
This file contains hidden or 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
{ | |
project(projectId: 123456) { | |
sessionData { | |
sessions(sessionIds:["YOUR_SESSION_ID"]){ | |
resources { | |
subscriberMinutes, | |
publisherMinutes | |
} | |
} | |
} |
This file contains hidden or 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 publish = Promise.all([ | |
OT.getUserMedia({ | |
videoSource: 'screen' | |
}), | |
OT.getUserMedia({ | |
videoSource: null | |
}) | |
]) | |
.then(([screenStream, micStream]) => { | |
return OT.initPublisher(null, { |