Skip to content

Instantly share code, notes, and snippets.

@hthetiot
Created March 13, 2016 22:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hthetiot/0faac27c16429c904ec8 to your computer and use it in GitHub Desktop.
Save hthetiot/0faac27c16429c904ec8 to your computer and use it in GitHub Desktop.
EasyRTC requireJS
/* global window, require */
require.config({
waitSeconds: 60,
paths: {
easyrtc: '../bower_components/easyrtc/api/easyrtc',
socketio: '../bower_components/socket.io-client/socket.io'
},
shim: {
socketio: {
exports: 'io'
},
easyrtc: {
deps: ['socketio'],
exports: 'easyrtc',
init: function (socketio) {
"use strict";
// Require by easyrtc
window.io = socketio;
}
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment