diff --git a/web-service/server/src/public/js/bundle.js b/web-service/server/src/public/js/bundle.js index ffcb9f6c04980c3a68b0fc9bb8f259c5f2f20bf5..6fc067c31a29898b06d8187fe3782bc2ca90f23e 100644 --- a/web-service/server/src/public/js/bundle.js +++ b/web-service/server/src/public/js/bundle.js @@ -383,7 +383,7 @@ BufferList.prototype._match = function(offset, search) { module.exports = BufferList -},{"readable-stream":19,"safe-buffer":20,"util":39}],2:[function(require,module,exports){ +},{"readable-stream":18,"safe-buffer":19,"util":39}],2:[function(require,module,exports){ (function (Buffer){ // Copyright Joyent, Inc. and other Node contributors. // @@ -493,8 +493,8 @@ function objectToString(o) { return Object.prototype.toString.call(o); } -}).call(this,{"isBuffer":require("../../../../../../../../../usr/local/lib/node_modules/browserify/node_modules/is-buffer/index.js")}) -},{"../../../../../../../../../usr/local/lib/node_modules/browserify/node_modules/is-buffer/index.js":33}],3:[function(require,module,exports){ +}).call(this,{"isBuffer":require("../../../../../../../../../../../usr/lib/node_modules/watchify/node_modules/is-buffer/index.js")}) +},{"../../../../../../../../../../../usr/lib/node_modules/watchify/node_modules/is-buffer/index.js":33}],3:[function(require,module,exports){ if (typeof Object.create === 'function') { // implementation from standard node.js 'util' module module.exports = function inherits(ctor, superCtor) { @@ -613,7 +613,7 @@ function msgpack (options) { module.exports = msgpack -},{"./lib/decoder":6,"./lib/encoder":7,"./lib/streams":8,"assert":24,"bl":1,"safe-buffer":20}],6:[function(require,module,exports){ +},{"./lib/decoder":6,"./lib/encoder":7,"./lib/streams":8,"assert":24,"bl":1,"safe-buffer":19}],6:[function(require,module,exports){ 'use strict' var bl = require('bl') @@ -1396,7 +1396,7 @@ function encodeFloat (obj, forceFloat64) { return buf } -},{"bl":1,"safe-buffer":20}],8:[function(require,module,exports){ +},{"bl":1,"safe-buffer":19}],8:[function(require,module,exports){ 'use strict' var Transform = require('readable-stream').Transform @@ -1488,7 +1488,7 @@ Decoder.prototype._transform = function (buf, enc, done) { module.exports.decoder = Decoder module.exports.encoder = Encoder -},{"bl":1,"inherits":3,"readable-stream":19}],9:[function(require,module,exports){ +},{"bl":1,"inherits":3,"readable-stream":18}],9:[function(require,module,exports){ (function (process){ 'use strict'; @@ -2739,7 +2739,7 @@ function indexOf(xs, x) { return -1; } }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./_stream_duplex":10,"./internal/streams/BufferList":15,"./internal/streams/destroy":16,"./internal/streams/stream":17,"_process":35,"core-util-is":2,"events":31,"inherits":3,"isarray":4,"process-nextick-args":9,"safe-buffer":20,"string_decoder/":18,"util":29}],13:[function(require,module,exports){ +},{"./_stream_duplex":10,"./internal/streams/BufferList":15,"./internal/streams/destroy":16,"./internal/streams/stream":17,"_process":35,"core-util-is":2,"events":31,"inherits":3,"isarray":4,"process-nextick-args":9,"safe-buffer":19,"string_decoder/":20,"util":29}],13:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -3644,7 +3644,7 @@ Writable.prototype._destroy = function (err, cb) { cb(err); }; }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("timers").setImmediate) -},{"./_stream_duplex":10,"./internal/streams/destroy":16,"./internal/streams/stream":17,"_process":35,"core-util-is":2,"inherits":3,"process-nextick-args":9,"safe-buffer":20,"timers":36,"util-deprecate":21}],15:[function(require,module,exports){ +},{"./_stream_duplex":10,"./internal/streams/destroy":16,"./internal/streams/stream":17,"_process":35,"core-util-is":2,"inherits":3,"process-nextick-args":9,"safe-buffer":19,"timers":36,"util-deprecate":21}],15:[function(require,module,exports){ 'use strict'; function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } @@ -3724,7 +3724,7 @@ if (util && util.inspect && util.inspect.custom) { return this.constructor.name + ' ' + obj; }; } -},{"safe-buffer":20,"util":29}],16:[function(require,module,exports){ +},{"safe-buffer":19,"util":29}],16:[function(require,module,exports){ 'use strict'; /*<replacement>*/ @@ -3803,6 +3803,79 @@ module.exports = { module.exports = require('events').EventEmitter; },{"events":31}],18:[function(require,module,exports){ +exports = module.exports = require('./lib/_stream_readable.js'); +exports.Stream = exports; +exports.Readable = exports; +exports.Writable = require('./lib/_stream_writable.js'); +exports.Duplex = require('./lib/_stream_duplex.js'); +exports.Transform = require('./lib/_stream_transform.js'); +exports.PassThrough = require('./lib/_stream_passthrough.js'); + +},{"./lib/_stream_duplex.js":10,"./lib/_stream_passthrough.js":11,"./lib/_stream_readable.js":12,"./lib/_stream_transform.js":13,"./lib/_stream_writable.js":14}],19:[function(require,module,exports){ +/* eslint-disable node/no-deprecated-api */ +var buffer = require('buffer') +var Buffer = buffer.Buffer + +// alternative to using Object.keys for old browsers +function copyProps (src, dst) { + for (var key in src) { + dst[key] = src[key] + } +} +if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) { + module.exports = buffer +} else { + // Copy properties from require('buffer') + copyProps(buffer, exports) + exports.Buffer = SafeBuffer +} + +function SafeBuffer (arg, encodingOrOffset, length) { + return Buffer(arg, encodingOrOffset, length) +} + +// Copy static methods from Buffer +copyProps(Buffer, SafeBuffer) + +SafeBuffer.from = function (arg, encodingOrOffset, length) { + if (typeof arg === 'number') { + throw new TypeError('Argument must not be a number') + } + return Buffer(arg, encodingOrOffset, length) +} + +SafeBuffer.alloc = function (size, fill, encoding) { + if (typeof size !== 'number') { + throw new TypeError('Argument must be a number') + } + var buf = Buffer(size) + if (fill !== undefined) { + if (typeof encoding === 'string') { + buf.fill(fill, encoding) + } else { + buf.fill(fill) + } + } else { + buf.fill(0) + } + return buf +} + +SafeBuffer.allocUnsafe = function (size) { + if (typeof size !== 'number') { + throw new TypeError('Argument must be a number') + } + return Buffer(size) +} + +SafeBuffer.allocUnsafeSlow = function (size) { + if (typeof size !== 'number') { + throw new TypeError('Argument must be a number') + } + return buffer.SlowBuffer(size) +} + +},{"buffer":30}],20:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -4099,80 +4172,7 @@ function simpleWrite(buf) { function simpleEnd(buf) { return buf && buf.length ? this.write(buf) : ''; } -},{"safe-buffer":20}],19:[function(require,module,exports){ -exports = module.exports = require('./lib/_stream_readable.js'); -exports.Stream = exports; -exports.Readable = exports; -exports.Writable = require('./lib/_stream_writable.js'); -exports.Duplex = require('./lib/_stream_duplex.js'); -exports.Transform = require('./lib/_stream_transform.js'); -exports.PassThrough = require('./lib/_stream_passthrough.js'); - -},{"./lib/_stream_duplex.js":10,"./lib/_stream_passthrough.js":11,"./lib/_stream_readable.js":12,"./lib/_stream_transform.js":13,"./lib/_stream_writable.js":14}],20:[function(require,module,exports){ -/* eslint-disable node/no-deprecated-api */ -var buffer = require('buffer') -var Buffer = buffer.Buffer - -// alternative to using Object.keys for old browsers -function copyProps (src, dst) { - for (var key in src) { - dst[key] = src[key] - } -} -if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) { - module.exports = buffer -} else { - // Copy properties from require('buffer') - copyProps(buffer, exports) - exports.Buffer = SafeBuffer -} - -function SafeBuffer (arg, encodingOrOffset, length) { - return Buffer(arg, encodingOrOffset, length) -} - -// Copy static methods from Buffer -copyProps(Buffer, SafeBuffer) - -SafeBuffer.from = function (arg, encodingOrOffset, length) { - if (typeof arg === 'number') { - throw new TypeError('Argument must not be a number') - } - return Buffer(arg, encodingOrOffset, length) -} - -SafeBuffer.alloc = function (size, fill, encoding) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - var buf = Buffer(size) - if (fill !== undefined) { - if (typeof encoding === 'string') { - buf.fill(fill, encoding) - } else { - buf.fill(fill) - } - } else { - buf.fill(0) - } - return buf -} - -SafeBuffer.allocUnsafe = function (size) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - return Buffer(size) -} - -SafeBuffer.allocUnsafeSlow = function (size) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - return buffer.SlowBuffer(size) -} - -},{"buffer":30}],21:[function(require,module,exports){ +},{"safe-buffer":19}],21:[function(require,module,exports){ (function (global){ /** @@ -4555,7 +4555,7 @@ handleLogin = () => { * Returns a list of available streams */ getAvailableStreams = async () => { - const streamsInJson = await fetch('http://localhost:8080/streams'); + const streamsInJson = await fetch('https://130.232.253.14:8080/streams'); const streams = await streamsInJson.json(); console.log('AVAILABLE', streams) return streams; @@ -4586,7 +4586,7 @@ renderThumbnails = async () => { current_data.uri = encodedURI console.log("THUMBNAIL[i]", thumbnails[i]) try{ - const someData = await fetch(`http://localhost:8080/stream/rgb?uri=${encodedURI}`) + const someData = await fetch(`https://130.232.253.14:8080/stream/rgb?uri=${encodedURI}`) console.log('SOME DATA', someData) if(!someData.ok){ throw new Error('Image not found') @@ -4661,7 +4661,7 @@ createCard = (url, viewers) => { createPeer = () => { - const ws = new WebSocket('ws://localhost:8080/'); + const ws = new WebSocket('ws://130.232.253.14:8080/'); ws.binaryType = "arraybuffer"; peer = new Peer(ws) console.log("peer", peer) @@ -4680,7 +4680,7 @@ connectToStream = () => { } closeStream = () => { - peer.sock.close() + peer.close() } const cardLogic = () => { diff --git a/web-service/server/src/public/js/index.js b/web-service/server/src/public/js/index.js index aea83f3210a475bfda53dde07277312710867ede..1bcdc9afd4da2d3bd3dfec5ccfab480188ef39a3 100644 --- a/web-service/server/src/public/js/index.js +++ b/web-service/server/src/public/js/index.js @@ -35,7 +35,7 @@ handleLogin = () => { * Returns a list of available streams */ getAvailableStreams = async () => { - const streamsInJson = await fetch('http://localhost:8080/streams'); + const streamsInJson = await fetch('https://130.232.253.14:8080/streams'); const streams = await streamsInJson.json(); console.log('AVAILABLE', streams) return streams; @@ -66,7 +66,7 @@ renderThumbnails = async () => { current_data.uri = encodedURI console.log("THUMBNAIL[i]", thumbnails[i]) try{ - const someData = await fetch(`http://localhost:8080/stream/rgb?uri=${encodedURI}`) + const someData = await fetch(`https://130.232.253.14:8080/stream/rgb?uri=${encodedURI}`) console.log('SOME DATA', someData) if(!someData.ok){ throw new Error('Image not found') @@ -141,7 +141,7 @@ createCard = (url, viewers) => { createPeer = () => { - const ws = new WebSocket('ws://localhost:8080/'); + const ws = new WebSocket('ws://130.232.253.14:8080/'); ws.binaryType = "arraybuffer"; peer = new Peer(ws) console.log("peer", peer)