Change how we load shared files from flash

This commit is contained in:
Oswaldo Acauan 2017-03-08 13:49:44 +00:00
parent 9600910319
commit 5f495f35a0
4 changed files with 8 additions and 32 deletions

View File

@ -9,7 +9,6 @@ arunoda:npm@0.2.6
amplify
blaze@2.1.8
francocatena:status
mrt:external-file-loader@0.1.4
mizzao:timesync
clinical:nightwatch
cfs:power-queue

View File

@ -56,7 +56,6 @@ modules@0.7.9
modules-runtime@0.7.9
mongo@1.1.15
mongo-id@1.0.6
mrt:external-file-loader@0.1.4
nathantreid:css-modules@2.4.0
npm-mongo@2.2.16_1
observe-sequence@1.0.15

View File

@ -4,4 +4,12 @@
</head>
<body>
<div id="app" role="application"></div>
<script src="/client/lib/sip.js"></script>
<script src="/client/lib/bbb_webrtc_bridge_sip.js"></script>
<script src="/client/lib/bbblogger.js"></script>
<script src="/client/lib/jquery.json-2.4.min.js"></script>
<script src="/client/lib/jquery.FSRTC.js"></script>
<script src="/client/lib/jquery.verto.js"></script>
<script src="/client/lib/verto_extension.js"></script>
<script src="/client/lib/jquery.jsonrpcclient.js"></script>
</body>

View File

@ -37,38 +37,8 @@ function setMessages(data) {
setAudio();
}
// Helper to load javascript libraries from the BBB server
function loadLib(libname, success, fail) {
const successCallback = function (cb) {
console.log(`successfully loaded lib - ${this}`);
if (typeof (cb) == 'function' || cb instanceof Function) {
cb();
}
};
const failCallback = function (cb, issue) {
console.error(`failed to load lib - ${this}`);
console.error(issue);
if (typeof (cb) == 'function' || cb instanceof Function) {
cb();
}
};
return Meteor.Loader.loadJs(`${window.location.origin}/client/lib/${libname}`,
successCallback.bind(libname, success), 10000).fail(failCallback.bind(libname, fail));
};
Meteor.startup(() => {
loadLib('sip.js');
loadLib('bbb_webrtc_bridge_sip.js');
loadLib('bbblogger.js');
loadLib('jquery.json-2.4.min.js');
loadLib('jquery.FSRTC.js');
loadLib('jquery.verto.js');
loadLib('verto_extension.js');
loadLib('jquery.jsonrpcclient.js');
loadUserSettings();
let browserLanguage = navigator.language; //set this manually to force localization in a specific language