aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/live-ingest-test.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/live-ingest-test.js b/tools/live-ingest-test.js
index 3af0456..d1b15e0 100644
--- a/tools/live-ingest-test.js
+++ b/tools/live-ingest-test.js
@@ -86,6 +86,9 @@ try {
check('...H.264 at most 1280 on its long side, AAC sound', v?.codec_name === 'h264' && Math.max(v.width, v.height) <= 1280 && v.height > v.width && au?.codec_name === 'aac', v && `${v.codec_name} ${v.width}x${v.height} ${au?.codec_name}`);
const st = await (await fetch(`${HTTP}/${id}/stats`)).json();
check('the watcher who fetched the playlist is counted', st.viewers === 1 && st.state === 'live', JSON.stringify(st));
+ // WebRTC (Cloudflare's SFU) needs its key in the config: here there's none, and the app keeps to HLS
+ check('with no SFU key, no WebRTC: stats say so, and watch/publish answer 501', st.rtc === null
+ && (await fetch(`${HTTP}/${id}/rtc/watch`, { method: 'POST' })).status === 501 && (await fetch(`${HTTP}/${id}/rtc/publish`, { method: 'POST', body: '{}' })).status === 501);
console.log('\n[a sender that drops comes back]');
a.ws.close();