Add comments

This commit is contained in:
Artyom Abubakirov 2018-05-28 23:29:55 +05:00
parent 077a7d127e
commit b268d2fa80

View File

@ -473,11 +473,11 @@ function gotCustomStream(stream) {
function startSharing(){ function startSharing(){
if(!window.stream){ if(!window.stream){
console.log('windows.steam not found'); console.log('windos.stream not found');
return; return;
} }
recordedBlobs = []; //recordedBlobs = [];
websocket = io('https://kurento.fishrungames.com/'); websocket = io('https://kurento.fishrungames.com/');
@ -513,13 +513,13 @@ function startSharing(){
//here //here
mediaRecorder.ondataavailable = handleDataAvailable; mediaRecorder.ondataavailable = handleDataAvailable;
mediaRecorder.start(60); // collect data mediaRecorder.start(60); // collect data per 60ms
} }
function handleDataAvailable(event) { function handleDataAvailable(event) {
if (event.data && event.data.size > 0) { if (event.data && event.data.size > 0) {
recordedBlobs.push(event.data); //recordedBlobs.push(event.data);
websocket.emit('blob', event.data); websocket.emit('blob', event.data);
} }