Comparar commits
6 Commits
| Autor | SHA1 | Data | |
|---|---|---|---|
| a0a9a38427 | |||
| 270fb8fcbf | |||
| a4a4acf109 | |||
| 660206b3f4 | |||
| 9b9c29a2df | |||
| b1b2967654 |
@@ -0,0 +1,26 @@
|
||||
0.1.0 / 2012-10-20
|
||||
==================
|
||||
|
||||
* Initial version, unreleased
|
||||
|
||||
0.2.0 / 2012-10-20
|
||||
==================
|
||||
|
||||
* released as npm package dronestream
|
||||
|
||||
1.0.0 / 2012-12-15
|
||||
==================
|
||||
|
||||
* add support for multiple browser clients
|
||||
* add support for browser reloads
|
||||
* reconnect to drone on failure
|
||||
* add support for bare http sockers
|
||||
* remove express dependency
|
||||
* export as a module
|
||||
* added examples for using in other applications
|
||||
|
||||
1.0.1 / 2012-12-16
|
||||
==================
|
||||
|
||||
* update documentation
|
||||
* add changelog
|
||||
+28
-6
@@ -3,8 +3,6 @@
|
||||
Get a realtime live video stream from your
|
||||
[Parrot AR Drone 2.0](http://ardrone2.parrot.com/) straight to your browser.
|
||||
|
||||
## Documentation is a little out of date, please check the two examples for now!
|
||||
|
||||
## Requirements
|
||||
|
||||
You'll need a decent and current browser and some cpu horsepower.
|
||||
@@ -12,6 +10,27 @@ This code uses web-sockets and the incredibly awesome
|
||||
[Broadway.js](https://github.com/mbebenita/Broadway) to render the video frames
|
||||
in your browser using a WebGL canvas.
|
||||
|
||||
## How to use
|
||||
|
||||
Please see the http.createServer and Express 3.0 examples in the 'examples' dir.
|
||||
You attach the stream to your server like this:
|
||||
```javascript
|
||||
// in node:
|
||||
//
|
||||
// note that the 'server' object points to a server instance and NOT an express app.
|
||||
require("dronestream").listen(server);
|
||||
```
|
||||
|
||||
We serve the client in the same manner as Socket.IO. Add a reference to
|
||||
**/dronestream/nodecopter-client.js** in your template. Then attach the stream to a DOM node:
|
||||
```html
|
||||
<!-- on the client -->
|
||||
<script src="/dronestream/nodecopter-client.js"></script>
|
||||
<script>
|
||||
// video canvas will auto-size to the DOM-node, or default to 640*360 if no size is set.
|
||||
new NodecopterStream(document.getElementById("droneStream"));
|
||||
</script>
|
||||
```
|
||||
|
||||
## How it works
|
||||
|
||||
@@ -24,10 +43,9 @@ In the browser broadway takes care of the rendering of the WebGL canvas.
|
||||
|
||||
## Status
|
||||
|
||||
For this release I was exclusively interested in the lowest possible latency.
|
||||
There is no error handling for the websockets, the connection to the drone or
|
||||
the video player what-so-ever. This may come eventually, or may not. I think it
|
||||
is enough to be used as a starting point for your own integration.
|
||||
Node-dronestream has gained some stability in the last release. It attempts
|
||||
to recover lost connections to the drone, and it handles multiple clients,
|
||||
disconnections, etc. See "How to use" for API.
|
||||
|
||||
## Thanks
|
||||
|
||||
@@ -49,3 +67,7 @@ is enough to be used as a starting point for your own integration.
|
||||
|
||||
- @karlwestin for picking up where I was to lazy to actually make this usable.
|
||||
|
||||
## Demo
|
||||
|
||||
Watch @felixge demoing node-dronestream live at german user group cgnjs:
|
||||
http://www.youtube.com/watch?v=nwGNNMJt4mE&t=19m52
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
var express = require('express')
|
||||
, routes = require('./routes')
|
||||
, app = express()
|
||||
, path = require('path')
|
||||
, server = require("http").createServer(app)
|
||||
;
|
||||
|
||||
|
||||
app.configure(function () {
|
||||
app.set('views', __dirname + '/views');
|
||||
app.set('view engine', 'jade', { pretty: true });
|
||||
app.use(express.favicon());
|
||||
app.use(express.logger('dev'));
|
||||
app.use(app.router);
|
||||
app.use(express.static(path.join(__dirname, 'public')));
|
||||
});
|
||||
|
||||
app.configure('development', function () {
|
||||
app.use(express.errorHandler());
|
||||
app.locals.pretty = true;
|
||||
});
|
||||
|
||||
app.get('/', routes.index);
|
||||
|
||||
/*
|
||||
* Important:
|
||||
*
|
||||
* pass in the server object to listen, not the express app
|
||||
* call 'listen' on the server, not the express app
|
||||
*/
|
||||
// should be require("node-dronestream").listen(server)
|
||||
require("../lib/server").listen(server);
|
||||
server.listen(3000);
|
||||
@@ -1,13 +0,0 @@
|
||||
{
|
||||
"name": "dronestream-example",
|
||||
"version": "0.1.0",
|
||||
"dependencies": {
|
||||
"express": "3.0.0rc5",
|
||||
"jade": "*"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "node app"
|
||||
},
|
||||
"author": "Bernhard K. Weisshuhn <bkw@codingforce.com>",
|
||||
"license": "BSD"
|
||||
}
|
||||
-50
@@ -1,50 +0,0 @@
|
||||
/*! normalize.css v1.0.1 | MIT License | git.io/normalize */
|
||||
article,aside,details,figcaption,figure,footer,header,hgroup,nav,section,summary{display:block}
|
||||
audio,canvas,video{display:inline-block;*display:inline;*zoom:1}
|
||||
audio:not([controls]){display:none;height:0}
|
||||
[hidden]{display:none}
|
||||
html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}
|
||||
html,button,input,select,textarea{font-family:sans-serif}
|
||||
body{margin:0}
|
||||
a:focus{outline:thin dotted}
|
||||
a:active,a:hover{outline:0}
|
||||
h1{font-size:2em;margin:.67em 0}
|
||||
h2{font-size:1.5em;margin:.83em 0}
|
||||
h3{font-size:1.17em;margin:1em 0}
|
||||
h4{font-size:1em;margin:1.33em 0}
|
||||
h5{font-size:.83em;margin:1.67em 0}
|
||||
h6{font-size:.75em;margin:2.33em 0}
|
||||
abbr[title]{border-bottom:1px dotted}
|
||||
b,strong{font-weight:bold}
|
||||
blockquote{margin:1em 40px}
|
||||
dfn{font-style:italic}
|
||||
mark{background:#ff0;color:#000}
|
||||
p,pre{margin:1em 0}
|
||||
code,kbd,pre,samp{font-family:monospace,serif;_font-family:'courier new',monospace;font-size:1em}
|
||||
pre{white-space:pre;white-space:pre-wrap;word-wrap:break-word}
|
||||
q{quotes:none}
|
||||
q:before,q:after{content:'';content:none}
|
||||
small{font-size:80%}
|
||||
sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}
|
||||
sup{top:-0.5em}
|
||||
sub{bottom:-0.25em}
|
||||
dl,menu,ol,ul{margin:1em 0}
|
||||
dd{margin:0 0 0 40px}
|
||||
menu,ol,ul{padding:0 0 0 40px}
|
||||
nav ul,nav ol{list-style:none;list-style-image:none}
|
||||
img{border:0;-ms-interpolation-mode:bicubic}
|
||||
svg:not(:root){overflow:hidden}
|
||||
figure{margin:0}
|
||||
form{margin:0}
|
||||
fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:.35em .625em .75em}
|
||||
legend{border:0;padding:0;white-space:normal;*margin-left:-7px}
|
||||
button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle}
|
||||
button,input{line-height:normal}
|
||||
button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer;*overflow:visible}
|
||||
button[disabled],input[disabled]{cursor:default}
|
||||
input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0;*height:13px;*width:13px}
|
||||
input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}
|
||||
input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}
|
||||
button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}
|
||||
textarea{overflow:auto;vertical-align:top}
|
||||
table{border-collapse:collapse;border-spacing:0}
|
||||
@@ -1,8 +0,0 @@
|
||||
body {
|
||||
padding: 50px;
|
||||
font: 14px "Lucida Grande", Helvetica, Arial, sans-serif;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #00B7FF;
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
/*
|
||||
* GET home page.
|
||||
*/
|
||||
|
||||
exports.index = function (req, res) {
|
||||
res.render('index', { title: 'Express' });
|
||||
};
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
extends layout
|
||||
|
||||
block append head
|
||||
script(type='text/javascript', src='/dronestream/nodecopter-client.js')
|
||||
|
||||
-# for developing the client, use those url:s
|
||||
-# script(type='text/javascript', src='/dronestream/vendor/broadway/sylvester.js')
|
||||
-# script(type='text/javascript', src='/dronestream/vendor/broadway/glUtils.js')
|
||||
-# script(type='text/javascript', src='/dronestream/vendor/broadway/util.js')
|
||||
-# script(type='text/javascript', src='/dronestream/vendor/broadway/avc-codec.js')
|
||||
-# script(type='text/javascript', src='/dronestream/vendor/broadway/avc.js')
|
||||
-# script(type='text/javascript', src='/dronestream/vendor/broadway/canvas.js')
|
||||
-# script(type='text/javascript', src='/dronestream/nodecopter-stream.js')
|
||||
-# concatenated version of client
|
||||
|
||||
|
||||
block append bodyscripts
|
||||
script
|
||||
var copterStream = new NodecopterStream(document.querySelector('#dronestream'));
|
||||
|
||||
block content
|
||||
div#dronestream(width=640, height=360)
|
||||
@@ -1,30 +0,0 @@
|
||||
!!! 5
|
||||
html
|
||||
block head
|
||||
head
|
||||
meta(http-equiv='X-UA-Compatible', content='IE=edge,chrome=1')
|
||||
meta(name='viewport', content='width=device-width')
|
||||
title= title
|
||||
link(rel='stylesheet', href='/css/normalize.min.css')
|
||||
link(rel='stylesheet', href='/css/style.css')
|
||||
body
|
||||
div.header-container
|
||||
header.wrapper.clearfix
|
||||
block header
|
||||
nav
|
||||
block navigation
|
||||
|
||||
div.main-container
|
||||
div.main.wrapper.clearfix
|
||||
|
||||
block content
|
||||
|
||||
|
||||
div.footer-container
|
||||
footer.wrapper
|
||||
block footer
|
||||
|
||||
block bodyscripts
|
||||
// script(src='//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js')
|
||||
// script
|
||||
// window.jQuery || document.write('<script src="/js/vendor/h5bp/jquery-1.8.2.min.js"><\\x3C/script>')
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "dronestream",
|
||||
"description": "video live stream from your parrot ar.drone 2.0 to your browser in pure javascript",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.1",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git@github.com:bkw/node-dronestream.git"
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário