From 8519ee49a2a016a8a71d248441a560d6b8f79c14 Mon Sep 17 00:00:00 2001 From: John-Mark Gurney Date: Thu, 16 Apr 2020 19:27:44 -0700 Subject: [PATCH] first cut of this project, this gets yarn working.. Yarn 2 didn't work as it wouldn't populate node_modules... This is using webpack over browserify for consolidation so that I can import other resources as well... --- .yarnrc | 6 ++++++ NOTES.md | 8 ++++++++ dist/jamming.js | 1 + package.json | 38 ++++++++++++++++++++++++++++++++++++++ src/index.js | 1 + src/jamming.js | 8 ++++++++ 6 files changed, 62 insertions(+) create mode 100644 .yarnrc create mode 100644 NOTES.md create mode 100644 dist/jamming.js create mode 100644 package.json create mode 100644 src/index.js create mode 100644 src/jamming.js diff --git a/.yarnrc b/.yarnrc new file mode 100644 index 0000000..fd8ce08 --- /dev/null +++ b/.yarnrc @@ -0,0 +1,6 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +lastUpdateCheck 1587089837170 +yarn-path ".yarn/releases/yarn-1.22.4.js" diff --git a/NOTES.md b/NOTES.md new file mode 100644 index 0000000..d86b43d --- /dev/null +++ b/NOTES.md @@ -0,0 +1,8 @@ +Audio recorder library: +https://github.com/mattdiamond/Recorderjs + +Sample app that displays frequency of recorded audio: +https://github.com/cwilso/AudioRecorder + +inline-worker is likely NOT needed because Webpack will do the bundling as needed +yarn add 'inline-worker@https://github.com/mohayonao/inline-worker.git#7014cd64c3cd6eb884f6743aad682a995e262bb9' diff --git a/dist/jamming.js b/dist/jamming.js new file mode 100644 index 0000000..f05a0ae --- /dev/null +++ b/dist/jamming.js @@ -0,0 +1 @@ +!function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){"use strict";t.exports=n(1).Jamming},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Jamming=void 0;var r,o=(r=n(2))&&r.__esModule?r:{default:r};function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var u=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),i(this,"otherattr",o.default),i(this,"someattr",5)};e.Jamming=u;var a=u;e.default=a},function(t,e,n){(function(e){var n=!!(e===e.window&&e.URL&&e.Blob&&e.Worker);function r(t,r){var o,i=this;if(r=r||{},n)return o=t.toString().trim().match(/^function\s*\w*\s*\([\w\s,]*\)\s*{([\w\W]*?)}$/)[1],new e.Worker(e.URL.createObjectURL(new e.Blob([o],{type:"text/javascript"})));this.self=r,this.self.postMessage=function(t){setTimeout((function(){i.onmessage({data:t})}),0)},setTimeout(t.bind(r,r),0)}r.prototype.postMessage=function(t){var e=this;setTimeout((function(){e.self.onmessage({data:t})}),0)},t.exports=r}).call(this,n(3))},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n}]); \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..e13ca00 --- /dev/null +++ b/package.json @@ -0,0 +1,38 @@ +{ + "name": "jamming", + "version": "0.1.0", + "description": "Library to handle low latency audio conferencing.", + "main": "lib/index.js", + "private": true, + "scripts": { + "build": "yarn run build:lib && yarn run build:webpack", + "build:lib": "babel src/ -d lib/", + "build:webpack": "webpack lib/index.js -o dist/jamming.js", + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "John-Mark Gurney ", + "license": "BSD-3-Clause", + "browserslist": "> 0.25%, not dead", + "babel": { + "presets": [ + "@babel/preset-env" + ], + "plugins": [ + [ + "@babel/plugin-proposal-class-properties" + ] + ] + }, + "devDependencies": { + "@babel/cli": "^7.8.4", + "@babel/core": "^7.9.0", + "@babel/plugin-proposal-class-properties": "^7.8.3", + "@babel/preset-env": "^7.9.5", + "babelify": "^10.0.0", + "webpack": "^4.42.1", + "webpack-cli": "^3.3.11" + }, + "dependencies": { + "inline-worker": "https://github.com/mohayonao/inline-worker.git#7014cd64c3cd6eb884f6743aad682a995e262bb9" + } +} diff --git a/src/index.js b/src/index.js new file mode 100644 index 0000000..5b319d9 --- /dev/null +++ b/src/index.js @@ -0,0 +1 @@ +module.exports = require("./jamming").Jamming; diff --git a/src/jamming.js b/src/jamming.js new file mode 100644 index 0000000..9e58c13 --- /dev/null +++ b/src/jamming.js @@ -0,0 +1,8 @@ +import InlineWorker from 'inline-worker'; + +export class Jamming { + otherattr = InlineWorker; + someattr = 5; +}; + +export default Jamming;