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 ffmpeg from 'fluent-ffmpeg'; | |
import Canvas from 'canvas'; | |
import path from 'path'; | |
import debug from 'debug'; | |
import { Readable } from 'stream'; | |
import fs from 'fs'; | |
const HWM = 90000; | |
const debugFFMPEG = debug('VoteLive:FFMPEG'); | |
const debugCanvas = debug('VoteLive:Canvas'); |
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
// Sample of setting | |
// const setting = { | |
// left: [ | |
// [50, 0], | |
// [1000, 0], | |
// [2000, 0], | |
// [4000, 0], | |
// [8000, 0], | |
// [12000, 0], | |
// [15000, 0], |
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 React, { | |
PropTypes as T, | |
Component, | |
} from 'react'; | |
import radium from 'radium'; | |
import backgroundImage from '../static/images/background.jpg'; | |
const ANIMATION_DURATION = 1000; | |
const opacityAnimation = radium.keyframes({ |
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
<!DOCTYPE html> | |
<html> | |
<body> | |
<div id="player"></div> | |
<script> | |
var apiLoaded = false; | |
var playerReady = false; | |
var player; | |
function onYouTubeIframeAPIReady() { |
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
{ | |
"parserOptions": { | |
"ecmaVersion": 7, | |
"sourceType": "module", | |
"ecmaFeatures": { | |
"jsx": true, | |
} | |
}, | |
"plugins": [ | |
"react", |
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
{ | |
"parserOptions": { | |
"ecmaVersion": 7, | |
"sourceType": "module", | |
"ecmaFeatures": { | |
"jsx": true, | |
} | |
}, | |
"plugins": [ | |
"react", |
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
socket = io.connect('http://10.32.11.196:3000') | |
selfDOM = document.getElementById('self') | |
mainDOM = document.getElementById('main') | |
socket.on 'sourceOffer', (data)-> | |
createAnswer data.sdp | |
socket.on 'sourceAnswer', (data)-> | |
answerSDP = new RTCSessionDescription | |
sdp: data.sdp |
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
express = require('express') | |
SessionSockets = require('session.socket.io') | |
http = require('http') | |
path = require('path') | |
staticFile = require('./routes/static') | |
main = require('./routes/main') | |
app = express() | |
cookieParser = express.cookieParser 'screct' | |
sessionStore = new express.session.MemoryStore() |
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
{ | |
"paymentMethod": "Credit", | |
"orderItems": [{ | |
"ProductId": 1, | |
"quantity": 1, | |
"name": "好棒棒", | |
"description": "好棒棒是誰", | |
"price": 255 | |
}, { | |
"ProductId": 3, |
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
{ | |
"plugins": [ | |
"react" | |
], | |
"ecmaFeatures": { | |
"jsx": true, | |
"modules": true | |
}, | |
"env": { |