aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-hub/src/meshbay_hub/static/transport.js
diff options
context:
space:
mode:
Diffstat (limited to 'packages/meshbay-hub/src/meshbay_hub/static/transport.js')
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/transport.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/transport.js b/packages/meshbay-hub/src/meshbay_hub/static/transport.js
index 17886f4..2cdf15d 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/transport.js
+++ b/packages/meshbay-hub/src/meshbay_hub/static/transport.js
@@ -742,12 +742,14 @@ class MeshBayTransport {
// `start` is a seek: the node retires whatever this session was streaming
// and spawns ffmpeg again from there. Omitted or zero is the film's
// beginning, which is what an 0.1 node understands.
+ console.log('[stream] sending stream_req start:', start, 'credits:', credits);
this._send({ type: 'stream_req', v: '0.1', file_id: fileId, credits, start });
}
/** Room for `n` more segments. */
grantStreamCredit(n = 1) {
if (!this._connected) return;
+ console.log('[stream] grant credit:', n);
this._send({ type: 'stream_more', v: '0.1', n });
}
@@ -1200,6 +1202,7 @@ class MeshBayTransport {
return;
}
if (msg.type === 'stream_init') {
+ console.log('[stream] recv stream_init, start:', msg.start, 'codec:', msg.codec, 'handler:', !!this._onStreamInit);
if (this._onStreamInit) this._onStreamInit(msg);
return;
}
@@ -1208,6 +1211,7 @@ class MeshBayTransport {
return;
}
if (msg.type === 'stream_end') {
+ console.log('[stream] recv stream_end');
if (this._onStreamEnd) this._onStreamEnd(msg);
return;
}