Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Master #87

Open
wants to merge 97 commits into
base: 1.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
97 commits
Select commit Hold shift + click to select a range
682bec1
JSDK-1973 Updating twilio-video.js to 2.x.
manjeshbhargav Aug 10, 2018
5242f66
Merge pull request #52 from twilio/2.x
manjeshbhargav Aug 10, 2018
0222790
Fix for https://github.com/twilio/video-quickstart-js/issues/51
manjeshbhargav Sep 4, 2018
521ef3b
Upgrading to [email protected]
manjeshbhargav Dec 1, 2018
f5aa15e
Adding Unified Plan customer advisory to README.md.
manjeshbhargav Dec 11, 2018
7cecbc5
Setting ttl to 4 hours.
manjeshbhargav Mar 14, 2019
b27dd7c
Update twilio-video.js to 2.0.0-beta9
manjeshbhargav May 3, 2019
f737dd5
JSDK-2353 Adding an example for capturing screen using getDisplayMedi…
manjeshbhargav May 14, 2019
5703a7e
JSDK-2352: Update Video JS QuickStart app to listen to events on the …
makarandp0 May 17, 2019
e7d3494
JSDK-2354 - quickstart sample to demonstrate dominant speaker detecti…
makarandp0 May 29, 2019
384703b
JSDK-2356: quick start sample for room state change events (#76)
makarandp0 Jun 3, 2019
4e4ad99
JSDK-2355 QuickStart example for Network Quality API (#81)
manjeshbhargav Jun 6, 2019
0a62e24
media selection sample that works on mobile devices and connect to ro…
makarandp0 Jun 10, 2019
12f5c1e
minor change to helper.js
makarandp0 Jun 10, 2019
ecb4390
Add advisory for breaking changes in Firefox.
manjeshbhargav Jun 10, 2019
420cdf8
Merge branch 'master' of https://github.com/twilio/video-quickstart-js
manjeshbhargav Jun 10, 2019
5e5eaaf
Pin latest release version until 2.0 GA
syerrapragada Jun 11, 2019
adf2fc2
Merge pull request #84 from twilio/syerrapragada-patch-1
syerrapragada Jun 11, 2019
c2cd5b9
Added links to navigate between quick-start and example pages (#91)
aymenn Sep 10, 2019
81ebb44
remove stale advisory
makarandp0 Nov 14, 2019
2a42d23
update to beta15 (#93)
makarandp0 Dec 2, 2019
13fc1e0
update to [email protected] (#99)
makarandp0 Dec 21, 2019
ff7fb46
Added all the necessary folders and files
PikaJoyce Jan 24, 2020
b9f605c
Added example to example html file. Link doesn't go anywhere yet.
PikaJoyce Jan 27, 2020
20f461c
Got the beginnings of the enabling disabling example up and running.
PikaJoyce Jan 28, 2020
ef1fb5f
Got the code snippet to render
PikaJoyce Jan 28, 2020
c73ef74
Got the participants into the same room, working on appending tracks …
PikaJoyce Jan 28, 2020
4a9413a
Audio muting works. Can't get video to unmount from dom on mute
PikaJoyce Jan 29, 2020
32e6394
Cleaned up muting button functions
PikaJoyce Jan 29, 2020
183ceb3
Fixing event handlers
PikaJoyce Jan 29, 2020
4e9e889
Fixed a bug where audio and video buttons were touching each other, p…
PikaJoyce Jan 29, 2020
e7d5a1c
forgot to commit all day. tinkering with some logic for getting the m…
PikaJoyce Jan 31, 2020
d3513b0
Added SVG glyphicons
PikaJoyce Jan 31, 2020
aeebe49
Mute buttons work. Now they're kind of buggy though. I need to go bac…
PikaJoyce Jan 31, 2020
ecda8c2
Attempting to fix some button issues
PikaJoyce Jan 31, 2020
a3ac334
Clean up. Still attempting to fix the buttons not working on the very…
PikaJoyce Jan 31, 2020
8e25dc3
This fixes button not working the first time
PikaJoyce Jan 31, 2020
e143e0b
Shifted some logic out to helper functions
PikaJoyce Jan 31, 2020
5cf9b78
Added more descriptions, removed console logs
PikaJoyce Jan 31, 2020
027274d
Ha more styling for buttons
PikaJoyce Jan 31, 2020
3b214df
I'm done I think
PikaJoyce Jan 31, 2020
c6ac448
Removed function that wasn't being used anymore
PikaJoyce Jan 31, 2020
9821a72
Last minor changes
PikaJoyce Jan 31, 2020
f0dabae
Changed file name, and path to localmediacontrols
PikaJoyce Feb 3, 2020
205a0d1
Added buttons and appropriate click handlers so we arent using innerh…
PikaJoyce Feb 3, 2020
91a6db7
Added requested changes
PikaJoyce Feb 3, 2020
e1fc76c
Fixed helper function issue with video and audio not being removed fr…
PikaJoyce Feb 4, 2020
9c5601a
Some styling changes
PikaJoyce Feb 4, 2020
cfe01d0
Implemented requested changes
PikaJoyce Feb 5, 2020
5e5ed22
Finishing touches
PikaJoyce Feb 5, 2020
09630ce
Removed SVGs replaced with font awesome icons, refactored logic for m…
PikaJoyce Feb 5, 2020
6b15d32
Button restyling
PikaJoyce Feb 5, 2020
f408383
Fixed indentation and added all my semicolons
PikaJoyce Feb 6, 2020
6f5281d
Merge pull request #106 from PikaJoyce/AddExampleForEnablingAndDisabl…
PikaJoyce Feb 6, 2020
219b48d
Updating twilio-video.js to ^2.x
manjeshbhargav Feb 10, 2020
77312da
Added updated styling to be more consistent with examples
PikaJoyce Feb 6, 2020
07e7341
Added icon next to preview my camera button
PikaJoyce Feb 6, 2020
6ee67dc
Removal of name on leaving room for both local and remote participant
PikaJoyce Feb 8, 2020
c851e69
Removing div containers instead of just the name
PikaJoyce Feb 10, 2020
27bb5cc
Added new image that reflects what quickstart UI looks like.
PikaJoyce Feb 10, 2020
184273a
Reverted last env variable change
PikaJoyce Feb 11, 2020
95d7198
Merge pull request #109 from PikaJoyce/RedesignQuickstartUI
PikaJoyce Feb 11, 2020
b124ce3
Fixed API_KEY to API_SID in env file
PikaJoyce Feb 13, 2020
4dc029a
Changed env template back, fixed server file instead.
PikaJoyce Feb 13, 2020
256b928
Merge pull request #111 from twilio/fixingEnvTemplate
PikaJoyce Feb 13, 2020
32ed21d
JSDK-2666: Add remote participant reconnection example (#112)
PikaJoyce Feb 26, 2020
215ea85
Linking to twilio-video-app-react.
manjeshbhargav Mar 13, 2020
86ba2c1
explicitly call getuserMedia before enumerateDevices (#110)
makarandp0 Mar 25, 2020
6aae58e
Adding link to best practices guide. (#114)
manjeshbhargav Apr 13, 2020
5981a29
JSDK-2754: Implement recommendations in best practices guide. (#115)
manjeshbhargav Apr 20, 2020
77124e5
Demonstrating the usage of the isSupported flag. (#124)
manjeshbhargav May 6, 2020
ac8006d
JSDK-2770-QuickstartMobileUI (#122)
PikaJoyce May 7, 2020
a7f035a
JSDK-2770 Mobile Friendly Quickstart Examples (#125)
PikaJoyce May 20, 2020
2182b47
Fix deviceId accessor in mediadevices example (#117)
Jun 22, 2020
4c09139
JSDK-2820 Data Tracks Example (#134)
PikaJoyce Jun 22, 2020
044b869
JSDK-2894 Media Devices Fix (#140)
PikaJoyce Jul 7, 2020
9cf4585
JSDK-2867- Error Handling in Quickstart changes (#144)
PikaJoyce Jul 15, 2020
b2da4f0
JSDK-2911 Update MediaDevices example to use track.restart (#145)
PikaJoyce Jul 21, 2020
f71d413
Updating twilio-video.js to 2.7.2.
manjeshbhargav Oct 2, 2020
cd40b43
JSDK-3015 Adding in CDN for mute/unmute icons (#166)
PikaJoyce Jan 28, 2021
023a46d
JSDK-3564 - Adding Remote view in screen share example (#170)
PikaJoyce Feb 17, 2021
d591843
VIDEO-3563 Small patch to fix audio level indicator (#171)
PikaJoyce Feb 23, 2021
5e0079c
VIDEO-3525 - Adopt VideoProcessor API (#176)
manjeshbhargav Mar 4, 2021
920968b
VIDEO-3928 Fix LocalVideoSnapshot (#180)
PikaJoyce Apr 8, 2021
e9b198f
use only positive adjectives (#181)
kwhinnery Apr 20, 2021
59627b4
VIDEO-5326 Removing renderConnectOptions replacing with new hints con…
PikaJoyce May 13, 2021
de923f1
VIDEO-5327 Manual Render Hints example (#183)
PikaJoyce Jun 15, 2021
595b122
VIDEO-5729 - Auto Render Hints example (#185)
PikaJoyce Jul 6, 2021
3ce440f
VIDEO-6370 - Clean up detached track elements (#192)
PikaJoyce Jul 27, 2021
31580e4
Update twilio-video to 2.18 (#203)
PikaJoyce Oct 27, 2021
6f83377
VIDEO-7710 - Fixing Media Device Selection for Audio Output (#209)
PikaJoyce Feb 3, 2022
cc6cb2e
Update browserify version to fix complie error
Aug 18, 2022
2734a08
Merge pull request #214 from twilio/fix-browserify-issue
Aug 23, 2022
0300c9f
Update README.md with Twilio Video EOL banner
anna-vasilko Dec 6, 2023
f276837
Update README.md with Twilio Video EOL banner
anna-vasilko Dec 6, 2023
dd39ee7
docs: remove the EOL warning banner
luisrivas Oct 15, 2024
52f018a
docs: remove the EOL warning banner (#225)
luisrivas Oct 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 4 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,11 @@ jspm_packages

# Misc
.DS_Store
package-lock.json

# The generated index.js
quickstart/public/index.js
examples/bandwidthconstraints/public/index.js
examples/codecpreferences/public/index.js
examples/localvideofilter/public/index.js
examples/localvideosnapshot/public/index.js
examples/mediadevices/public/index.js
**/public/index.js

# The generated helpers.js
examples/bandwidthconstraints/public/helpers.js
examples/codecpreferences/public/helpers.js
examples/localvideofilter/public/helpers.js
examples/localvideosnapshot/public/helpers.js
examples/mediadevices/public/helpers.js
**/public/helpers.js
**/public/helpers*.js
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@

# 1.0.0
=======

* Updated Media Device Selection app to Connect to Room.
* Added an example app to demonstrate Network quality API.
* Added an example app to demonstrate Room State Changes.
* Added an example app to demonstrate Dominant Speaker API.
* Updated twilio-video to 2.0.0.
* Added an example app to demonstrate Codec Preferences API.
* Added an example app to demonstrate Bandwidth Constraints API.
* Added an example app to demonstrate Local Video Filter.
Expand Down
61 changes: 46 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,47 +1,78 @@
# Twilio Video Quickstart for JavaScript

[![OS X/Linus Build Status](https://secure.travis-ci.org/twilio/video-quickstart-js.png?branch=master)](http://travis-ci.org/twilio/video-quickstart-js) [![Windows Build status](https://ci.appveyor.com/api/projects/status/3u69uy9c0lsap3dr?svg=true
)](https://ci.appveyor.com/project/markandrus/video-quickstart-js)
[![OS X/Linus Build Status](https://secure.travis-ci.org/twilio/video-quickstart-js.png?branch=master)](http://travis-ci.org/twilio/video-quickstart-js) [![Windows Build status](https://ci.appveyor.com/api/projects/status/3u69uy9c0lsap3dr?svg=true)](https://ci.appveyor.com/project/markandrus/video-quickstart-js)

_For Twilio Video 1.x Quickstart, go [here](https://github.com/twilio/video-quickstart-js/tree/1.x)._

## Overview

This application should give you a ready-made starting point for writing your
own video apps with Twilio Video. Before we begin, we need to collect
all the config values we need to run the application:
own video apps with Twilio Video.

![screenshot of chat app](quickstart/public/quickstart.png)

## Setup Requirements

* Account SID: Your primary Twilio account identifier - find this [in the console here](https://www.twilio.com/console).
* API Key: Used to authenticate - [generate one here](https://www.twilio.com/console/runtime/api-keys).
* API Secret: Used to authenticate - [just like the above, you'll get one here](https://www.twilio.com/console/runtime/api-keys).
Before we begin, we need to collect all the config values we need to run the application:

## A Note on API Keys
- Account SID: Your primary Twilio account identifier - find this [in the console here](https://www.twilio.com/console).
- API Key SID: Used to authenticate - [generate one here](https://www.twilio.com/console/runtime/api-keys).
- API Key Secret: Used to authenticate - [just like the above, you'll get one here](https://www.twilio.com/console/runtime/api-keys).

When you generate an API key pair at the URLs above, your API Secret will only
be shown once - make sure to save this in a secure location,
### A Note on API Keys

When you generate an API key pair at the URLs above, your API Key Secret will only
be shown once - make sure to save this in a secure location,
or possibly your `~/.bash_profile`.

## Setting Up The Application

Create a configuration file for your application:

```bash
cp .env.template .env
```

Edit `.env` with the configuration parameters we gathered from above.

Next, we need to install our dependencies from npm:

```bash
npm install
```

## Running The Application

Now we should be all set! Run the application:

```bash
npm start
```

Your application should now be running at [http://localhost:3000](http://localhost:3000). Just enter
the name of the room you want to join and click on 'Join Room'. Then,
open another tab and join the same room. Now, you should see your own
video in both the tabs!
Your application should now be running at [http://localhost:3000](http://localhost:3000). You will
be prompted to test and choose your microphone and camera. On desktop browsers, your choices will
be saved. _On mobile browsers, you will be asked to test and choose your microphone and camera every
time you load the application in order to make sure they are not reserved by another application_.

After choosing your input devices, you will be prompted to enter your Room name and user name, following
which you will join the Room. Now, all you have to do is open another tab and join the same Room in order
to see and hear yourself on both tabs!

[joinroom.js](quickstart/src/joinroom.js) demonstrates how to use the SDK APIs to build a multi-party
video sesssion. You can start building your own application by incorporating this code into your own
application, and build your user interface around it.

## Running On Multiple Devices

You can use [ngrok](https://ngrok.com/) to try your application
on different devices by creating a secure tunnel to your application server:

```bash
ngrok http 3000
```

![screenshot of chat app](https://s3.amazonaws.com/com.twilio.prod.twilio-docs/images/video2.original.png)
You will get a URL of the form `https://a1b2c3d4.ngrok.io` which can be loaded on a browser from a device
different than the one where your application server is running.

## Examples

Expand Down
124 changes: 124 additions & 0 deletions examples/autorenderhint/public/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
@import url('https://fonts.googleapis.com/css?family=Roboto+Mono:300');

html {
height: 100%;
}

body {
height: 100%;
}

[data-toggle="collapse"].collapsed .if-not-collapsed {
display: none;
}

[data-toggle="collapse"]:not(.collapsed) .if-collapsed {
display: none;
}

.align {
align-content: flex-start;
}

div.container-fluid {
height: 100%;
}

div.row {
height: 100%;
}

div.row.thin-gutters {
margin: 0 2px 0 2px;
}

div.row.thin-gutters > .col,
div.row.thin-gutters > [class*="col-"] {
padding: 8px 8px;
}

div.card {
border: none;
overflow-y: auto;
}

div.card-block {
margin: 5px;
}

div.col-sm-6, div.col-sm-6 {
max-height: fit-content;
}


pre.language-javascript {
font-family: 'Roboto Mono', monospace;
font-size: 13px;
}

pre.language-javascript a {
color: aquamarine;
text-decoration: underline;
}

pre.language-javascript a:hover {
text-decoration: none;
}

div#media-container {
position: relative;
display: grid;
grid-template-areas: 'content';
max-width: 100%;
}

span#trackIsSwitchedOff {
position: absolute;
z-index: 3;
width: 67px;
font-size: .9em;
right: 1%;
top: 1%;
align-items: center;
max-width: max-content;
}

video {
width: 100% !important;
height: auto !important;
border: none;
}

div#bg-img {
width: 100% !important;
height: auto !important;
background-color: lightgrey !important;
background-image: url('https://static0.twilio.com/marketing/bundles/archetype/img/logo-wordmark.svg');
background-position: 50%;
background-repeat: no-repeat;
box-sizing: content-box;
}

div.bitrategraph {
margin-top: 5px;
text-align: center;
}

@media (max-width: 900px) {
div.col-sm-8, div.col-sm-4 {
max-width: 100%;
flex: 100%;
}

div.col-sm-8 {
height: 40%;
}

div.col-sm-4 {
height: 60%;
}

pre.language-javascript {
font-size: 12px;
}
}
73 changes: 73 additions & 0 deletions examples/autorenderhint/public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Video Track Automatic Controls</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.2/css/all.css" integrity="sha384-vSIIfh2YWi9wW0r9iZe7RJPrKwp6bG+s9QZMoITbCckVJqGCCRhc+ccxNcdpHuYu" crossorigin="anonymous">
<link rel="stylesheet" href="prism.css">
<link rel="stylesheet" href="index.css">
</head>
<body>
<div class="container-fluid">
<div class="row thin-gutters align">
<div class="col-sm-6">
<div class="card">
<div class="card-block">
<h4 class="card-title">
Video Track Automatic Controls
</h4>
<button class="btn btn-primary collapsed d-md-none" type="button" data-toggle="collapse" data-target="#collapseSnippet" aria-expanded="false" aria-controls="collapseSnippet">
<span class="if-collapsed">Show Code</span>
<span class="if-not-collapsed">Hide Code</span>
</button>
<div class="collapse dont-collapse-sm d-md-block" id="collapseSnippet">
<pre id="shown-snippet" class="language-javascript"></pre>
</div>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="card">
<div class="card-block">
<h4 class="card-title">Remote Video Controls</h4>
<div id="userControls">
<div class="card-block">
Toggle Visibility:
<button id="showVideo" type="button" class="btn btn-primary disabled">Show</button>
<button id="hideVideo" type="button" class="btn btn-primary disabled">Hide</button>
</div>
<div class="card-block">
Video Size:
<select id= "renderDimensionsOption" class="btn btn-primary dropdown-toggle disabled">
<option value="" disabled selected hidden>Render Dimensions</option>
<option value="qHD">960x540</option>
<option value="VGA">640x480</option>
<option value="QCIF">176x144</option>
</select>
</div>
</div>
<div class="card-block">
<h4 class="card-title">Remote Video Track</h4>
<div id="media-container" style="width: 960px; height: 540px">
<div id="bg-img" aria-hidden="true" hidden></div>
<video id="remotevideo" aria-hidden="true"></video>
<span id="trackIsSwitchedOff" class="badge badge-success"></span>
</div>
</div>
<h4 class="card-title">Video Bitrate</h4>
<div id="videobitrategraph" class="bitrategraph">
<canvas id="videobitratecanvas"></canvas>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="index.js"></script>
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
</body>
</html>
Loading