Skip to content

Instantly share code, notes, and snippets.

Specification Keyword RGB hex value
CSS Level 1 black #000000
CSS Level 1 silver #c0c0c0
CSS Level 1 gray #808080
CSS Level 1 white #ffffff
CSS Level 1 maroon #800000
CSS Level 1 red #ff0000
CSS Level 1 purple #800080
CSS Level 1 fuchsia #ff00ff
CSS Level 1 green #008000
@jamalag
jamalag / App.js
Created October 17, 2019 16:45
WebRTC Let's learn together
import React, { Component } from 'react';
class App extends Component {
constructor(props) {
super(props)
// https://reactjs.org/docs/refs-and-the-dom.html
this.localVideoref = React.createRef()
this.remoteVideoref = React.createRef()
}
// Based on WebRTC Tutorial Series by Amir Eshaq
// https://www.youtube.com/watch?v=h2WkZ0h0-Rc&t=1s (Part 1)
// https://www.youtube.com/watch?v=UMy6vV4tW00&t=44s (Part 2)
import React, { Component } from 'react';
import Pusher from 'pusher-js'
import axios from 'axios'
// Pusher.logToConsole = true;
// taken from: https://pusher.com/tutorials/react-websockets
// npm install --save axios body-parser cors express pusher pusher-js
const Pusher = require('pusher');
const express = require('express');
const bodyParser = require('body-parser');
const cors = require('cors');
const app = express();