this works for me in nw 0.9.2
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
<html>
<head>
<title></title>
</head>
<body onload="init();" >
<video id='vd'></video>
<script>
function init(){
var constraints = {
video: {
mandatory: {
maxWidth: window.screen.width,
maxHeight: window.screen.height,
maxFrameRate: 30,
chromeMediaSource: 'screen'
}
}
};
// constraints = {video: true, audio: true};
console.log(constraints);
navigator.webkitGetUserMedia(constraints, function(localSource){
console.log(localSource);
vd.src = webkitURL.createObjectURL(localSource);
},function(err){
console.log('error',err);
});
}
</script>
</body>
</html>