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