Permalink
Browse files

More change

  • Loading branch information...
1 parent 49f1ba6 commit 765a1dcf962dd4d8f8dc0705eb081b5084a36eb2 patrick committed Oct 21, 2012
Showing with 10 additions and 11 deletions.
  1. +0 −5 public/index_client.js
  2. +2 −0 public/room_client.js
  3. +6 −3 server.js
  4. +2 −3 templates/room.jade
View
@@ -1,5 +0,0 @@
-$(function() {
-
-var socket = io.connect();
-
-});
View
@@ -2,6 +2,8 @@ $(function() {
var socket = io.connect();
+
+
var video = document.getElementsByTagName('video')[0];
socket.on('timer', function (data) {
View
@@ -24,8 +24,10 @@ app.get('/', function (request, response) {
});
app.get('/getroom', function(req, res) {
- rooms.push(roomID);
+ var id = roomID;
roomID++;
+ rooms.push(id);
+ res.redirect('/room/'+id);
});
app.get('/room/:id',function (req,res) {
@@ -36,7 +38,7 @@ app.get('/room/:id',function (req,res) {
var DaStream='';
var DaData = new Buffer(0);
-app.post('/upload', function (req, res) {
+app.post('/upload/:id', function (req, res) {
console.log('Uplawding');
//res.end('Uploading');
@@ -51,7 +53,7 @@ app.post('/upload', function (req, res) {
});
app.get('/stream/:id', function(req,res) {
- var total = DaData.length;
+ /*var total = DaData.length;
if (req.headers['range']) {
var range = req.headers.range;
var parts = range.replace(/bytes=/, "").split("-");
@@ -72,6 +74,7 @@ app.get('/stream/:id', function(req,res) {
res.writeHead(200, { 'Content-Length': total, 'Content-Type': DaStream.mime });
res.end(DaData);
}
+ */
});
function Client(socket)
View
@@ -7,9 +7,8 @@ html
body
h2 Room #{roomName}
#uploader
- form(action="/upload", method="post", enctype="multipart/form-data")
- input(type="file", name="video")
- button(type="submit") Go
+ input(type="file", name="video")
+ button(id="file-submit") Go
br
br
br

0 comments on commit 765a1dc

Please sign in to comment.