Fix: Firefox compatibility

This commit is contained in:
Chrystian Huot 2019-07-09 10:33:54 -04:00
parent deb5216f57
commit e18b6302ac
6 changed files with 20 additions and 22 deletions

View file

@ -7,10 +7,6 @@
} }
.radio-button { .radio-button {
align-content: center;
display: inline-flex;
flex-direction: row;
justify-content: center;
line-height: normal; line-height: normal;
} }

View file

@ -241,8 +241,8 @@ export class AppRadioService implements OnDestroy {
stop(): void { stop(): void {
if (this._call.current) { if (this._call.current) {
this._audio.pause(); this._audio.pause();
this._audio.src = null; // this._audio.src = null;
this._audio.load(); // this._audio.load();
this._call.previous = this._call.current; this._call.previous = this._call.current;
this._call.current = null; this._call.current = null;

View file

@ -4,16 +4,16 @@ api="http://127.0.0.1:3000/upload"
key="b29eb8b9-9bcd-4e6e-bb4f-d244ada12736" key="b29eb8b9-9bcd-4e6e-bb4f-d244ada12736"
basename="${2%.*}" basename="${2%.*}"
aacfile="$basename.aac"
jsonfile="$basename.json" jsonfile="$basename.json"
mpegfile="$basename.aac"
system=$1 system=$1
wavfile="$basename.wav" wavfile="$basename.wav"
exec >/dev/null 2>&1 exec >/dev/null 2>&1
nice -n 19 ffmpeg -i "$wavfile" -af dynaudnorm=m=20 "$mpegfile" && \ nice -n 19 ffmpeg -i "$wavfile" -af dynaudnorm=m=20 "$aacfile" && \
curl $api \ curl $api \
-F "audio=@$mpegfile;type=audio/mpeg" \ -F "audio=@$aacfile;type=audio/aac" \
-F "json=@$jsonfile;type=application/json" \ -F "json=@$jsonfile;type=application/json" \
-F "key=$key" \ -F "key=$key" \
-F "system=$system" \ -F "system=$system" \

18
package-lock.json generated
View file

@ -123,9 +123,9 @@
} }
}, },
"@babel/runtime": { "@babel/runtime": {
"version": "7.5.1", "version": "7.5.2",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.5.1.tgz", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.5.2.tgz",
"integrity": "sha512-g+hmPKs16iewFSmW57NkH9xpPkuYD1RV3UE2BCkXx9j+nhhRb9hsiSxPmEa67j35IecTQdn4iyMtHMbt5VoREg==", "integrity": "sha512-9M29wrrP7//JBGX70+IrDuD1w4iOYhUGpJNMQJVNAXue+cFeFlMTqBECouIziXPUphlgrfjcfiEpGX4t0WGK4g==",
"requires": { "requires": {
"regenerator-runtime": "^0.13.2" "regenerator-runtime": "^0.13.2"
} }
@ -160,9 +160,9 @@
} }
}, },
"@types/node": { "@types/node": {
"version": "12.0.12", "version": "12.6.1",
"resolved": "https://registry.npmjs.org/@types/node/-/node-12.0.12.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-12.6.1.tgz",
"integrity": "sha512-Uy0PN4R5vgBUXFoJrKryf5aTk3kJ8Rv3PdlHjl6UaX+Cqp1QE0yPQ68MPXGrZOfG7gZVNDIJZYyot0B9ubXUrQ==", "integrity": "sha512-rp7La3m845mSESCgsJePNL/JQyhkOJA6G4vcwvVgkDAwHhGdq5GCumxmPjEk1MZf+8p5ZQAUE7tqgQRQTXN7uQ==",
"dev": true "dev": true
}, },
"@types/prop-types": { "@types/prop-types": {
@ -3668,9 +3668,9 @@
} }
}, },
"typescript": { "typescript": {
"version": "3.5.2", "version": "3.5.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.5.2.tgz", "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.5.3.tgz",
"integrity": "sha512-7KxJovlYhTX5RaRbUdkAXN1KUZ8PwWlTzQdHV6xNqvuFOs7+WBo10TQUqT19Q/Jz2hk5v9TQDIhyLhhJY4p5AA==", "integrity": "sha512-ACzBtm/PhXBDId6a6sDJfroT2pOWt/oOnk4/dElG5G33ZL776N3Y6/6bKZJBFpd+b05F3Ct9qDjMeJmRWtE2/g==",
"dev": true "dev": true
}, },
"uid-safe": { "uid-safe": {

View file

@ -15,7 +15,7 @@
"@angular/platform-browser": "8.1.0", "@angular/platform-browser": "8.1.0",
"@angular/platform-browser-dynamic": "8.1.0", "@angular/platform-browser-dynamic": "8.1.0",
"@angular/router": "8.1.0", "@angular/router": "8.1.0",
"@babel/runtime": "7.5.1", "@babel/runtime": "7.5.2",
"bcrypt": "^3.0.6", "bcrypt": "^3.0.6",
"core-js": "3.1.4", "core-js": "3.1.4",
"hammerjs": "^2.0.8", "hammerjs": "^2.0.8",
@ -29,9 +29,9 @@
"@angular/compiler-cli": "8.1.0", "@angular/compiler-cli": "8.1.0",
"@types/meteor": "1.4.28", "@types/meteor": "1.4.28",
"@types/multiparty": "0.0.32", "@types/multiparty": "0.0.32",
"@types/node": "^12.0.12", "@types/node": "^12.6.1",
"codelyzer": "^5.1.0", "codelyzer": "^5.1.0",
"tslint": "^5.18.0", "tslint": "^5.18.0",
"typescript": "3.5.2" "typescript": "3.5.3"
} }
} }

View file

@ -13,6 +13,7 @@ if (Meteor.isServer) {
let audio = ''; let audio = '';
let json = ''; let json = '';
let key = ''; let key = '';
let mimeType = '';
let system = ''; let system = '';
form.on('part', (part) => { form.on('part', (part) => {
@ -20,6 +21,7 @@ if (Meteor.isServer) {
switch (part.name.toLowerCase()) { switch (part.name.toLowerCase()) {
case 'audio': case 'audio':
audio += data.toString('binary'); audio += data.toString('binary');
mimeType = part.headers['content-type'];
break; break;
case 'json': case 'json':
json += data.toString('utf8'); json += data.toString('utf8');
@ -42,7 +44,7 @@ if (Meteor.isServer) {
if (key && Array.isArray(apiKeys) && apiKeys.find((apiKey) => apiKey === key)) { if (key && Array.isArray(apiKeys) && apiKeys.find((apiKey) => apiKey === key)) {
try { try {
const call = new Call(Object.assign({}, JSON.parse(json), { const call = new Call(Object.assign({}, JSON.parse(json), {
audio: urlEncode('audio/mpeg', audio), audio: urlEncode(mimeType, audio),
system, system,
})); }));