Comments (1)
Hey @Barathiraja I'm not a developer at Twilio, but I do have experience in JS. The code here is perfectly fine because, in JS, functions can be passed as variables without calling them.
listen().then
wants a function to run after the conversationsClient starts listening. clientConnected
is the function we want to run after we start listening, so we pass it without parens to the .then
function. If we used the parens, we would evaluate clientConnected
and then pass the output of that function to the .then
method, but .then
expects a function that it runs by itself.
It's the same for the second, except the .then
method passes conversationsStarted
the conversationsParameter
automatically.
from video-access-token-server-node.
Related Issues (16)
- JavaScript formatting
- Twilio Version 3.0.0-rc.11 Cannot read property 'ConversationsGrant' of undefined
- Could not connect to Twilio: undefined
- example .env file contains wrong instance variables
- Under Firefox HOT 1
- Could not connect to Twilio: Connect failed HOT 2
- twilio-video.js:22574Uncaught CONFIGURATION_ERROR: Invalid value "BrashIsaacCucamonga@AC09a1614d63623449a5c6def171a9063e';.endpoint.twilio.com" for parameter "uri" HOT 1
- Audio? HOT 2
- HTML Formatting
- Illegal constructor
- how can i set the expire time?
- Convert all tabs to spaces
- JavaScript formatting
- Should mention Account SID must be Live HOT 1
- Really lost here. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from video-access-token-server-node.