fixed api and stopping delay
This commit is contained in:
@@ -147,7 +147,7 @@ router.get('/:id/proxy', requireUser, async (req, res) => {
|
|||||||
// the fetch but without the AbortController rejection that escapes the
|
// the fetch but without the AbortController rejection that escapes the
|
||||||
// async route in older Node/Electron versions.
|
// async route in older Node/Electron versions.
|
||||||
const reader = upstream.body.getReader();
|
const reader = upstream.body.getReader();
|
||||||
req.on('close', () => { reader.cancel().catch(() => {}); });
|
req.on('close', () => { reader.cancel().catch(() => { }); });
|
||||||
const pump = async () => {
|
const pump = async () => {
|
||||||
try {
|
try {
|
||||||
while (true) {
|
while (true) {
|
||||||
@@ -163,7 +163,7 @@ router.get('/:id/proxy', requireUser, async (req, res) => {
|
|||||||
try { res.end(); } catch { }
|
try { res.end(); } catch { }
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
pump().catch(() => {});
|
pump().catch(() => { });
|
||||||
});
|
});
|
||||||
|
|
||||||
function guessContentType(format) {
|
function guessContentType(format) {
|
||||||
|
|||||||
@@ -294,7 +294,7 @@ export class Player {
|
|||||||
// anyway, so the ramp would just be cancelled a quantum later.
|
// anyway, so the ramp would just be cancelled a quantum later.
|
||||||
this._outputMuted = true;
|
this._outputMuted = true;
|
||||||
const gain = this.audio[GAIN_KEY];
|
const gain = this.audio[GAIN_KEY];
|
||||||
const ctx = this.audio[CTX_KEY];
|
const ctx = this.audio[CTX_KEY];
|
||||||
if (gain && ctx) {
|
if (gain && ctx) {
|
||||||
try {
|
try {
|
||||||
gain.gain.cancelScheduledValues(ctx.currentTime);
|
gain.gain.cancelScheduledValues(ctx.currentTime);
|
||||||
|
|||||||
Reference in New Issue
Block a user