Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module system + submodules + build script #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
libfec.js
src/c_src/emscripten/
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are build directories in the emscripten process

src/c_src/js/
src/c_src/licenses
12 changes: 12 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[submodule "src/c_src/quiet"]
path = src/c_src/quiet
url = https://github.com/quiet/quiet
[submodule "src/c_src/jansson"]
path = src/c_src/jansson
url = https://github.com/akheron/jansson
[submodule "src/c_src/liquid-dsp"]
path = src/c_src/liquid-dsp
url = https://github.com/quiet/liquid-dsp
[submodule "src/c_src/libcorrect"]
path = src/c_src/libcorrect
url = https://github.com/quiet/libcorrect
3 changes: 1 addition & 2 deletions examples/text/receivetext.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@

<script type="text/javascript" src="/quiet.js"></script>
<script type="text/javascript" src="receivetext.js"></script>
<script async type="text/javascript" src="/quiet-emscripten.js"></script>
</head>
<body>
<div class="hidden" data-quiet-profile-name="audible"></div>
<div class="hidden" data-quiet-profile-name="ultrasonic-experimental"></div>
<div class="wrapper">
<header>
<h1>Receive Text</h1>
Expand Down
7 changes: 4 additions & 3 deletions examples/text/receivetext.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
var TextReceiver = (function() {
Quiet.init({
profilesPrefix: "/",
memoryInitializerPrefix: "/",
libfecPrefix: "/"
profilesPath: "/quiet-profiles.json",
memoryInitializerPath: "/quiet-emscripten.js.mem",
emscriptenPath: "/quiet-emscripten.js"

});
var target;
var content = new ArrayBuffer(0);
Expand Down
3 changes: 1 addition & 2 deletions examples/text/sendtext.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@

<script type="text/javascript" src="/quiet.js"></script>
<script type="text/javascript" src="sendtext.js"></script>
<script async type="text/javascript" src="/quiet-emscripten.js"></script>
</head>
<body>
<div class="hidden" data-quiet-profile-name="audible"></div>
<div class="hidden" data-quiet-profile-name="ultrasonic-experimental"></div>
<div class="wrapper">
<header>
<h1>Send Text</h1>
Expand Down
8 changes: 4 additions & 4 deletions examples/text/sendtext.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
var TextTransmitter = (function() {
Quiet.init({
profilesPrefix: "/",
memoryInitializerPrefix: "/",
libfecPrefix: "/"
profilesPath: "/quiet-profiles.json",
memoryInitializerPath: "/quiet-emscripten.js.mem",
emscriptenPath: "/quiet-emscripten.js"
});
var btn;
var textbox;
Expand Down Expand Up @@ -34,7 +34,7 @@ var TextTransmitter = (function() {

function onQuietReady() {
var profilename = document.querySelector('[data-quiet-profile-name]').getAttribute('data-quiet-profile-name');
transmit = Quiet.transmitter({profile: profilename, onFinish: onTransmitFinish});
transmit = Quiet.transmitter({profile: profilename, onFinish: onTransmitFinish, clampFrame: false});
btn.addEventListener('click', onClick, false);
};

Expand Down
18 changes: 18 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file may well not do anything either

"name": "quiet.js",
"version": "1.1.0",
"description": "Send data using Web Audio",
"main": "output/library.js",
"scripts": {
"build": "webpack --env build"
},
"license": "SEE LICENSE IN LICENSE",
"devDependencies": {
"webpack": "^3.11.0"
},
"dependencies": {
"@babel/core": "^7.0.0-beta.40",
"@babel/preset-env": "^7.0.0-beta.40",
"babel-loader": "^8.0.0-beta.0"
}
}
23 changes: 15 additions & 8 deletions quiet-emscripten.js

Large diffs are not rendered by default.

Binary file modified quiet-emscripten.js.mem
Binary file not shown.