Compare commits

..

No commits in common. "1e40cc10395df30672bbdf602fb5e24ec3ee9ebf" and "84563d18290b0314db2f8eb7d266662344e54e0c" have entirely different histories.

2 changed files with 13 additions and 16 deletions

View File

@ -64,12 +64,12 @@ async function stream() {
});
};
r.onstart = () => {
setTimeout(() => r.state === 'recording' && r.stop(), 500);
setTimeout(() => r.state === 'recording' && r.stop(), 100);
};
r.start();
}
record();
handle = setInterval(record, 500);
handle = setInterval(record, 100);
}
let audioctx;
@ -114,14 +114,15 @@ function loadStreams() {
render(div, html.node`
<button id='streaming' onclick=${stream}>start streaming</button>
<span>stream name:</span>
<input id='streamname' oninput=${event => {
<input id='streamname'>`);
div.children['streamname'].oninput = event => {
if (handle)
window.emit('stream', {
id: streamid,
thread: window.currentThread.id,
name: event.target.value
name: div.children['streamname'].value
});
}}>`);
};
}
div.insertAdjacentHTML('beforeend', `
<p>streams:</p>

View File

@ -60,7 +60,7 @@ async function stream(msg, respond, socket) {
stream = {
id: newstreamid++,
thread: msg.thread,
user: msg.auth_user.displayname,
user: msg.auth_user.name,
name: msg.name
};
thread.streams.push(stream);
@ -98,11 +98,7 @@ async function streamdata(msg, respond) {
});
}
for (let id in stream.listeners)
stream.listeners[id].emit('streamdata', {
id: msg.id,
audio: msg.audio,
video: msg.video
});
stream.listeners[id].emit('streamdata', msg);
respond({
success: true
});