Skip to content

Commit

Permalink
Initial commit: migrate all samples from nw-sample-apps repository.
Browse files Browse the repository at this point in the history
  • Loading branch information
hokein committed May 14, 2015
0 parents commit 32717ce
Show file tree
Hide file tree
Showing 324 changed files with 105,191 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.DS_Store
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Sample apps for Electron

This repository is migrated from [nw-sample-apps](https://github.com/zcbenz/nw-sample-apps), allowing the sample apps run on [electron](https://github.com/atom/electron).

All the sample test on v0.26.0.

## How to run apps

https://github.com/atom/electron/blob/master/docs/tutorial/quick-start.md
9 changes: 9 additions & 0 deletions camera/app.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
html, body, video {
height: 100%;
width: 100%;
margin: 0;
}

video {
display: block;
}
8 changes: 8 additions & 0 deletions camera/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
navigator.webkitGetUserMedia({video: true},
function(stream) {
document.getElementById('camera').src = URL.createObjectURL(stream);
},
function() {
alert('could not connect stream');
}
);
12 changes: 12 additions & 0 deletions camera/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html>
<head>
<title>Camera Test</title>
<link rel="stylesheet" href="app.css">
<script src="jquery.js"></script>
<script src="app.js"></script>
</head>
<body>
<video id="camera" autoplay> </video>
</body>
</html>
Loading

0 comments on commit 32717ce

Please sign in to comment.