--
---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
function start() {
trace("Requesting local stream");
btn1.disabled = true;
var vgaConstraints = {
video: {
mandatory: {
maxWidth: 640,
maxHeight: 360
}
}
};
var video_constraints = {
mandatory: {
chromeMediaSource: 'screen',
maxWidth: 1280,
maxHeight: 720
},
optional: []
};
navigator.webkitGetUserMedia( { audio: false,
video: video_constraints
}, gotStream, function(e){
console.log("getUserMedia error: ", e);
});
}
var video_constraints =
{ audio: false,
video: {
mandatory: {
chromeMediaSource: 'screen',
maxWidth: screen.width,
maxHeight: screen.height,
minFrameRate: 1,
maxFrameRate: 5
}
}
};
navigator.webkitGetUserMedia(video_constraints, gotStream, function(e){
console.log("getUserMedia error: ", e);
});
var video_constraints = {
mandatory: {
chromeMediaSource: 'screen',
minWidth: 1024, // above 640 causes permission denied
minHeight: 768,
//minAspectRatio: 1.333, maxAspectRatio: 1.334,
},
optional: []
};
var video_constraints = {
mandatory: {
chromeMediaSource: 'screen',
minAspectRatio: 1, maxAspectRatio: 3
},
optional: [
{ minFrameRate: 60 },
{ maxWidth: 1920 },
{ maxHeigth: 1080 },
{ minWidth: 1280},
{ minHeight: 720}
]
};
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | <!DOCTYPE html> <html> <head> <meta http-equiv="X-UA-Compatible" content="chrome=1" /> <base target="_blank"> <title>Screen capture</title> <script> btn1.disabled = false; var localstream; function start() { console.log("Requesting local stream"); btn1.disabled = true; var video_constraints = { |
audio: false, video: { mandatory: { chromeMediaSource: 'screen', |
maxWidth: 1024, maxHeight: 768, minWidth:800, minHeight:400, minFrameRate: 1, maxFrameRate: 2, //minAspectRatio: 1.333, maxAspectRatio: 1.334, } } }; navigator.webkitGetUserMedia(video_constraints, function(stream){ console.log("Received local stream"); vid1.src = webkitURL.createObjectURL(stream); localstream = stream; |
}, function(e){ console.log("getUserMedia error: ", e); }); } |
</script> </head> <body> <!-- Step 0 --> <button id="btn1" onclick="start()">Start</button> <video id="vid1" autoplay ondblclick="webkitEnterFullscreen();" width="1024" height="768"></video> <canvas id="canvas" width="800" height="400" ondblclick="webkitEnterFullscreen();"></canvas> <!-- Step 1 --> <script src="https://code.jquery.com/jquery-1.9.1.min.js"></script> <script> //var canvas = $("#canvas"); //var ctx = canvas.get()[0].getContext('2d'); //var video = document.getElementById('vid1'); //setInterval(function () { //ctx.drawImage(video, 0, 0); //var data = canvas[0].toDataURL("image/jpeg"); //$.post( "http://upload.frame.per.second.to.web.server/ajax/preview", { username: 'TP1', preview:data} ); //},5000); </script> </body> </html> |
When you file the issues. Could you also add your test results from the Dev build of Chrome.
/Serge from my phone.
--