mirror of
https://github.com/chuot/rdio-scanner.git
synced 2026-08-13 16:33:01 -06:00
Fix: Firefox compatibility
This commit is contained in:
parent
deb5216f57
commit
e18b6302ac
|
|
@ -7,10 +7,6 @@
|
|||
}
|
||||
|
||||
.radio-button {
|
||||
align-content: center;
|
||||
display: inline-flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -241,8 +241,8 @@ export class AppRadioService implements OnDestroy {
|
|||
stop(): void {
|
||||
if (this._call.current) {
|
||||
this._audio.pause();
|
||||
this._audio.src = null;
|
||||
this._audio.load();
|
||||
// this._audio.src = null;
|
||||
// this._audio.load();
|
||||
|
||||
this._call.previous = this._call.current;
|
||||
this._call.current = null;
|
||||
|
|
|
|||
|
|
@ -4,16 +4,16 @@ api="http://127.0.0.1:3000/upload"
|
|||
key="b29eb8b9-9bcd-4e6e-bb4f-d244ada12736"
|
||||
|
||||
basename="${2%.*}"
|
||||
aacfile="$basename.aac"
|
||||
jsonfile="$basename.json"
|
||||
mpegfile="$basename.aac"
|
||||
system=$1
|
||||
wavfile="$basename.wav"
|
||||
|
||||
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 \
|
||||
-F "audio=@$mpegfile;type=audio/mpeg" \
|
||||
-F "audio=@$aacfile;type=audio/aac" \
|
||||
-F "json=@$jsonfile;type=application/json" \
|
||||
-F "key=$key" \
|
||||
-F "system=$system" \
|
||||
|
|
|
|||
18
package-lock.json
generated
18
package-lock.json
generated
|
|
@ -123,9 +123,9 @@
|
|||
}
|
||||
},
|
||||
"@babel/runtime": {
|
||||
"version": "7.5.1",
|
||||
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.5.1.tgz",
|
||||
"integrity": "sha512-g+hmPKs16iewFSmW57NkH9xpPkuYD1RV3UE2BCkXx9j+nhhRb9hsiSxPmEa67j35IecTQdn4iyMtHMbt5VoREg==",
|
||||
"version": "7.5.2",
|
||||
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.5.2.tgz",
|
||||
"integrity": "sha512-9M29wrrP7//JBGX70+IrDuD1w4iOYhUGpJNMQJVNAXue+cFeFlMTqBECouIziXPUphlgrfjcfiEpGX4t0WGK4g==",
|
||||
"requires": {
|
||||
"regenerator-runtime": "^0.13.2"
|
||||
}
|
||||
|
|
@ -160,9 +160,9 @@
|
|||
}
|
||||
},
|
||||
"@types/node": {
|
||||
"version": "12.0.12",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-12.0.12.tgz",
|
||||
"integrity": "sha512-Uy0PN4R5vgBUXFoJrKryf5aTk3kJ8Rv3PdlHjl6UaX+Cqp1QE0yPQ68MPXGrZOfG7gZVNDIJZYyot0B9ubXUrQ==",
|
||||
"version": "12.6.1",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-12.6.1.tgz",
|
||||
"integrity": "sha512-rp7La3m845mSESCgsJePNL/JQyhkOJA6G4vcwvVgkDAwHhGdq5GCumxmPjEk1MZf+8p5ZQAUE7tqgQRQTXN7uQ==",
|
||||
"dev": true
|
||||
},
|
||||
"@types/prop-types": {
|
||||
|
|
@ -3668,9 +3668,9 @@
|
|||
}
|
||||
},
|
||||
"typescript": {
|
||||
"version": "3.5.2",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.5.2.tgz",
|
||||
"integrity": "sha512-7KxJovlYhTX5RaRbUdkAXN1KUZ8PwWlTzQdHV6xNqvuFOs7+WBo10TQUqT19Q/Jz2hk5v9TQDIhyLhhJY4p5AA==",
|
||||
"version": "3.5.3",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.5.3.tgz",
|
||||
"integrity": "sha512-ACzBtm/PhXBDId6a6sDJfroT2pOWt/oOnk4/dElG5G33ZL776N3Y6/6bKZJBFpd+b05F3Ct9qDjMeJmRWtE2/g==",
|
||||
"dev": true
|
||||
},
|
||||
"uid-safe": {
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
"@angular/platform-browser": "8.1.0",
|
||||
"@angular/platform-browser-dynamic": "8.1.0",
|
||||
"@angular/router": "8.1.0",
|
||||
"@babel/runtime": "7.5.1",
|
||||
"@babel/runtime": "7.5.2",
|
||||
"bcrypt": "^3.0.6",
|
||||
"core-js": "3.1.4",
|
||||
"hammerjs": "^2.0.8",
|
||||
|
|
@ -29,9 +29,9 @@
|
|||
"@angular/compiler-cli": "8.1.0",
|
||||
"@types/meteor": "1.4.28",
|
||||
"@types/multiparty": "0.0.32",
|
||||
"@types/node": "^12.0.12",
|
||||
"@types/node": "^12.6.1",
|
||||
"codelyzer": "^5.1.0",
|
||||
"tslint": "^5.18.0",
|
||||
"typescript": "3.5.2"
|
||||
"typescript": "3.5.3"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ if (Meteor.isServer) {
|
|||
let audio = '';
|
||||
let json = '';
|
||||
let key = '';
|
||||
let mimeType = '';
|
||||
let system = '';
|
||||
|
||||
form.on('part', (part) => {
|
||||
|
|
@ -20,6 +21,7 @@ if (Meteor.isServer) {
|
|||
switch (part.name.toLowerCase()) {
|
||||
case 'audio':
|
||||
audio += data.toString('binary');
|
||||
mimeType = part.headers['content-type'];
|
||||
break;
|
||||
case 'json':
|
||||
json += data.toString('utf8');
|
||||
|
|
@ -42,7 +44,7 @@ if (Meteor.isServer) {
|
|||
if (key && Array.isArray(apiKeys) && apiKeys.find((apiKey) => apiKey === key)) {
|
||||
try {
|
||||
const call = new Call(Object.assign({}, JSON.parse(json), {
|
||||
audio: urlEncode('audio/mpeg', audio),
|
||||
audio: urlEncode(mimeType, audio),
|
||||
system,
|
||||
}));
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue