├── README.md ├── app.js ├── fake-keys ├── certificate.pem └── privatekey.pem ├── package.json └── public ├── 404.html ├── animation ├── easing.js ├── hello.css ├── hello.html ├── hello.js └── jquery.js ├── fileupload ├── facebook.gif ├── file.css ├── file.js ├── index.html └── jquery.js ├── final-public.html ├── getSourceId └── index.html ├── images ├── 3.gif ├── Volume.zip ├── Volume │ ├── volume-active.png │ └── volume-mute.png ├── arrow.png ├── background.jpg ├── bg.png ├── buttons │ ├── 1.png │ ├── 2.png │ ├── 3.png │ ├── 4.png │ ├── CAM │ │ ├── cam-active.png │ │ ├── cam-hover.png │ │ └── cam-normal.png │ ├── MIC │ │ ├── mic-active.png │ │ ├── mic-hover.png │ │ └── mic-normal.png │ ├── PHONE │ │ ├── phone-active.png │ │ ├── phone-hover.png │ │ └── phone-normal.png │ ├── RESIZE │ │ ├── resize-active.png │ │ ├── resize-hover.png │ │ └── resize-normal.png │ ├── clip.png │ ├── plus.png │ └── send.png ├── call-off.png ├── emo.jpg ├── full-screen-on.png ├── hardeep.png ├── icomoon │ ├── Read Me.txt │ ├── demo-files │ │ ├── demo.css │ │ └── demo.js │ ├── demo.html │ ├── fonts │ │ ├── icomoon.eot │ │ ├── icomoon.svg │ │ ├── icomoon.ttf │ │ └── icomoon.woff │ ├── selection.json │ └── style.css ├── mic-on.png ├── video-on.png └── video.png ├── public.html ├── scripts ├── adapter.js ├── chat-solo.js ├── chat.js ├── countdown-logic.js ├── countdown │ ├── CSS │ │ └── jquery.countdownTimer.css │ ├── DEMO │ │ └── index.html │ ├── DOCS │ │ └── jQuery_countdownTimer_Documentation │ ├── LIB │ │ └── jquery-2.0.3.js │ ├── LICENSE-GPL │ ├── LICENSE-MIT │ ├── README.md │ ├── countdownTimer.jquery.json │ ├── jquery.countdownTimer.js │ └── jquery.countdownTimer.min.js ├── easing.js ├── find.js ├── jquery.js ├── overlay.js ├── screen-share.js ├── screen.js ├── screencheck.js ├── slider-easing.js ├── socketchat (MAIN).js └── socketchat.js ├── sidebar ├── attach.png ├── bubble-main.css ├── bubble.css ├── bubble.html ├── hello.html ├── plane.png ├── style.css └── user.png ├── styles ├── animate.css ├── bubble.css ├── chat.css ├── home │ ├── bg.jpg │ ├── fonts │ │ ├── Myriad Pro │ │ │ ├── Myriad Apple TTF.rar │ │ │ ├── Myriad Apple │ │ │ │ ├── MYRIAABI.TTF │ │ │ │ ├── MYRIAAMI.TTF │ │ │ │ ├── MYRIAASI.TTF │ │ │ │ ├── MYRIAATI.TTF │ │ │ │ ├── MYRIADAB.TTF │ │ │ │ ├── MYRIADAM.TTF │ │ │ │ ├── MYRIADAS.TTF │ │ │ │ └── MYRIADAT.TTF │ │ │ ├── MyriadPro-Black.otf │ │ │ ├── MyriadPro-Regular.otf │ │ │ └── MyriadPro-Semibold.otf │ │ ├── helvetica │ │ │ ├── Helvetica Bold.ttf │ │ │ ├── Helvetica-Black-SemiBold.ttf │ │ │ ├── Helvetica-Black.otf │ │ │ ├── Helvetica-BlackOblique.otf │ │ │ ├── Helvetica-Bold.otf │ │ │ ├── Helvetica-BoldOblique.otf │ │ │ ├── Helvetica-Condensed-Black-Se.ttf │ │ │ ├── Helvetica-Condensed-Black.otf │ │ │ ├── Helvetica-Condensed-BlackObl.otf │ │ │ ├── Helvetica-Condensed-Bold.otf │ │ │ ├── Helvetica-Condensed-BoldObl.otf │ │ │ ├── Helvetica-Condensed-Light-Li.ttf │ │ │ ├── Helvetica-Condensed-Light-Light.ttf │ │ │ ├── Helvetica-Condensed-Light.otf │ │ │ ├── Helvetica-Condensed-LightObl.otf │ │ │ ├── Helvetica-Condensed-Oblique.otf │ │ │ ├── Helvetica-Condensed-Thin.ttf │ │ │ ├── Helvetica-Condensed.otf │ │ │ ├── HelveticaBQ-Black.otf │ │ │ ├── HelveticaBQ-BlackItalic.otf │ │ │ ├── HelveticaBQ-Bold.otf │ │ │ ├── HelveticaBQ-BoldItalic.otf │ │ │ ├── HelveticaBQ-DemiBold.otf │ │ │ ├── HelveticaBQ-DemiBoldItalic.otf │ │ │ ├── HelveticaBQ-Italic.otf │ │ │ ├── HelveticaBQ-Light.otf │ │ │ ├── HelveticaBQ-LightItalic.otf │ │ │ ├── HelveticaBQ-Medium.otf │ │ │ ├── HelveticaBQ-MediumItalic.otf │ │ │ ├── HelveticaBQ-Roman.otf │ │ │ ├── HelveticaBQ-UltraLight.otf │ │ │ ├── HelveticaCyr-Bold.otf │ │ │ ├── HelveticaCyr-BoldInclined.otf │ │ │ ├── HelveticaCyr-Inclined.otf │ │ │ ├── HelveticaCyr-Upright.otf │ │ │ ├── HelveticaCyrA-Bold.otf │ │ │ ├── HelveticaCyrA-BoldInclined.otf │ │ │ ├── HelveticaCyrA-Inclined.otf │ │ │ ├── HelveticaCyrA-Upright.otf │ │ │ ├── HelveticaExtendedBQ-Bold.otf │ │ │ ├── HelveticaExtendedBQ-ExtraLight.otf │ │ │ ├── HelveticaExtendedBQ-Light.otf │ │ │ ├── HelveticaExtendedBQ-Medium.otf │ │ │ ├── HelveticaNeueLTCom-Bd.ttf │ │ │ ├── HelveticaNeueLTCom-BdCn.ttf │ │ │ ├── HelveticaNeueLTCom-BdCnO.ttf │ │ │ ├── HelveticaNeueLTCom-BdEx.ttf │ │ │ ├── HelveticaNeueLTCom-BdExO.ttf │ │ │ ├── HelveticaNeueLTCom-BdIt.ttf │ │ │ ├── HelveticaNeueLTCom-BdOu.ttf │ │ │ ├── HelveticaNeueLTCom-Blk.ttf │ │ │ ├── HelveticaNeueLTCom-BlkCn.ttf │ │ │ ├── HelveticaNeueLTCom-BlkCnO.ttf │ │ │ ├── HelveticaNeueLTCom-BlkEx.ttf │ │ │ ├── HelveticaNeueLTCom-BlkExO.ttf │ │ │ ├── HelveticaNeueLTCom-BlkIt.ttf │ │ │ ├── HelveticaNeueLTCom-Cn.ttf │ │ │ ├── HelveticaNeueLTCom-CnO.ttf │ │ │ ├── HelveticaNeueLTCom-Ex.ttf │ │ │ ├── HelveticaNeueLTCom-ExO.ttf │ │ │ ├── HelveticaNeueLTCom-Hv.ttf │ │ │ ├── HelveticaNeueLTCom-HvCn.ttf │ │ │ ├── HelveticaNeueLTCom-HvCnO.ttf │ │ │ ├── HelveticaNeueLTCom-HvEx.ttf │ │ │ ├── HelveticaNeueLTCom-HvExO.ttf │ │ │ ├── HelveticaNeueLTCom-HvIt.ttf │ │ │ ├── HelveticaNeueLTCom-It.ttf │ │ │ ├── HelveticaNeueLTCom-Lt.ttf │ │ │ ├── HelveticaNeueLTCom-LtCn.ttf │ │ │ ├── HelveticaNeueLTCom-LtCnO.ttf │ │ │ ├── HelveticaNeueLTCom-LtEx.ttf │ │ │ ├── HelveticaNeueLTCom-LtExO.ttf │ │ │ ├── HelveticaNeueLTCom-LtIt.ttf │ │ │ ├── HelveticaNeueLTCom-Md.ttf │ │ │ ├── HelveticaNeueLTCom-MdCn.ttf │ │ │ ├── HelveticaNeueLTCom-MdCnO.ttf │ │ │ ├── HelveticaNeueLTCom-MdEx.ttf │ │ │ ├── HelveticaNeueLTCom-MdExO.ttf │ │ │ ├── HelveticaNeueLTCom-MdIt.ttf │ │ │ ├── HelveticaNeueLTCom-Roman.ttf │ │ │ ├── HelveticaNeueLTCom-ThCn.ttf │ │ │ ├── HelveticaNeueLTCom-ThCnO.ttf │ │ │ ├── HelveticaNeueLTCom-ThEx.ttf │ │ │ ├── HelveticaNeueLTCom-ThExO.ttf │ │ │ ├── HelveticaNeueLTCom-ThIt.ttf │ │ │ ├── HelveticaNeueLTCom-UltLt.ttf │ │ │ ├── HelveticaNeueLTCom-UltLtCn.ttf │ │ │ ├── HelveticaNeueLTCom-UltLtCnO.ttf │ │ │ ├── HelveticaNeueLTCom-UltLtEx.ttf │ │ │ ├── HelveticaNeueLTCom-UltLtExO.ttf │ │ │ ├── HelveticaNeueLTCom-UltLtIt.ttf │ │ │ ├── HelveticaNeueLTCom-XBlkCn.ttf │ │ │ ├── HelveticaNeueLTCom-XBlkCnO.ttf │ │ │ ├── HelveticaNeueLTStd-Bd.otf │ │ │ ├── HelveticaNeueLTStd-BdCn.otf │ │ │ ├── HelveticaNeueLTStd-BdCnO.otf │ │ │ ├── HelveticaNeueLTStd-BdEx.otf │ │ │ ├── HelveticaNeueLTStd-BdExO.otf │ │ │ ├── HelveticaNeueLTStd-BdIt.otf │ │ │ ├── HelveticaNeueLTStd-BdOu.otf │ │ │ ├── HelveticaNeueLTStd-Blk.otf │ │ │ ├── HelveticaNeueLTStd-BlkCn.otf │ │ │ ├── HelveticaNeueLTStd-BlkCnO.otf │ │ │ ├── HelveticaNeueLTStd-BlkEx.otf │ │ │ ├── HelveticaNeueLTStd-BlkExO.otf │ │ │ ├── HelveticaNeueLTStd-BlkIt.otf │ │ │ ├── HelveticaNeueLTStd-Cn.otf │ │ │ ├── HelveticaNeueLTStd-CnO.otf │ │ │ ├── HelveticaNeueLTStd-Ex.otf │ │ │ ├── HelveticaNeueLTStd-ExO.otf │ │ │ ├── HelveticaNeueLTStd-Hv.otf │ │ │ ├── HelveticaNeueLTStd-HvCn.otf │ │ │ ├── HelveticaNeueLTStd-HvCnO.otf │ │ │ ├── HelveticaNeueLTStd-HvEx.otf │ │ │ ├── HelveticaNeueLTStd-HvExO.otf │ │ │ ├── HelveticaNeueLTStd-HvIt.otf │ │ │ ├── HelveticaNeueLTStd-It.otf │ │ │ ├── HelveticaNeueLTStd-Lt.otf │ │ │ ├── HelveticaNeueLTStd-LtCn.otf │ │ │ ├── HelveticaNeueLTStd-LtCnO.otf │ │ │ ├── HelveticaNeueLTStd-LtEx.otf │ │ │ ├── HelveticaNeueLTStd-LtExO.otf │ │ │ ├── HelveticaNeueLTStd-LtIt.otf │ │ │ ├── HelveticaNeueLTStd-Md.otf │ │ │ ├── HelveticaNeueLTStd-MdCn.otf │ │ │ ├── HelveticaNeueLTStd-MdCnO.otf │ │ │ ├── HelveticaNeueLTStd-MdEx.otf │ │ │ ├── HelveticaNeueLTStd-MdExO.otf │ │ │ ├── HelveticaNeueLTStd-MdIt.otf │ │ │ ├── HelveticaNeueLTStd-Roman.otf │ │ │ ├── HelveticaNeueLTStd-Th.otf │ │ │ ├── HelveticaNeueLTStd-ThCn.otf │ │ │ ├── HelveticaNeueLTStd-ThCnO.otf │ │ │ ├── HelveticaNeueLTStd-ThEx.otf │ │ │ ├── HelveticaNeueLTStd-ThExO.otf │ │ │ ├── HelveticaNeueLTStd-ThIt.otf │ │ │ ├── HelveticaNeueLTStd-UltLt.otf │ │ │ ├── HelveticaNeueLTStd-UltLtCn.otf │ │ │ ├── HelveticaNeueLTStd-UltLtCnO.otf │ │ │ ├── HelveticaNeueLTStd-UltLtEx.otf │ │ │ ├── HelveticaNeueLTStd-UltLtExO.otf │ │ │ ├── HelveticaNeueLTStd-UltLtIt.otf │ │ │ ├── HelveticaNeueLTStd-XBlkCn.otf │ │ │ ├── HelveticaNeueLTStd-XBlkCnO.otf │ │ │ ├── HelveticaTwoBQ-Bold.otf │ │ │ ├── HelveticaTwoBQ-BoldItalic.otf │ │ │ ├── HelveticaTwoBQ-Italic.otf │ │ │ ├── HelveticaTwoBQ-Roman.otf │ │ │ └── helv.ttf │ │ ├── myriad.ttf │ │ └── style.css │ └── main.css ├── icomoon │ ├── fonts │ │ ├── icomoon.eot │ │ ├── icomoon.svg │ │ ├── icomoon.ttf │ │ └── icomoon.woff │ ├── selection.json │ └── style.css ├── images │ ├── arrow.png │ ├── background.jpg │ ├── bg.png │ ├── buttons │ │ ├── 1.png │ │ ├── 2.png │ │ ├── 3.png │ │ ├── 4.png │ │ ├── CAM │ │ │ ├── cam-active.png │ │ │ ├── cam-hover.png │ │ │ └── cam-normal.png │ │ ├── MIC │ │ │ ├── mic-active.png │ │ │ ├── mic-hover.png │ │ │ └── mic-normal.png │ │ ├── PHONE │ │ │ ├── phone-active.png │ │ │ ├── phone-hover.png │ │ │ └── phone-normal.png │ │ ├── RESIZE │ │ │ ├── resize-active.png │ │ │ ├── resize-hover.png │ │ │ └── resize-normal.png │ │ ├── clip.png │ │ ├── plus.png │ │ └── send.png │ └── video.png ├── style.css └── upload-file.css ├── testing-public.html └── videos └── sintel.webm /README.md: -------------------------------------------------------------------------------- 1 | # The Multi-room audio-video conferencing tool with Socket.IO and Node.JS 2 | 3 | It's a simple solution to connect anyone over a simple room name, without any additional plugins 4 | 5 | So, this utility attempts to handle everything. It: 6 | 7 | - Simplifies the communication process, with rich user experience 8 | - Users can chat 9 | - accounts for the latest Chrome release's getUserMedia() function to run without ssl, So fake keys added. 10 | 11 | 12 | ## Installation 13 | 14 | #### Download 15 | 16 | Simply clone or download the zip of the project, 17 | 18 | #### Using with [Node.js](http://nodejs.org) via [npm](https://www.npmjs.org/): 19 | 20 | Command Line: 21 | 22 | ```shell 23 | npm install 24 | ``` 25 | 26 | ## Usage 27 | 28 | ```shell 29 | node app.js 30 | ``` 31 | 32 | - This should start your chat app at https://localhost:5000/ 33 | - Any two users can chat over https://localhost:5000/any+room+name 34 | 35 | ## Demo [Heroku App](https://hardeep-rooms.herokuapp.com) -------------------------------------------------------------------------------- /app.js: -------------------------------------------------------------------------------- 1 | var fs = require('fs'); 2 | var express = require('express'); 3 | var app = express(); 4 | var options = { 5 | key: fs.readFileSync('fake-keys/privatekey.pem'), 6 | cert: fs.readFileSync('fake-keys/certificate.pem') 7 | }; 8 | var server = require('https').createServer(options, app); 9 | var io = require('socket.io').listen(server); 10 | var util = require('util'); 11 | var now = require("performance-now"); 12 | var rooms = []; 13 | var users = {}; 14 | var screensharingusers = {}; 15 | var socketio; 16 | var trimmed; 17 | server.listen(5000); 18 | console.log('App started at port...5000'); 19 | app.use(express.static(__dirname + '/public')); 20 | app.get('/',function(req,res){ 21 | res.sendfile(__dirname+'/public/404.html'); 22 | }); 23 | app.get('/:key',function(req,res){ 24 | trimmed = req.params.key.trim(); 25 | if (req.url === '/favicon.ico') 26 | { 27 | res.writeHead(200, {'Content-Type': 'image/x-icon'} ); 28 | res.end(); 29 | return; 30 | } 31 | else 32 | { 33 | res.sendfile(__dirname+'/public/public.html'); 34 | } 35 | 36 | }); 37 | io.sockets.on('connection',function(socket){ 38 | console.log(now()+' connected..'); 39 | socket.key = trimmed; 40 | socket.screenShared = false; 41 | socket.on('disconnect',function(){ 42 | if(socket.username === undefined) 43 | { 44 | console.log('User has disconnected!! without using the product!!'); 45 | } 46 | else 47 | { 48 | console.log(socket.username + ' has disconnected!!'); 49 | socket.broadcast.to(socket.key).emit('disconnected-user-reset'); 50 | if(rooms.length > 0) 51 | { 52 | console.log('Calling removeUserKey..'); 53 | removeUserKey(socket); 54 | io.to(socket.key).emit('checking-for-screen-share', socket.key, users[socket.key]); 55 | } 56 | } 57 | }); 58 | //Getting Username 59 | socket.on('username',function(data){ 60 | console.log(data+' just joined..'); 61 | addUserKey(data,socket); 62 | }); 63 | 64 | socket.on('checked-stream',function(data){ 65 | console.log('Inside checked stream!!..Now emitting checking-for-screen-share !!!'); 66 | io.to(socket.key).emit('checking-for-screen-share', socket.key, users[socket.key]); 67 | if(users[socket.key].length===2) 68 | { 69 | socket.broadcast.to(socket.key).emit('available-for-offer'); 70 | io.to(socket.key).emit('users-final', users[socket.key]); 71 | } 72 | else 73 | { 74 | if(users[socket.key].length>2) 75 | { 76 | console.log("Sorry..This room is already in use..Try again later."); 77 | } 78 | } 79 | }); 80 | 81 | socket.on('got-local-description',function(data){ 82 | console.log('Got Local Description...'); 83 | console.log('Now broadcasting...'); 84 | socket.broadcast.to(socket.key).emit('available-for-answer',data); 85 | }); 86 | 87 | socket.on('got-remote-description',function(data){ 88 | console.log('Got Remote Description...'); 89 | console.log('Now broadcasting...'); 90 | socket.broadcast.to(socket.key).emit('available-for-stream',data); 91 | }); 92 | socket.on('local-candidate',function(data){ 93 | console.log('Got Local Candidate!!!'); 94 | socket.broadcast.to(socket.key).emit('local-candidate-broadcast',data); 95 | 96 | }); 97 | socket.on('remote-candidate',function(data){ 98 | console.log('Got Remote Candidate!!!'); 99 | socket.broadcast.to(socket.key).emit('remote-candidate-broadcast',data); 100 | }); 101 | socket.on('remote-disconnected',function(){ 102 | socket.broadcast.to(socket.key).emit('remote-candidate-disconnect'); 103 | }); 104 | 105 | socket.on('this-chat-data',function(data){ 106 | socket.broadcast.to(socket.key).emit('remote-chat-data',data); 107 | }); 108 | 109 | socket.on('different-chat-data',function(data){ 110 | socket.broadcast.to(socket.key).emit('different-remote-chat-data',data); 111 | }); 112 | 113 | socket.on('screen-share-off', function(){ 114 | socket.screenShared = false; 115 | console.log('OFF CALLED..Screen shared is '+ socket.screenShared); 116 | screensharingusers[socket.key][socket.username] = socket.screenShared; 117 | console.log('Now screensharingusers object is '+util.inspect(screensharingusers)); 118 | socket.broadcast.to(socket.key).emit('other-guy-screen-share-off'); 119 | }); 120 | 121 | socket.on('screen-share-on', function(){ 122 | socket.screenShared = true; 123 | console.log('ON CALLED..Screen shared is '+ socket.screenShared); 124 | screensharingusers[socket.key][socket.username] = socket.screenShared; 125 | console.log('Now screensharingusers object is '+util.inspect(screensharingusers)); 126 | socket.broadcast.to(socket.key).emit('other-guy-screen-share-on'); 127 | }); 128 | }); 129 | //FUNCTIONS----start 130 | function addUserKey(data,socket) 131 | { 132 | try 133 | { 134 | var key = socket.key; 135 | if(rooms.indexOf(key) === -1) 136 | { 137 | console.log('Generating new key!!'); 138 | rooms.push(key); 139 | users[key]=[data]; 140 | screensharingusers[key] = {}; 141 | screensharingusers[key][data] = socket.screenShared; 142 | socket.users = {} ; 143 | socket.users[data] = key; 144 | socket.username= data; 145 | socket.join(socket.key); 146 | console.log('Socket joins a room.'); 147 | console.log('Adding socket.username --->'+ socket.username); 148 | console.log('Adding socket.users[data] --->'+socket.users[data]); 149 | console.log('Now screensharingusers object is '+util.inspect(screensharingusers)); 150 | } 151 | else 152 | { 153 | if(users[key]!=undefined) 154 | { 155 | 156 | console.log(now()+' Room already exists!!!'); 157 | users[key].push(data); 158 | screensharingusers[key][data] = socket.screenShared; 159 | console.log('Now rooms array is '+JSON.stringify(rooms)); 160 | console.log('Now users array is '+JSON.stringify(users)); 161 | socket.users = {}; 162 | socket.users[data] = key; 163 | socket.username= data; 164 | socket.join(socket.key); 165 | console.log('Now screensharingusers object is '+util.inspect(screensharingusers)); 166 | } 167 | 168 | } 169 | } 170 | catch(err) 171 | { 172 | console.log('Thrown error is ->'+err); 173 | } 174 | 175 | } 176 | 177 | function removeUserKey(socket) 178 | { 179 | try 180 | { 181 | var username = socket.username; 182 | var key = socket.users[socket.username]; 183 | console.log('Deleting inside removeUserKey() function...'); 184 | users[socket.key].splice(users[socket.key].indexOf(username),1); 185 | delete screensharingusers[socket.key][username]; 186 | if(users[socket.key].length === 0) 187 | { 188 | delete users[socket.key]; 189 | rooms.splice(rooms.indexOf(username),1); 190 | delete screensharingusers[socket.key]; 191 | } 192 | console.log('Now rooms array is '+util.inspect(rooms)); 193 | console.log('Now users array is '+util.inspect(users)); 194 | console.log('Now screensharingusers object is '+util.inspect(screensharingusers)); 195 | } 196 | 197 | catch(err) 198 | { 199 | console.log('Thrown error is ->'+err); 200 | } 201 | 202 | 203 | } 204 | 205 | //FUNCTIONS----end 206 | 207 | -------------------------------------------------------------------------------- /fake-keys/certificate.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIDBTCCAe2gAwIBAgIJAKZL3MRzLyawMA0GCSqGSIb3DQEBBQUAMBkxFzAVBgNV 3 | BAMMDmxvY2FsaG9zdDo0MDAwMB4XDTE0MDkyNDE3MTIyMFoXDTI0MDkyMTE3MTIy 4 | MFowGTEXMBUGA1UEAwwObG9jYWxob3N0OjQwMDAwggEiMA0GCSqGSIb3DQEBAQUA 5 | A4IBDwAwggEKAoIBAQCwkg6QIfo9KZ5kU82/dQ2wlRrh/P4uG6FiWxEVcQ4kLvE7 6 | h/GMDi5XBgWj9EKCJvzHJNtllHeX5E5O20MCyuQMuuvLXHMVN4Vs8lG5VC3V6wTT 7 | 2hRqXAsaj4xuhmQoLyQp0n+v2RIZFWn0fUKLO+wBDwEQ/H6Y+goqlVKkEW1SAvQM 8 | tt4utSH6Y/zu3K93OsaYV2qTw321CBE7TeVeTmqMSluavfAWi+lp6SLiPuI4iZRK 9 | l6lQqdqnS0DVxj/IkIR4BSbohEgM3lg53QtqKaAMdMyXAS2A6fP5YBL2O6j3OXBJ 10 | rcLi/fZUtJoH3Y1aq4h2n7lo2iqBxUnuk9YD463nAgMBAAGjUDBOMB0GA1UdDgQW 11 | BBQLofT8gtfbUa+GtiHxZpg+KlffODAfBgNVHSMEGDAWgBQLofT8gtfbUa+GtiHx 12 | Zpg+KlffODAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4IBAQAI+rQIKCt8 13 | 3TBeH3uwm6n9eSO9S1eD4NpxDuco8QhqrGBVML9BSi1wKcrl+UUYkjuZ1qJQ9ZzU 14 | jB9kI20oLCGwKzp8S+Gj5Vwve+UBCAMOyptWV3EYtobJjbXtJ6CtWa8n93TtpD/e 15 | H+rWcUXDyy1ViK92sTE2wQbk+iFL0F/AM+ilZ2Y1ioMMvtwsqIcD1mBl8KKl+x6e 16 | aJJGj/JUjzBkRiUsNQF9AAT5wq9TsOME0J3n2VnmENjGkgEII0xbS5UxlZyjeCl1 17 | pHkiEvSUQFcve1FrLEvch2WrczN/JmIEQwk7i7cpk5zG3kQA0x+Z/K/uD8y1jyPn 18 | vXtrWdw7/1L8 19 | -----END CERTIFICATE----- 20 | -------------------------------------------------------------------------------- /fake-keys/privatekey.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIIEpAIBAAKCAQEAsJIOkCH6PSmeZFPNv3UNsJUa4fz+LhuhYlsRFXEOJC7xO4fx 3 | jA4uVwYFo/RCgib8xyTbZZR3l+ROTttDAsrkDLrry1xzFTeFbPJRuVQt1esE09oU 4 | alwLGo+MboZkKC8kKdJ/r9kSGRVp9H1CizvsAQ8BEPx+mPoKKpVSpBFtUgL0DLbe 5 | LrUh+mP87tyvdzrGmFdqk8N9tQgRO03lXk5qjEpbmr3wFovpaeki4j7iOImUSpep 6 | UKnap0tA1cY/yJCEeAUm6IRIDN5YOd0LaimgDHTMlwEtgOnz+WAS9juo9zlwSa3C 7 | 4v32VLSaB92NWquIdp+5aNoqgcVJ7pPWA+Ot5wIDAQABAoIBAQCjegbbsWmjGRZZ 8 | 4zE6EuDi3ZnvI7Id9Fz92Dy/8lVacM/OAzZDKpoC3kN4ody17ezZYCl1Kflz+t/5 9 | qI2pVzm/A4zuUqEGQspYrR23DdYGGbr1fhKqyp9JLyCg7/JpNgQwaIDpyXs1GBtq 10 | TlK+4HLIJCEjnfKEJfQlquzBlJT3eNSATJcbMXXYQsa494QSu9t/QxWbr1cLtoZx 11 | a/uiUN6pSl8jNIu9U9sY77HkaGRFS1aSpTi32yVm2tZN9tQJ/g33XeRYorKhROr+ 12 | /GIZ6sX8x7WRVDKLc3rcUNBxJZ8YNyfnDkTMAnQzMqFw0MzT0eVzs0HH9XcU6aoI 13 | i/FVi0EhAoGBAN2FsqGcvfMJ+DOs2+625k2thKWfSwJ8ujE9nUjr4yqelqGTjsCq 14 | 09yi2kVgHkx+Y1eC/swC3ZdLKesngI/EvY+XeLJ4x+M+fyICPCHIHDLwkKfWm3lw 15 | VifaWunGo/ZkK7fJVbOQfvOK2ZypSHFdE1tCZNAwe7/f4/73aJW9t8nxAoGBAMwN 16 | TxOq03tDXXvOLRDJLGT9ekEFi57ArcG3GEGgTJKxdCbsgAXPB2eJ9V/aAC37U7ts 17 | XoWRdJGfm99YaNc8cHIjqW/QepNGZ/gtKNM6gSn10ulUgzzCdhgF4DyW69zTJgWi 18 | IjvS4Hy5nfIV95itmimgwh4EQQFaPdAXxzahqd1XAoGAM0GIP5TA7sdTwsEwcl+n 19 | kjmgA6KD/KNXgaU8C29pNKdVOzWlRjdApkCYOI0w9YoY+lq5EgNnumYN4PdW6+0d 20 | 32ew6brApXgEep4Bw99FhxPapLsnZkXz6WzAtG7d6VjsNK5FQjMg7MEn8PPKa1CZ 21 | 9fe60+EkARWQ76HXdS5cpEECgYEAnEGMzpi//eJmUgpehD4pmuRonCYs9tLBvFgD 22 | YS3ptWPieHQezVPubaE9n7sG7C9LvXiNIWdzhphc+rlu/3OvABjDBXb2hpUhxPCA 23 | FND2XDV832TyYrLfUCIfxwYjdCTVNvcjlAA2HAzgIKQlyGsYZMxQGkBTrz91mka7 24 | LOC7fV0CgYBiDvqM/l57U0B0hEqSpQ4yhzJavLNEsyVqzaG+mt7mtgjMUknbRm5U 25 | KVVC5BqtqR0L82NgGgxs+aL8oDkUwJ+uoEf64uUleRMIZsKzPPVNpm+KMjPzV9Ot 26 | fBWHybwvoadwN0J4Ek83Ae+79Oj1HlIHqI+a4hFV30rRd9u4toNkUA== 27 | -----END RSA PRIVATE KEY----- 28 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "prototype-webrtc", 3 | "version": "1.0.0", 4 | "description": "A simple room based webrtc application for audio-video sharing", 5 | "main": "app.js", 6 | "scripts": { 7 | "start": "node app.js" 8 | }, 9 | "keywords": [ 10 | "webrtc", 11 | "rooms", 12 | "node.js" 13 | ], 14 | "author": "Hardeep Mehta", 15 | "license": "MIT", 16 | "dependencies": { 17 | "express": "^4.13.3", 18 | "socket.io": "^1.3.7", 19 | "performance-now": "^0.2.0" 20 | }, 21 | "devDependencies": { } 22 | } 23 | -------------------------------------------------------------------------------- /public/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Sample webrtc video and audio chat 4 | 5 | 6 | 7 | 8 |
9 |
10 |
11 | A Simple Room Based Webrtc Application 12 |
13 |
14 | 15 |
16 |
17 |
18 | 19 | Hardeep 20 | 21 |
22 |
23 | 36 | 37 | -------------------------------------------------------------------------------- /public/animation/easing.js: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/ 3 | * 4 | * Uses the built in easing capabilities added In jQuery 1.1 5 | * to offer multiple easing options 6 | * 7 | * TERMS OF USE - jQuery Easing 8 | * 9 | * Open source under the BSD License. 10 | * 11 | * Copyright © 2008 George McGinley Smith 12 | * All rights reserved. 13 | * 14 | * Redistribution and use in source and binary forms, with or without modification, 15 | * are permitted provided that the following conditions are met: 16 | * 17 | * Redistributions of source code must retain the above copyright notice, this list of 18 | * conditions and the following disclaimer. 19 | * Redistributions in binary form must reproduce the above copyright notice, this list 20 | * of conditions and the following disclaimer in the documentation and/or other materials 21 | * provided with the distribution. 22 | * 23 | * Neither the name of the author nor the names of contributors may be used to endorse 24 | * or promote products derived from this software without specific prior written permission. 25 | * 26 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 27 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 28 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 29 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 30 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 31 | * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 32 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 33 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 34 | * OF THE POSSIBILITY OF SUCH DAMAGE. 35 | * 36 | */ 37 | 38 | // t: current time, b: begInnIng value, c: change In value, d: duration 39 | jQuery.easing['jswing'] = jQuery.easing['swing']; 40 | 41 | jQuery.extend( jQuery.easing, 42 | { 43 | def: 'easeOutQuad', 44 | swing: function (x, t, b, c, d) { 45 | //alert(jQuery.easing.default); 46 | return jQuery.easing[jQuery.easing.def](x, t, b, c, d); 47 | }, 48 | easeInQuad: function (x, t, b, c, d) { 49 | return c*(t/=d)*t + b; 50 | }, 51 | easeOutQuad: function (x, t, b, c, d) { 52 | return -c *(t/=d)*(t-2) + b; 53 | }, 54 | easeInOutQuad: function (x, t, b, c, d) { 55 | if ((t/=d/2) < 1) return c/2*t*t + b; 56 | return -c/2 * ((--t)*(t-2) - 1) + b; 57 | }, 58 | easeInCubic: function (x, t, b, c, d) { 59 | return c*(t/=d)*t*t + b; 60 | }, 61 | easeOutCubic: function (x, t, b, c, d) { 62 | return c*((t=t/d-1)*t*t + 1) + b; 63 | }, 64 | easeInOutCubic: function (x, t, b, c, d) { 65 | if ((t/=d/2) < 1) return c/2*t*t*t + b; 66 | return c/2*((t-=2)*t*t + 2) + b; 67 | }, 68 | easeInQuart: function (x, t, b, c, d) { 69 | return c*(t/=d)*t*t*t + b; 70 | }, 71 | easeOutQuart: function (x, t, b, c, d) { 72 | return -c * ((t=t/d-1)*t*t*t - 1) + b; 73 | }, 74 | easeInOutQuart: function (x, t, b, c, d) { 75 | if ((t/=d/2) < 1) return c/2*t*t*t*t + b; 76 | return -c/2 * ((t-=2)*t*t*t - 2) + b; 77 | }, 78 | easeInQuint: function (x, t, b, c, d) { 79 | return c*(t/=d)*t*t*t*t + b; 80 | }, 81 | easeOutQuint: function (x, t, b, c, d) { 82 | return c*((t=t/d-1)*t*t*t*t + 1) + b; 83 | }, 84 | easeInOutQuint: function (x, t, b, c, d) { 85 | if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b; 86 | return c/2*((t-=2)*t*t*t*t + 2) + b; 87 | }, 88 | easeInSine: function (x, t, b, c, d) { 89 | return -c * Math.cos(t/d * (Math.PI/2)) + c + b; 90 | }, 91 | easeOutSine: function (x, t, b, c, d) { 92 | return c * Math.sin(t/d * (Math.PI/2)) + b; 93 | }, 94 | easeInOutSine: function (x, t, b, c, d) { 95 | return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b; 96 | }, 97 | easeInExpo: function (x, t, b, c, d) { 98 | return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b; 99 | }, 100 | easeOutExpo: function (x, t, b, c, d) { 101 | return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b; 102 | }, 103 | easeInOutExpo: function (x, t, b, c, d) { 104 | if (t==0) return b; 105 | if (t==d) return b+c; 106 | if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b; 107 | return c/2 * (-Math.pow(2, -10 * --t) + 2) + b; 108 | }, 109 | easeInCirc: function (x, t, b, c, d) { 110 | return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b; 111 | }, 112 | easeOutCirc: function (x, t, b, c, d) { 113 | return c * Math.sqrt(1 - (t=t/d-1)*t) + b; 114 | }, 115 | easeInOutCirc: function (x, t, b, c, d) { 116 | if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b; 117 | return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b; 118 | }, 119 | easeInElastic: function (x, t, b, c, d) { 120 | var s=1.70158;var p=0;var a=c; 121 | if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; 122 | if (a < Math.abs(c)) { a=c; var s=p/4; } 123 | else var s = p/(2*Math.PI) * Math.asin (c/a); 124 | return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; 125 | }, 126 | easeOutElastic: function (x, t, b, c, d) { 127 | var s=1.70158;var p=0;var a=c; 128 | if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; 129 | if (a < Math.abs(c)) { a=c; var s=p/4; } 130 | else var s = p/(2*Math.PI) * Math.asin (c/a); 131 | return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b; 132 | }, 133 | easeInOutElastic: function (x, t, b, c, d) { 134 | var s=1.70158;var p=0;var a=c; 135 | if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5); 136 | if (a < Math.abs(c)) { a=c; var s=p/4; } 137 | else var s = p/(2*Math.PI) * Math.asin (c/a); 138 | if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; 139 | return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b; 140 | }, 141 | easeInBack: function (x, t, b, c, d, s) { 142 | if (s == undefined) s = 1.70158; 143 | return c*(t/=d)*t*((s+1)*t - s) + b; 144 | }, 145 | easeOutBack: function (x, t, b, c, d, s) { 146 | if (s == undefined) s = 1.70158; 147 | return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b; 148 | }, 149 | easeInOutBack: function (x, t, b, c, d, s) { 150 | if (s == undefined) s = 1.70158; 151 | if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b; 152 | return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b; 153 | }, 154 | easeInBounce: function (x, t, b, c, d) { 155 | return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b; 156 | }, 157 | easeOutBounce: function (x, t, b, c, d) { 158 | if ((t/=d) < (1/2.75)) { 159 | return c*(7.5625*t*t) + b; 160 | } else if (t < (2/2.75)) { 161 | return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b; 162 | } else if (t < (2.5/2.75)) { 163 | return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b; 164 | } else { 165 | return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b; 166 | } 167 | }, 168 | easeInOutBounce: function (x, t, b, c, d) { 169 | if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b; 170 | return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b; 171 | } 172 | }); 173 | 174 | /* 175 | * 176 | * TERMS OF USE - EASING EQUATIONS 177 | * 178 | * Open source under the BSD License. 179 | * 180 | * Copyright © 2001 Robert Penner 181 | * All rights reserved. 182 | * 183 | * Redistribution and use in source and binary forms, with or without modification, 184 | * are permitted provided that the following conditions are met: 185 | * 186 | * Redistributions of source code must retain the above copyright notice, this list of 187 | * conditions and the following disclaimer. 188 | * Redistributions in binary form must reproduce the above copyright notice, this list 189 | * of conditions and the following disclaimer in the documentation and/or other materials 190 | * provided with the distribution. 191 | * 192 | * Neither the name of the author nor the names of contributors may be used to endorse 193 | * or promote products derived from this software without specific prior written permission. 194 | * 195 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 196 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 197 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 198 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 199 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 200 | * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 201 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 202 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 203 | * OF THE POSSIBILITY OF SUCH DAMAGE. 204 | * 205 | */ -------------------------------------------------------------------------------- /public/animation/hello.css: -------------------------------------------------------------------------------- 1 | .box 2 | { 3 | width: 200px; 4 | height: 200px; 5 | position: relative; 6 | background-color: blue; 7 | margin-bottom: 200px; 8 | } -------------------------------------------------------------------------------- /public/animation/hello.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 |
11 |
12 | 13 | 14 | -------------------------------------------------------------------------------- /public/animation/hello.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | 3 | $('#first').animate({ 4 | 'left': 1000},{ 5 | duration: 600, 6 | easing: 'easeInCubic' 7 | }); 8 | 9 | $('#second').animate({ 10 | 'left': 1000},{ 11 | duration: 600, 12 | easing: 'easeInQuart' 13 | }, 1000); 14 | 15 | }); -------------------------------------------------------------------------------- /public/fileupload/facebook.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardeepmehta/webrtc-rooms/b871b08cc727c69034bf87c9010ca69ec1c1d7f8/public/fileupload/facebook.gif -------------------------------------------------------------------------------- /public/fileupload/file.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardeepmehta/webrtc-rooms/b871b08cc727c69034bf87c9010ca69ec1c1d7f8/public/fileupload/file.css -------------------------------------------------------------------------------- /public/fileupload/file.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | 3 | console.log('jQuery is working..'); 4 | 5 | }); -------------------------------------------------------------------------------- /public/fileupload/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /public/final-public.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Chat with socket.io and node.js 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 |
67 |
68 |
69 |
70 |
71 | Enter Your Username 72 |
73 |
74 | 75 | 76 |
77 |
78 |
79 |
80 |
81 | 98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 | 107 | 138 | 140 | 141 | 142 | -------------------------------------------------------------------------------- /public/getSourceId/index.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/images/3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardeepmehta/webrtc-rooms/b871b08cc727c69034bf87c9010ca69ec1c1d7f8/public/images/3.gif -------------------------------------------------------------------------------- /public/images/Volume.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardeepmehta/webrtc-rooms/b871b08cc727c69034bf87c9010ca69ec1c1d7f8/public/images/Volume.zip -------------------------------------------------------------------------------- /public/images/Volume/volume-active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardeepmehta/webrtc-rooms/b871b08cc727c69034bf87c9010ca69ec1c1d7f8/public/images/Volume/volume-active.png -------------------------------------------------------------------------------- /public/images/Volume/volume-mute.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardeepmehta/webrtc-rooms/b871b08cc727c69034bf87c9010ca69ec1c1d7f8/public/images/Volume/volume-mute.png -------------------------------------------------------------------------------- /public/images/arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardeepmehta/webrtc-rooms/b871b08cc727c69034bf87c9010ca69ec1c1d7f8/public/images/arrow.png -------------------------------------------------------------------------------- /public/images/background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardeepmehta/webrtc-rooms/b871b08cc727c69034bf87c9010ca69ec1c1d7f8/public/images/background.jpg -------------------------------------------------------------------------------- /public/images/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardeepmehta/webrtc-rooms/b871b08cc727c69034bf87c9010ca69ec1c1d7f8/public/images/bg.png -------------------------------------------------------------------------------- /public/images/buttons/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardeepmehta/webrtc-rooms/b871b08cc727c69034bf87c9010ca69ec1c1d7f8/public/images/buttons/1.png -------------------------------------------------------------------------------- /public/images/buttons/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardeepmehta/webrtc-rooms/b871b08cc727c69034bf87c9010ca69ec1c1d7f8/public/images/buttons/2.png -------------------------------------------------------------------------------- /public/images/buttons/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardeepmehta/webrtc-rooms/b871b08cc727c69034bf87c9010ca69ec1c1d7f8/public/images/buttons/3.png -------------------------------------------------------------------------------- /public/images/buttons/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardeepmehta/webrtc-rooms/b871b08cc727c69034bf87c9010ca69ec1c1d7f8/public/images/buttons/4.png -------------------------------------------------------------------------------- /public/images/buttons/CAM/cam-active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardeepmehta/webrtc-rooms/b871b08cc727c69034bf87c9010ca69ec1c1d7f8/public/images/buttons/CAM/cam-active.png -------------------------------------------------------------------------------- /public/images/buttons/CAM/cam-hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardeepmehta/webrtc-rooms/b871b08cc727c69034bf87c9010ca69ec1c1d7f8/public/images/buttons/CAM/cam-hover.png -------------------------------------------------------------------------------- /public/images/buttons/CAM/cam-normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardeepmehta/webrtc-rooms/b871b08cc727c69034bf87c9010ca69ec1c1d7f8/public/images/buttons/CAM/cam-normal.png -------------------------------------------------------------------------------- /public/images/buttons/MIC/mic-active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardeepmehta/webrtc-rooms/b871b08cc727c69034bf87c9010ca69ec1c1d7f8/public/images/buttons/MIC/mic-active.png -------------------------------------------------------------------------------- /public/images/buttons/MIC/mic-hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardeepmehta/webrtc-rooms/b871b08cc727c69034bf87c9010ca69ec1c1d7f8/public/images/buttons/MIC/mic-hover.png -------------------------------------------------------------------------------- /public/images/buttons/MIC/mic-normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardeepmehta/webrtc-rooms/b871b08cc727c69034bf87c9010ca69ec1c1d7f8/public/images/buttons/MIC/mic-normal.png -------------------------------------------------------------------------------- /public/images/buttons/PHONE/phone-active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardeepmehta/webrtc-rooms/b871b08cc727c69034bf87c9010ca69ec1c1d7f8/public/images/buttons/PHONE/phone-active.png -------------------------------------------------------------------------------- /public/images/buttons/PHONE/phone-hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardeepmehta/webrtc-rooms/b871b08cc727c69034bf87c9010ca69ec1c1d7f8/public/images/buttons/PHONE/phone-hover.png -------------------------------------------------------------------------------- /public/images/buttons/PHONE/phone-normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardeepmehta/webrtc-rooms/b871b08cc727c69034bf87c9010ca69ec1c1d7f8/public/images/buttons/PHONE/phone-normal.png -------------------------------------------------------------------------------- /public/images/buttons/RESIZE/resize-active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardeepmehta/webrtc-rooms/b871b08cc727c69034bf87c9010ca69ec1c1d7f8/public/images/buttons/RESIZE/resize-active.png -------------------------------------------------------------------------------- /public/images/buttons/RESIZE/resize-hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardeepmehta/webrtc-rooms/b871b08cc727c69034bf87c9010ca69ec1c1d7f8/public/images/buttons/RESIZE/resize-hover.png -------------------------------------------------------------------------------- /public/images/buttons/RESIZE/resize-normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardeepmehta/webrtc-rooms/b871b08cc727c69034bf87c9010ca69ec1c1d7f8/public/images/buttons/RESIZE/resize-normal.png -------------------------------------------------------------------------------- /public/images/buttons/clip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardeepmehta/webrtc-rooms/b871b08cc727c69034bf87c9010ca69ec1c1d7f8/public/images/buttons/clip.png -------------------------------------------------------------------------------- /public/images/buttons/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardeepmehta/webrtc-rooms/b871b08cc727c69034bf87c9010ca69ec1c1d7f8/public/images/buttons/plus.png -------------------------------------------------------------------------------- /public/images/buttons/send.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardeepmehta/webrtc-rooms/b871b08cc727c69034bf87c9010ca69ec1c1d7f8/public/images/buttons/send.png -------------------------------------------------------------------------------- /public/images/call-off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardeepmehta/webrtc-rooms/b871b08cc727c69034bf87c9010ca69ec1c1d7f8/public/images/call-off.png -------------------------------------------------------------------------------- /public/images/emo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardeepmehta/webrtc-rooms/b871b08cc727c69034bf87c9010ca69ec1c1d7f8/public/images/emo.jpg -------------------------------------------------------------------------------- /public/images/full-screen-on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardeepmehta/webrtc-rooms/b871b08cc727c69034bf87c9010ca69ec1c1d7f8/public/images/full-screen-on.png -------------------------------------------------------------------------------- /public/images/hardeep.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardeepmehta/webrtc-rooms/b871b08cc727c69034bf87c9010ca69ec1c1d7f8/public/images/hardeep.png -------------------------------------------------------------------------------- /public/images/icomoon/Read Me.txt: -------------------------------------------------------------------------------- 1 | Open *demo.html* to see a list of all the glyphs in your font along with their codes/ligatures. 2 | 3 | You won't need any of the files located under the *demo-files* directory when including the generated font in your own projects. 4 | 5 | You can import *selection.json* back to the IcoMoon app using the *Import Icons* button (or via Main Menu > Manage Projects) to retrieve your icon selection. 6 | -------------------------------------------------------------------------------- /public/images/icomoon/demo-files/demo.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding: 0; 3 | margin: 0; 4 | font-family: sans-serif; 5 | font-size: 1em; 6 | line-height: 1.5; 7 | color: #555; 8 | background: #fff; 9 | } 10 | h1 { 11 | font-size: 1.5em; 12 | font-weight: normal; 13 | } 14 | small { 15 | font-size: .66666667em; 16 | } 17 | a { 18 | color: #e74c3c; 19 | text-decoration: none; 20 | } 21 | a:hover, a:focus { 22 | box-shadow: 0 1px #e74c3c; 23 | } 24 | .bshadow0, input { 25 | box-shadow: inset 0 -2px #e7e7e7; 26 | } 27 | input:hover { 28 | box-shadow: inset 0 -2px #ccc; 29 | } 30 | input, fieldset { 31 | font-size: 1em; 32 | margin: 0; 33 | padding: 0; 34 | border: 0; 35 | } 36 | input { 37 | color: inherit; 38 | line-height: 1.5; 39 | height: 1.5em; 40 | padding: .25em 0; 41 | } 42 | input:focus { 43 | outline: none; 44 | box-shadow: inset 0 -2px #449fdb; 45 | } 46 | .glyph { 47 | font-size: 16px; 48 | width: 15em; 49 | padding-bottom: 1em; 50 | margin-right: 4em; 51 | margin-bottom: 1em; 52 | float: left; 53 | overflow: hidden; 54 | } 55 | .liga { 56 | width: 80%; 57 | width: calc(100% - 2.5em); 58 | } 59 | .talign-right { 60 | text-align: right; 61 | } 62 | .talign-center { 63 | text-align: center; 64 | } 65 | .bgc1 { 66 | background: #f1f1f1; 67 | } 68 | .fgc1 { 69 | color: #999; 70 | } 71 | .fgc0 { 72 | color: #000; 73 | } 74 | p { 75 | margin-top: 1em; 76 | margin-bottom: 1em; 77 | } 78 | .mvm { 79 | margin-top: .75em; 80 | margin-bottom: .75em; 81 | } 82 | .mtn { 83 | margin-top: 0; 84 | } 85 | .mtl, .mal { 86 | margin-top: 1.5em; 87 | } 88 | .mbl, .mal { 89 | margin-bottom: 1.5em; 90 | } 91 | .mal, .mhl { 92 | margin-left: 1.5em; 93 | margin-right: 1.5em; 94 | } 95 | .mhmm { 96 | margin-left: 1em; 97 | margin-right: 1em; 98 | } 99 | .mls { 100 | margin-left: .25em; 101 | } 102 | .ptl { 103 | padding-top: 1.5em; 104 | } 105 | .pbs, .pvs { 106 | padding-bottom: .25em; 107 | } 108 | .pvs, .pts { 109 | padding-top: .25em; 110 | } 111 | .clearfix { 112 | zoom: 1; 113 | } 114 | .unit { 115 | float: left; 116 | } 117 | .unitRight { 118 | float: right; 119 | } 120 | .size1of2 { 121 | width: 50%; 122 | } 123 | .size1of1 { 124 | width: 100%; 125 | } 126 | .clearfix:before, .clearfix:after { 127 | content: " "; 128 | display: table; 129 | } 130 | .clearfix:after { 131 | clear: both; 132 | } 133 | .hidden-true { 134 | display: none; 135 | } 136 | .textbox0 { 137 | width: 3em; 138 | background: #f1f1f1; 139 | padding: .25em .5em; 140 | line-height: 1.5; 141 | height: 1.5em; 142 | } 143 | #testDrive { 144 | padding-top: 24px; 145 | line-height: 1.5; 146 | } 147 | .fs0 { 148 | font-size: 16px; 149 | } 150 | .fs1 { 151 | font-size: 32px; 152 | } 153 | -------------------------------------------------------------------------------- /public/images/icomoon/demo-files/demo.js: -------------------------------------------------------------------------------- 1 | if (!('boxShadow' in document.body.style)) { 2 | document.body.setAttribute('class', 'noBoxShadow'); 3 | } 4 | 5 | document.body.addEventListener("click", function(e) { 6 | var target = e.target; 7 | if (target.tagName === "INPUT" && 8 | target.getAttribute('class').indexOf('liga') === -1) { 9 | target.select(); 10 | } 11 | }); 12 | 13 | (function() { 14 | var fontSize = document.getElementById('fontSize'), 15 | testDrive = document.getElementById('testDrive'), 16 | testText = document.getElementById('testText'); 17 | function updateTest() { 18 | testDrive.innerHTML = testText.value || String.fromCharCode(160); 19 | if (window.icomoonLiga) { 20 | window.icomoonLiga(testDrive); 21 | } 22 | } 23 | function updateSize() { 24 | testDrive.style.fontSize = fontSize.value + 'px'; 25 | } 26 | fontSize.addEventListener('change', updateSize, false); 27 | testText.addEventListener('input', updateTest, false); 28 | testText.addEventListener('change', updateTest, false); 29 | updateSize(); 30 | }()); 31 | -------------------------------------------------------------------------------- /public/images/icomoon/demo.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IcoMoon Demo 6 | 7 | 8 | 9 | 10 | 11 |
12 |

Font Name: icomoon (Glyphs: 5)

13 |
14 |
15 |

Grid Size: 16

16 |
17 |
18 | icon-camera 19 |
20 |
21 | 22 | 23 |
24 |
25 | liga: 26 | 27 |
28 |
29 |
30 |
31 | icon-phone-hang-up 32 |
33 |
34 | 35 | 36 |
37 |
38 | liga: 39 | 40 |
41 |
42 |
43 |
44 | icon-expand 45 |
46 |
47 | 48 | 49 |
50 |
51 | liga: 52 | 53 |
54 |
55 |
56 |
57 | icon-contract 58 |
59 |
60 | 61 | 62 |
63 |
64 | liga: 65 | 66 |
67 |
68 |
69 |
70 | icon-volume-mute 71 |
72 |
73 | 74 | 75 |
76 |
77 | liga: 78 | 79 |
80 |
81 |
82 | 83 | 84 |
85 |

Font Test Drive

86 | 91 | 93 | 94 |
  95 |
96 |
97 | 98 |
99 |

Generated by IcoMoon

100 |
101 | 102 | 103 | 104 | -------------------------------------------------------------------------------- /public/images/icomoon/fonts/icomoon.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardeepmehta/webrtc-rooms/b871b08cc727c69034bf87c9010ca69ec1c1d7f8/public/images/icomoon/fonts/icomoon.eot -------------------------------------------------------------------------------- /public/images/icomoon/fonts/icomoon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Generated by IcoMoon 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /public/images/icomoon/fonts/icomoon.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardeepmehta/webrtc-rooms/b871b08cc727c69034bf87c9010ca69ec1c1d7f8/public/images/icomoon/fonts/icomoon.ttf -------------------------------------------------------------------------------- /public/images/icomoon/fonts/icomoon.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardeepmehta/webrtc-rooms/b871b08cc727c69034bf87c9010ca69ec1c1d7f8/public/images/icomoon/fonts/icomoon.woff -------------------------------------------------------------------------------- /public/images/icomoon/selection.json: -------------------------------------------------------------------------------- 1 | { 2 | "IcoMoonType": "selection", 3 | "icons": [ 4 | { 5 | "icon": { 6 | "paths": [ 7 | "M384 288c0-88.366 71.634-160 160-160s160 71.634 160 160c0 88.366-71.634 160-160 160-88.366 0-160-71.634-160-160zM0 288c0-88.366 71.634-160 160-160 88.366 0 160 71.634 160 160 0 88.366-71.634 160-160 160-88.366 0-160-71.634-160-160zM768 608v-96c0-35.2-28.8-64-64-64h-160-480c-35.2 0-64 28.8-64 64v320c0 35.2 28.8 64 64 64h640c35.2 0 64-28.8 64-64v-96l256 160v-448l-256 160zM640 768h-512v-192h512v192z" 8 | ], 9 | "tags": [ 10 | "camera", 11 | "video", 12 | "media", 13 | "film", 14 | "movie" 15 | ], 16 | "grid": 16 17 | }, 18 | "properties": { 19 | "id": 20, 20 | "order": 11, 21 | "prevSize": 32, 22 | "code": 58880, 23 | "name": "camera", 24 | "ligatures": "" 25 | }, 26 | "setIdx": 0, 27 | "iconIdx": 20 28 | }, 29 | { 30 | "icon": { 31 | "paths": [ 32 | "M1017.378 575.994c8.004 55.482 13.216 131.392-11.664 160.446-41.142 48.044-301.712 48.044-301.712-48.042 0-48.398 42.856-80.134 1.712-128.178-40.472-47.262-113.026-48.030-193.714-48.042-80.686 0.012-153.242 0.78-193.714 48.042-41.142 48.046 1.714 79.78 1.714 128.178 0 96.086-260.57 96.086-301.714 48.044-24.878-29.054-19.668-104.964-11.662-160.446 6.16-37.038 21.724-76.996 71.548-127.994 0-0.002 0.002-0.002 0.002-0.004 74.738-69.742 187.846-126.738 429.826-127.968v-0.030c1.344 0 2.664 0.010 4 0.014 1.338-0.004 2.656-0.014 4-0.014v0.028c241.98 1.23 355.088 58.226 429.826 127.968 0.002 0.002 0.002 0.004 0.002 0.004 49.824 50.996 65.39 90.954 71.55 127.994z" 33 | ], 34 | "tags": [ 35 | "phone-hang-up", 36 | "contact", 37 | "telephone", 38 | "support", 39 | "call" 40 | ], 41 | "grid": 16 42 | }, 43 | "properties": { 44 | "id": 61, 45 | "order": 9, 46 | "prevSize": 32, 47 | "code": 58881, 48 | "name": "phone-hang-up", 49 | "ligatures": "" 50 | }, 51 | "setIdx": 0, 52 | "iconIdx": 61 53 | }, 54 | { 55 | "icon": { 56 | "paths": [ 57 | "M1024 0v416l-160-160-192 192-96-96 192-192-160-160zM448 672l-192 192 160 160h-416v-416l160 160 192-192z" 58 | ], 59 | "tags": [ 60 | "expand", 61 | "enlarge", 62 | "maximize", 63 | "fullscreen" 64 | ], 65 | "grid": 16 66 | }, 67 | "properties": { 68 | "id": 132, 69 | "order": 7, 70 | "prevSize": 32, 71 | "code": 58882, 72 | "name": "expand", 73 | "ligatures": "" 74 | }, 75 | "setIdx": 0, 76 | "iconIdx": 132 77 | }, 78 | { 79 | "icon": { 80 | "paths": [ 81 | "M448 576v416l-160-160-192 192-96-96 192-192-160-160zM1024 96l-192 192 160 160h-416v-416l160 160 192-192z" 82 | ], 83 | "tags": [ 84 | "contract", 85 | "minimize", 86 | "shrink", 87 | "collapse" 88 | ], 89 | "grid": 16 90 | }, 91 | "properties": { 92 | "id": 133, 93 | "order": 8, 94 | "prevSize": 32, 95 | "code": 58883, 96 | "name": "contract", 97 | "ligatures": "" 98 | }, 99 | "setIdx": 0, 100 | "iconIdx": 133 101 | }, 102 | { 103 | "icon": { 104 | "paths": [ 105 | "M401.332 78.668c25.668-25.668 46.668-16.968 46.668 19.332v828c0 36.3-21 44.998-46.668 19.33l-241.332-241.33h-160v-384h160l241.332-241.332zM960 619.148v84.852h-84.852l-107.148-107.148-107.148 107.148h-84.852v-84.852l107.148-107.148-107.148-107.148v-84.852h84.852l107.148 107.148 107.148-107.148h84.852v84.852l-107.148 107.148z" 106 | ], 107 | "tags": [ 108 | "volume-mute", 109 | "speaker", 110 | "media control", 111 | "audio", 112 | "mute" 113 | ], 114 | "grid": 16 115 | }, 116 | "properties": { 117 | "id": 280, 118 | "order": 10, 119 | "prevSize": 32, 120 | "code": 58884, 121 | "name": "volume-mute", 122 | "ligatures": "" 123 | }, 124 | "setIdx": 0, 125 | "iconIdx": 280 126 | } 127 | ], 128 | "height": 1024, 129 | "metadata": { 130 | "name": "icomoon" 131 | }, 132 | "preferences": { 133 | "fontPref": { 134 | "prefix": "icon-", 135 | "metadata": { 136 | "fontFamily": "icomoon" 137 | }, 138 | "showGlyphs": true, 139 | "metrics": { 140 | "emSize": 512, 141 | "baseline": 6.25, 142 | "whitespace": 50 143 | }, 144 | "resetPoint": 58880, 145 | "showQuickUse": true, 146 | "quickUsageToken": false, 147 | "showMetrics": true, 148 | "showMetadata": false 149 | }, 150 | "imagePref": { 151 | "color": 0, 152 | "height": 32, 153 | "columns": 16, 154 | "margin": 16, 155 | "png": false, 156 | "sprites": true 157 | }, 158 | "historySize": 100, 159 | "showCodes": true, 160 | "gridSize": 16, 161 | "showLiga": false, 162 | "showGrid": true, 163 | "showGlyphs": true, 164 | "showQuickUse": true, 165 | "search": "" 166 | } 167 | } -------------------------------------------------------------------------------- /public/images/icomoon/style.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'icomoon'; 3 | src:url('fonts/icomoon.eot?wiku19'); 4 | src:url('fonts/icomoon.eot?#iefixwiku19') format('embedded-opentype'), 5 | url('fonts/icomoon.woff?wiku19') format('woff'), 6 | url('fonts/icomoon.ttf?wiku19') format('truetype'), 7 | url('fonts/icomoon.svg?wiku19#icomoon') format('svg'); 8 | font-weight: normal; 9 | font-style: normal; 10 | } 11 | 12 | [class^="icon-"], [class*=" icon-"] { 13 | font-family: 'icomoon'; 14 | speak: none; 15 | font-style: normal; 16 | font-weight: normal; 17 | font-variant: normal; 18 | text-transform: none; 19 | line-height: 1; 20 | 21 | /* Better Font Rendering =========== */ 22 | -webkit-font-smoothing: antialiased; 23 | -moz-osx-font-smoothing: grayscale; 24 | } 25 | 26 | .icon-camera:before { 27 | content: "\e600"; 28 | } 29 | .icon-phone-hang-up:before { 30 | content: "\e601"; 31 | } 32 | .icon-expand:before { 33 | content: "\e602"; 34 | } 35 | .icon-contract:before { 36 | content: "\e603"; 37 | } 38 | .icon-volume-mute:before { 39 | content: "\e604"; 40 | } 41 | -------------------------------------------------------------------------------- /public/images/mic-on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardeepmehta/webrtc-rooms/b871b08cc727c69034bf87c9010ca69ec1c1d7f8/public/images/mic-on.png -------------------------------------------------------------------------------- /public/images/video-on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardeepmehta/webrtc-rooms/b871b08cc727c69034bf87c9010ca69ec1c1d7f8/public/images/video-on.png -------------------------------------------------------------------------------- /public/images/video.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardeepmehta/webrtc-rooms/b871b08cc727c69034bf87c9010ca69ec1c1d7f8/public/images/video.png -------------------------------------------------------------------------------- /public/public.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Sample webrtc video and audio chat 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 | Enter Your Username 47 |
48 |
49 | 50 | 51 |
52 |
53 |
54 |
55 | 56 | 73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 | 82 | 113 | 117 | 118 |
119 | 120 |
121 | 122 |
123 | 124 |
125 | 126 | -------------------------------------------------------------------------------- /public/scripts/adapter.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. 7 | */ 8 | 9 | /* More information about these options at jshint.com/docs/options */ 10 | 11 | /* jshint browser: true, camelcase: true, curly: true, devel: true, 12 | eqeqeq: true, forin: false, globalstrict: true, quotmark: single, 13 | undef: true, unused: strict */ 14 | 15 | /* global mozRTCIceCandidate, mozRTCPeerConnection, 16 | mozRTCSessionDescription, webkitRTCPeerConnection */ 17 | 18 | /* exported trace */ 19 | 20 | 'use strict'; 21 | 22 | var RTCPeerConnection = null; 23 | var getUserMedia = null; 24 | var attachMediaStream = null; 25 | var reattachMediaStream = null; 26 | var webrtcDetectedBrowser = null; 27 | var webrtcDetectedVersion = null; 28 | var isChrome=false; 29 | function trace(text) { 30 | // This function is used for logging. 31 | if (text[text.length - 1] === '\n') { 32 | text = text.substring(0, text.length - 1); 33 | } 34 | console.log((window.performance.now() / 1000).toFixed(3) + ': ' + text); 35 | } 36 | 37 | function maybeFixConfiguration(pcConfig) { 38 | if (!pcConfig) { 39 | return; 40 | } 41 | for (var i = 0; i < pcConfig.iceServers.length; i++) { 42 | if (pcConfig.iceServers[i].hasOwnProperty('urls')) { 43 | pcConfig.iceServers[i].url = pcConfig.iceServers[i].urls; 44 | delete pcConfig.iceServers[i].urls; 45 | } 46 | } 47 | } 48 | 49 | if (navigator.mozGetUserMedia) { 50 | console.log('This appears to be Firefox'); 51 | 52 | webrtcDetectedBrowser = 'firefox'; 53 | 54 | webrtcDetectedVersion = 55 | parseInt(navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1], 10); 56 | 57 | // The RTCPeerConnection object. 58 | RTCPeerConnection = function(pcConfig, pcConstraints) { 59 | // .urls is not supported in FF yet. 60 | maybeFixConfiguration(pcConfig); 61 | return new mozRTCPeerConnection(pcConfig, pcConstraints); 62 | }; 63 | 64 | // The RTCSessionDescription object. 65 | window.RTCSessionDescription = mozRTCSessionDescription; 66 | 67 | // The RTCIceCandidate object. 68 | window.RTCIceCandidate = mozRTCIceCandidate; 69 | 70 | // getUserMedia shim (only difference is the prefix). 71 | // Code from Adam Barth. 72 | getUserMedia = navigator.mozGetUserMedia.bind(navigator); 73 | navigator.getUserMedia = getUserMedia; 74 | 75 | // Creates ICE server from the URL for FF. 76 | window.createIceServer = function(url, username, password) { 77 | var iceServer = null; 78 | var urlParts = url.split(':'); 79 | if (urlParts[0].indexOf('stun') === 0) { 80 | // Create ICE server with STUN URL. 81 | iceServer = { 82 | 'url': url 83 | }; 84 | } else if (urlParts[0].indexOf('turn') === 0) { 85 | if (webrtcDetectedVersion < 27) { 86 | // Create iceServer with turn url. 87 | // Ignore the transport parameter from TURN url for FF version <=27. 88 | var turnUrlParts = url.split('?'); 89 | // Return null for createIceServer if transport=tcp. 90 | if (turnUrlParts.length === 1 || 91 | turnUrlParts[1].indexOf('transport=udp') === 0) { 92 | iceServer = { 93 | 'url': turnUrlParts[0], 94 | 'credential': password, 95 | 'username': username 96 | }; 97 | } 98 | } else { 99 | // FF 27 and above supports transport parameters in TURN url, 100 | // So passing in the full url to create iceServer. 101 | iceServer = { 102 | 'url': url, 103 | 'credential': password, 104 | 'username': username 105 | }; 106 | } 107 | } 108 | return iceServer; 109 | }; 110 | 111 | window.createIceServers = function(urls, username, password) { 112 | var iceServers = []; 113 | // Use .url for FireFox. 114 | for (var i = 0; i < urls.length; i++) { 115 | var iceServer = 116 | window.createIceServer(urls[i], username, password); 117 | if (iceServer !== null) { 118 | iceServers.push(iceServer); 119 | } 120 | } 121 | return iceServers; 122 | }; 123 | 124 | // Attach a media stream to an element. 125 | attachMediaStream = function(element, stream) { 126 | console.log('Attaching media stream'); 127 | element.mozSrcObject = stream; 128 | }; 129 | 130 | reattachMediaStream = function(to, from) { 131 | console.log('Reattaching media stream'); 132 | to.mozSrcObject = from.mozSrcObject; 133 | }; 134 | 135 | } else if (navigator.webkitGetUserMedia) { 136 | console.log('This appears to be Chrome'); 137 | isChrome = true; 138 | webrtcDetectedBrowser = 'chrome'; 139 | // Temporary fix until crbug/374263 is fixed. 140 | // Setting Chrome version to 999, if version is unavailable. 141 | var result = navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./); 142 | if (result !== null) { 143 | webrtcDetectedVersion = parseInt(result[2], 10); 144 | } else { 145 | webrtcDetectedVersion = 999; 146 | } 147 | 148 | // Creates iceServer from the url for Chrome M33 and earlier. 149 | window.createIceServer = function(url, username, password) { 150 | var iceServer = null; 151 | var urlParts = url.split(':'); 152 | if (urlParts[0].indexOf('stun') === 0) { 153 | // Create iceServer with stun url. 154 | iceServer = { 155 | 'url': url 156 | }; 157 | } else if (urlParts[0].indexOf('turn') === 0) { 158 | // Chrome M28 & above uses below TURN format. 159 | iceServer = { 160 | 'url': url, 161 | 'credential': password, 162 | 'username': username 163 | }; 164 | } 165 | return iceServer; 166 | }; 167 | 168 | // Creates iceServers from the urls for Chrome M34 and above. 169 | window.createIceServers = function(urls, username, password) { 170 | var iceServers = []; 171 | if (webrtcDetectedVersion >= 34) { 172 | // .urls is supported since Chrome M34. 173 | iceServers = { 174 | 'urls': urls, 175 | 'credential': password, 176 | 'username': username 177 | }; 178 | } else { 179 | for (var i = 0; i < urls.length; i++) { 180 | var iceServer = 181 | window.createIceServer(urls[i], username, password); 182 | if (iceServer !== null) { 183 | iceServers.push(iceServer); 184 | } 185 | } 186 | } 187 | return iceServers; 188 | }; 189 | 190 | // The RTCPeerConnection object. 191 | RTCPeerConnection = function(pcConfig, pcConstraints) { 192 | // .urls is supported since Chrome M34. 193 | if (webrtcDetectedVersion < 34) { 194 | maybeFixConfiguration(pcConfig); 195 | } 196 | return new webkitRTCPeerConnection(pcConfig, pcConstraints); 197 | }; 198 | 199 | // Get UserMedia (only difference is the prefix). 200 | // Code from Adam Barth. 201 | getUserMedia = navigator.webkitGetUserMedia.bind(navigator); 202 | navigator.getUserMedia = getUserMedia; 203 | 204 | // Attach a media stream to an element. 205 | attachMediaStream = function(element, stream) { 206 | if (typeof element.srcObject !== 'undefined') { 207 | element.srcObject = stream; 208 | } else if (typeof element.mozSrcObject !== 'undefined') { 209 | element.mozSrcObject = stream; 210 | } else if (typeof element.src !== 'undefined') { 211 | element.src = URL.createObjectURL(stream); 212 | } else { 213 | console.log('Error attaching stream to element.'); 214 | } 215 | }; 216 | 217 | reattachMediaStream = function(to, from) { 218 | to.src = from.src; 219 | }; 220 | } else { 221 | console.log('Browser does not appear to be WebRTC-capable'); 222 | } -------------------------------------------------------------------------------- /public/scripts/chat-solo.js: -------------------------------------------------------------------------------- 1 | $(window).load(function(){ 2 | var height = window.innerHeight - 81; 3 | var firstHeight = $('#first-section').height()/height; 4 | var thirdHeight = $('#third-section').height()/height; 5 | var fourthHeight = $('#fourth-section').height()/height; 6 | var secondHeight = (1 - firstHeight - thirdHeight - fourthHeight)*100; 7 | var percentage = secondHeight + '%'; 8 | $('#second-section').css({ 9 | height: percentage 10 | }); 11 | var btm; 12 | // if(window.innerHeight < 659 && isChrome) 13 | // { 14 | // btm = 95; 15 | // } 16 | // else 17 | // { 18 | // if(isChrome) 19 | // { 20 | // btm = 116; 21 | // } 22 | // else 23 | // { 24 | // btm = 130; 25 | // $('#third-section form textarea').css({ 26 | // 'height': 133 27 | // }); 28 | // } 29 | // } 30 | // if(window) 31 | // $('#sidebar-right').css({ 32 | // 'height': height, 33 | // 'bottom': btm 34 | // }); 35 | // $('#sidebar-chat-right').css({ 36 | // 'bottom': btm 37 | // }); 38 | 39 | var left = (window.innerWidth - main_width)/2; 40 | var top = 3; 41 | $('#sidebar-right').css({ 42 | 'height': height, 43 | 'left': -left, 44 | 'top': -top 45 | }); 46 | $('#sidebar-chat-right').css({ 47 | 'bottom': btm, 48 | 'left': -left, 49 | 'top': -top 50 | }); 51 | 52 | oldHeight = $('#second-section').height(); 53 | $('#second-section-form').submit(function(e){ 54 | e.preventDefault(); 55 | var data = $('#first-chat').val(); 56 | var trimmed = $.trim(data); 57 | if(trimmed!='') 58 | { 59 | socket.emit('this-chat-data',data); 60 | $('#first-chat').val(''); 61 | $('#second-section').append('
'+data+'
'); 62 | animateChatData(); 63 | } 64 | }); 65 | 66 | $('#first-plane').click(function(){ 67 | $('#second-section-form').submit(); 68 | }); 69 | 70 | $('#second-section-form textarea').keyup(function (event) { 71 | if (event.keyCode == 13 && event.shiftKey) { 72 | var content = this.value; 73 | var caret = getCaret(this); 74 | this.value = content.substring(0,caret)+"\n"+content.substring(carent,content.length-1); 75 | event.stopPropagation(); 76 | 77 | }else if(event.keyCode == 13) 78 | { 79 | $('#second-section-form').submit(); 80 | } 81 | }); 82 | 83 | $('#first-right-icons img').eq(0).click(function(){ 84 | resetChatBuffer(); 85 | $('#sidebar-right').fadeOut(200); 86 | $('#local-chat-arrow').fadeIn(200); 87 | }); 88 | }); 89 | 90 | function getCaret(el) { 91 | if (el.selectionStart) { 92 | return el.selectionStart; 93 | } else if (document.selection) { 94 | el.focus(); 95 | 96 | var r = document.selection.createRange(); 97 | if (r == null) { 98 | return 0; 99 | } 100 | 101 | var re = el.createTextRange(), 102 | rc = re.duplicate(); 103 | re.moveToBookmark(r.getBookmark()); 104 | rc.setEndPoint('EndToStart', re); 105 | 106 | return rc.text.length; 107 | } 108 | return 0; 109 | } -------------------------------------------------------------------------------- /public/scripts/chat.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | var height = $(window).height(); 3 | var margin = height/2 - 219/2-55; 4 | $('#get-user').css({ 5 | 'margin-top': margin 6 | }); 7 | }); -------------------------------------------------------------------------------- /public/scripts/countdown-logic.js: -------------------------------------------------------------------------------- 1 | $(function(){ 2 | var seconds = 0, minutes = 0, hours = 0, t, append; 3 | function add() { 4 | seconds++; 5 | if (seconds >= 60) { 6 | seconds = 0; 7 | minutes++; 8 | if (minutes >= 60) { 9 | minutes = 0; 10 | hours++; 11 | } 12 | } 13 | 14 | append = (hours ? (hours > 9 ? hours : "0" + hours) : "00") + ":" + (minutes ? (minutes > 9 ? minutes : "0" + minutes) : "00") + ":" + (seconds > 9 ? seconds : "0" + seconds); 15 | $('#timer').html( append ); 16 | timer(); 17 | } 18 | function timer() { 19 | t = setTimeout(add, 1000); 20 | } 21 | timer(); 22 | }); -------------------------------------------------------------------------------- /public/scripts/countdown/CSS/jquery.countdownTimer.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | * Author - Harshen Amarnath Pandey 4 | * Version - 1.0.5 5 | * Release - 09th June 2014 6 | * Copyright (c) 2014 - 2018 Harshen Pandey 7 | */ 8 | 9 | /* jquery.countdownTimer.css*/ 10 | 11 | .style { 12 | width: 100%; 13 | font-family: sans-serif; 14 | font-weight: bold; 15 | border-style: solid; 16 | } 17 | 18 | .colorDefinition { 19 | background: #000000; 20 | color : #FFFFFF; 21 | border-color: #F0068E; 22 | } 23 | 24 | .size_xl { 25 | font-size:50px; 26 | border-width: 8px; 27 | border-radius: 6px; 28 | } 29 | 30 | .size_lg { 31 | font-size:40px; 32 | border-width: 7px; 33 | border-radius: 5px; 34 | } 35 | 36 | .size_md { 37 | font-size:30px; 38 | border-width: 5px; 39 | border-radius: 4px; 40 | } 41 | 42 | .size_sm { 43 | font-size:20px; 44 | border-width: 3px; 45 | border-radius: 3px; 46 | } 47 | 48 | .size_xs { 49 | font-size:15px; 50 | border-width: 2px; 51 | border-radius: 2px; 52 | } 53 | -------------------------------------------------------------------------------- /public/scripts/countdown/DOCS/jQuery_countdownTimer_Documentation: -------------------------------------------------------------------------------- 1 | jquery-countdownTimer Plugin 2 | ============================ 3 | 4 | (http://plugins.jquery.com/countdownTimer/) 5 | 6 | Reverse count down jQuery plugin. 7 | 8 | -------------- 9 | Introduction:- 10 | -------------- 11 | 12 | CountdownTimer is a reverse count down jQuery plugin for displaying countdown as per your need. It also displays current local time. 13 | 14 | ------------- 15 | Description:- 16 | ------------- 17 | 18 | CountdownTimer is a reverse count down jQuery plugin for displaying countdown as per your need. You can set a future date for reverse count down till that date from today or set start date and end date for reverse count down or you can set time in hours, minutes and seconds for reverse countdown to zero. Also it provides the functionality of displaying current local time. 19 | 20 | ----------------- 21 | Getting Started:- 22 | ----------------- 23 | 24 | Include jQuery, the plugin and its css on a page. 25 | 26 | 27 | 28 | 29 | 30 | Add a div and span element. 31 | 32 |
33 | 34 | Then call the countdowntimer method with the required options on the span element id. 35 | 36 | 44 | 45 | ---------- 46 | Overview:- 47 | ---------- 48 | 49 | Following are the different options provided for call to the "countdownTimer" method with their default values. 50 | 51 | hours : 0, 52 | minutes : 0, 53 | seconds : 60, 54 | startDate : new Date(), 55 | dateAndTime : new Date("0000/00/00 00:00:00"), 56 | currentTime : false, 57 | size : "sm", 58 | borderColor : "#F0068E", 59 | fontColor : "#FFFFFF", 60 | backgroundColor : "#000000", 61 | timeSeparator : ":", 62 | tickInterval : 1, 63 | timeUp : null 64 | 65 | Following are the different cases for using "countdownTimer" method with their settings. 66 | 67 | 1) Reverse countdown till a specific future date from today. (for eg:- 2015/01/01 00:00:00):- 68 | 69 | $(function(){ 70 | $("#future_date").countdowntimer({ 71 | dateAndTime : "2015/01/01 00:00:00"‚ 72 | size : "lg" 73 | }); 74 | }); 75 | 76 | "dateAndTime" takes value in format "YYYY/MM/DD HH:MM:SS" where HH is a 24 - hours format. 77 | 78 | You may be wondering how to set the "size" option. Well, It's discussed at the end in "Display Settings". 79 | 80 | 2) Reverse countdown to zero from time set to hours, minutes & seconds. 81 | 82 | $(function(){ 83 | $("#hms_timer").countdowntimer({ 84 | hours : 3‚ 85 | minutes : 10‚ 86 | seconds : 10‚ 87 | size : "lg" 88 | }); 89 | }); 90 | 91 | "hours" can take positive values starting from 0. "minutes", "seconds" takes values from 0 to 59. 92 | 93 | 3) Reverse countdown to zero from time set to hours and minutes. 94 | 95 | $(function(){ 96 | $("#hm_timer").countdowntimer({ 97 | hours : 3‚ 98 | minutes : 10‚ 99 | size : "lg" 100 | }); 101 | }); 102 | 103 | "hours" can take positive values starting from 0. "minutes" takes values from 0 to 59. 104 | 105 | 4) Reverse countdown to zero from time set to minutes and seconds. 106 | 107 | $(function(){ 108 | $("#ms_timer").countdowntimer({ 109 | minutes : 20‚ 110 | seconds : 10‚ 111 | size : "lg" 112 | }); 113 | }); 114 | 115 | "minutes" takes positive values starting from 0. "seconds" takes values from 0 to 59. 116 | 117 | 5) Reverse countdown to zero from time set to hours and seconds. 118 | 119 | $(function(){ 120 | $("#hs_timer").countdowntimer({ 121 | hours : 2‚ 122 | seconds : 10‚ 123 | size : "lg" 124 | }); 125 | }); 126 | 127 | "hours" takes positive values starting from 0. "seconds" takes values from 0 to 59. 128 | 129 | 6) Reverse countdown to zero from time set to only hours. 130 | 131 | $(function(){ 132 | $("#h_timer").countdowntimer({ 133 | hours : 2‚ 134 | size : "lg" 135 | }); 136 | }); 137 | 138 | "hours" takes positive values starting from 0. 139 | 140 | 7) Reverse countdown to zero from time set to only minutes. 141 | 142 | $(function(){ 143 | $("#m_timer").countdowntimer({ 144 | minutes : 2‚ 145 | size : "lg" 146 | }); 147 | }); 148 | 149 | "minutes" takes positive values starting from 0. 150 | 151 | 8) Reverse countdown to zero from time set to only seconds. 152 | 153 | $(function(){ 154 | $("#s_timer").countdowntimer({ 155 | seconds : 25‚ 156 | size : "lg" 157 | }); 158 | }); 159 | 160 | "seconds" takes positive values starting from 0. 161 | 162 | 9) Display current time. 163 | 164 | $(function(){ 165 | $("#current_timer").countdowntimer({ 166 | currentTime : true‚ 167 | size : "lg" 168 | }); 169 | }); 170 | 171 | "currentTime" takes either true or false. 172 | 173 | 10) Reverse countdown between a given start date (which can be server date and time or any given date) and end date. 174 | 175 | $(function(){ 176 | $("#start_timer").countdowntimer({ 177 | startDate : "2014/10/10 12:00:00", 178 | dateAndTime : "2015/10/10 12:00:00", 179 | size : "lg" 180 | }); 181 | }); 182 | 183 | For taking "startDate" as current server date and time. 184 | 185 | $(function(){ 186 | $("#start_timer").countdowntimer({ 187 | startDate : "", //Please note the format of date. 188 | dateAndTime : "2015/10/10 12:00:00", //End date 189 | size : "lg" 190 | }); 191 | }); 192 | 193 | 11) If no options provided. 194 | 195 | If no options are provided, by default timer of 60 seconds is displayed in small size. 196 | 197 | $(function(){ 198 | $("#seconds_timer").countdowntimer({ 199 | }); 200 | }); 201 | 202 | 203 | Some other configuration options:- 204 | ---------------------------------- 205 | 206 | timeSeparator => The separator between the various parts of the countdown timer. By default it is ":". 207 | 208 | eg - timeSeparator : ":" 209 | 210 | tickInterval => The time interval in which you want countdown to tick. Set the interval in seconds. Note that you should only use intervals that are multiples of a minute (60) and for only seconds timer, in the multiples of the seconds set for timer. By default it is 1. 211 | 212 | eg - tickInterval : 1 213 | 214 | timeUp => The name of the callback function that is invoked when the countdown reaches zero. Within the function this refers to the division that holds the widget. No parameters are passed in. Provide the name to this option without quotes. 215 | 216 | eg - timeUp : timeisUp 217 | 218 | 219 | Display Settings:- 220 | ------------------ 221 | 222 | Sizes (use bootstrap sizes notation). 223 | 224 | $(function(){ 225 | $("#xlarge").countdowntimer({ 226 | dateAndTime : "2015/01/01 00:00:00"‚ 227 | size : "lg" 228 | }); 229 | }); 230 | 231 | The "size" option can be set to below values. 232 | 233 | xl-Extra large 234 | 235 | lg-Large 236 | 237 | md-Medium 238 | 239 | sm-Small 240 | 241 | xs-Extra small 242 | 243 | What else, you can also set the border color, background and font color. See below. 244 | 245 | => Setting border color, background and font color. 246 | 247 | $(function(){ 248 | $("#current_timer").countdowntimer({ 249 | currentTime : true‚ 250 | size : "lg"‚ 251 | borderColor : "#5D09FA"‚ 252 | backgroundColor : "#FAF209"‚ 253 | fontColor : "#FA0909" 254 | }); 255 | }); 256 | 257 | By default "borderColor" is "#F0068E", "fontColor" is "#FFFFFF" and "backgroundColor" is "#000000". 258 | 259 | 260 | ------ 261 | Note:- 262 | ------ 263 | 264 | Please take care not to use timer options(hours, minutes, seconds), dateAndTime and currentTime simultaneously as all these options display different time. 265 | 266 | Refer the demos for more clarity. 267 | 268 | -------------- 269 | Dependencies:- 270 | -------------- 271 | 272 | jQuery greater than or equal to version 1.5. 273 | 274 | --------- 275 | Support:- 276 | --------- 277 | 278 | Please post bug reports and other contributions (enhancements, features) to the GitHub issue tracker. 279 | 280 | Copyright (c) 2014 Harshen Pandey 281 | Licensed under the MIT and GPLv3 license. 282 | -------------------------------------------------------------------------------- /public/scripts/countdown/LICENSE-MIT: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Harshen Pandey 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /public/scripts/countdown/README.md: -------------------------------------------------------------------------------- 1 | [jquery-countdownTimer Plugin](http://plugins.jquery.com/countdownTimer/)- Reverse count down jQuery plugin. 2 | =============================== 3 | 4 | ## Introduction 5 | 6 | **countdownTimer** is a reverse count down jQuery plugin for displaying countdown as per your need. It also displays current local time. 7 | 8 | ## [Help the project](https://pledgie.com/campaigns/23663) 9 | 10 | Click here to lend your support to: jQuery countdownTimer Plugin and make a donation at pledgie.com ! 11 | 12 | This project is looking for help! [You can donate to the ongoing pledgie campaign](https://pledgie.com/campaigns/23663) 13 | and help spread the word. If you've used the plugin, or plan to use, consider a donation - any amount will help. 14 | 15 | You can find the plan for how to spend the money on the [pledgie page](https://pledgie.com/campaigns/23663). 16 | 17 | ## Getting Started 18 | 19 | Include jQuery, the plugin and its css file on a page. Add a div and span element. Then call the `countdowntimer` method with the required options on the span element id. 20 | 21 | ```html 22 | 23 | 24 | 25 | 26 |
27 | 28 | 36 | ``` 37 | For more information on how to use different options, [check the documentation](https://raw.github.com/harshen/jquery-countdownTimer/master/DOCS/jQuery_countdownTimer_Documentation). 38 | 39 | Also refer the demos for more clarity. 40 | 41 | ### Dependencies 42 | 43 | jQuery greater than or equal to version 1.5. 44 | 45 | ## Support 46 | 47 | Please post bug reports and other contributions (enhancements, features) to the GitHub issue tracker. 48 | 49 | ## License 50 | 51 | Copyright (c) 2014 Harshen Pandey 52 | Licensed under the MIT and GPLv3 license. 53 | -------------------------------------------------------------------------------- /public/scripts/countdown/countdownTimer.jquery.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "countdownTimer", 3 | "title": "jQuery countdownTimer", 4 | "description": "Reverse count down jQuery plugin for displaying countdown as per need. It also displays current local time.", 5 | "keywords": [ 6 | "jquery", 7 | "countdown", 8 | "timer", 9 | "countdownTimer", 10 | "reverse", 11 | "clock", 12 | "time", 13 | "hours", 14 | "minutes", 15 | "seconds", 16 | "date", 17 | "days" 18 | ], 19 | "version": "1.0.5", 20 | "author": { 21 | "name": "Harshen Pandey", 22 | "email" : "harshenpandey@gmail.com", 23 | "url" : "http://harshen.github.io/" 24 | }, 25 | "bugs": "https://github.com/harshen/jquery-countdownTimer/issues", 26 | "homepage": "https://github.com/harshen/jquery-countdownTimer", 27 | "demo" : "http://harshen.github.io/jquery-countdownTimer/", 28 | "docs" : "https://raw.github.com/harshen/jquery-countdownTimer/master/DOCS/jQuery_countdownTimer_Documentation", 29 | "licenses": [ 30 | { 31 | "type": "MIT", 32 | "url": "http://opensource.org/licenses/MIT" 33 | }, 34 | { 35 | "type": "GPLv3", 36 | "url": "http://www.gnu.org/licenses/gpl.html" 37 | } 38 | ], 39 | "dependencies": { 40 | "jquery": ">=1.5" 41 | } 42 | } 43 | 44 | -------------------------------------------------------------------------------- /public/scripts/find.js: -------------------------------------------------------------------------------- 1 | { _mongooseOptions: {}, 2 | mongooseCollection: 3 | { collection: 4 | { db: [Object], 5 | collectionName: 'messages', 6 | internalHint: null, 7 | opts: {}, 8 | slaveOk: false, 9 | serializeFunctions: false, 10 | raw: false, 11 | pkFactory: [Object], 12 | serverCapabilities: undefined }, 13 | opts: { bufferCommands: true, capped: false }, 14 | name: 'messages', 15 | conn: 16 | { base: [Object], 17 | collections: [Object], 18 | models: {}, 19 | replica: false, 20 | hosts: null, 21 | host: 'localhost', 22 | port: 27017, 23 | user: undefined, 24 | pass: undefined, 25 | name: 'chat', 26 | options: [Object], 27 | otherDbs: [], 28 | _readyState: 1, 29 | _closeCalled: false, 30 | _hasOpened: true, 31 | _listening: true, 32 | _events: {}, 33 | db: [Object] }, 34 | queue: [], 35 | buffer: false }, 36 | model: 37 | { [Function: model] 38 | base: 39 | { connections: [Object], 40 | plugins: [], 41 | models: [Object], 42 | modelSchemas: [Object], 43 | options: [Object] }, 44 | modelName: 'Message', 45 | model: [Function: model], 46 | db: 47 | { base: [Object], 48 | collections: [Object], 49 | models: {}, 50 | replica: false, 51 | hosts: null, 52 | host: 'localhost', 53 | port: 27017, 54 | user: undefined, 55 | pass: undefined, 56 | name: 'chat', 57 | options: [Object], 58 | otherDbs: [], 59 | _readyState: 1, 60 | _closeCalled: false, 61 | _hasOpened: true, 62 | _listening: true, 63 | _events: {}, 64 | db: [Object] }, 65 | discriminators: undefined, 66 | schema: 67 | { paths: [Object], 68 | subpaths: {}, 69 | virtuals: [Object], 70 | nested: {}, 71 | inherits: {}, 72 | callQueue: [], 73 | _indexes: [], 74 | methods: {}, 75 | statics: {}, 76 | tree: [Object], 77 | _requiredpaths: undefined, 78 | discriminatorMapping: undefined, 79 | _indexedpaths: undefined, 80 | options: [Object], 81 | _events: {} }, 82 | options: undefined, 83 | collection: 84 | { collection: [Object], 85 | opts: [Object], 86 | name: 'messages', 87 | conn: [Object], 88 | queue: [], 89 | buffer: false } }, 90 | op: 'find', 91 | options: {}, 92 | _conditions: {}, 93 | _fields: undefined, 94 | _update: undefined, 95 | _path: undefined, 96 | _distinct: undefined, 97 | _collection: 98 | { collection: 99 | { collection: [Object], 100 | opts: [Object], 101 | name: 'messages', 102 | conn: [Object], 103 | queue: [], 104 | buffer: false } }, 105 | _castError: null } 106 | -------------------------------------------------------------------------------- /public/scripts/overlay.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | var hh = window.innerHeight/2 - 12; 3 | 4 | $('#black-overlay #cubes').css({ 5 | 'top': hh 6 | }); 7 | }); 8 | 9 | function showBlackOverlay() 10 | { 11 | $('#black-overlay #cubes').show(); 12 | $('#black-overlay').removeClass(); 13 | $('#black-overlay').show(); 14 | } 15 | 16 | function removeBlackOverlay() 17 | { 18 | $('#black-overlay').addClass('zoomOut'); 19 | $('#black-overlay').hide(); 20 | } 21 | 22 | function removeCubes() 23 | { 24 | $('#black-overlay #cubes').hide(); 25 | } 26 | 27 | function showImage(data) 28 | { 29 | var ht = window.innerHeight - 230; 30 | var tp = window.innerHeight/2 - ht/2; 31 | showBlackOverlay(); 32 | var url = data.attr('href'); 33 | console.log('Got url as '+url); 34 | var imageHide=$('
x
').appendTo('#black-overlay').hide(); 35 | $('#black-overlay').find('#image-container').find('img').load(function(){ 36 | imageHide.css({ 37 | 'display': 'none', 38 | 'position': 'relative', 39 | 'top': tp, 40 | 'padding-left': '26px' 41 | }); 42 | imageHide.find('img').css({ 43 | 'width': 'auto', 44 | 'height': ht, 45 | 'position': 'relative', 46 | 'cursor': 'default' 47 | }); 48 | 49 | $('#black-overlay').css({ 50 | 'cursor': 'pointer' 51 | }); 52 | removeCubes(); 53 | setTimeout(function(){ 54 | imageHide.css('display','inline-block').removeClass('zoomIn').removeClass('zoomOut').addClass('zoomIn'); 55 | },200); 56 | }); 57 | 58 | $('#black-overlay').children('.crossButton').click(function(){ 59 | removeImage(); 60 | }); 61 | 62 | $('#black-overlay').click(function(){ 63 | removeImage(); 64 | }); 65 | 66 | imageHide.find('img').click(function(e){ 67 | console.log('imageHide is clicked..'); 68 | e.stopPropagation(); 69 | }); 70 | } 71 | 72 | function removeImage() 73 | { 74 | $('#black-overlay').css({ 75 | 'cursor': 'default' 76 | }); 77 | $('#black-overlay').find('#image-container').removeClass('zoomIn').removeClass('zoomOut').addClass('zoomOut'); 78 | setTimeout(function(){ 79 | $('#black-overlay').find('#image-container').remove(); 80 | removeBlackOverlay(); 81 | },300); 82 | 83 | } 84 | 85 | function showVideo(data) 86 | { 87 | var ht = window.innerHeight - 230; 88 | var tp = window.innerHeight/2 - ht/2; 89 | showBlackOverlay(); 90 | var url = data.attr('href'); 91 | console.log('Got url as '+url); 92 | var imageHide=$('
x
81 | 98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 | 107 | 138 | 140 | 141 | 142 | -------------------------------------------------------------------------------- /public/videos/sintel.webm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hardeepmehta/webrtc-rooms/b871b08cc727c69034bf87c9010ca69ec1c1d7f8/public/videos/sintel.webm --------------------------------------------------------------------------------