Restrict frame-rate on video stream

This commit is contained in:
Nicola 2020-03-24 22:46:51 +11:00
parent 86f82c1247
commit 29d868d5f5

View File

@ -49,9 +49,17 @@ function useSession(onConnectionOpen, onConnectionSync) {
function handleOpen(id) { function handleOpen(id) {
setPeerId(id); setPeerId(id);
getUserMedia({ video: true, audio: true }, stream => { getUserMedia(
{
video: {
frameRate: { ideal: 15, max: 20 }
},
audio: true
},
stream => {
addStream(stream, id); addStream(stream, id);
}); }
);
} }
function handleConnection(connection) { function handleConnection(connection) {