Skip to content

Commit 659f232

Browse files
committed
Верстка
1 parent 0f1bd6c commit 659f232

File tree

7 files changed

+125
-148
lines changed

7 files changed

+125
-148
lines changed

bower.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"name": "pliv.ru",
3+
"version": "0.0.1",
4+
"homepage": "https://github.com/vaseninm/connect",
5+
"authors": [
6+
"vaseninm <[email protected]>"
7+
],
8+
"dependencies": {
9+
"jquery": "*",
10+
"angular-latest": "*",
11+
"socket.io": "*",
12+
"reset-css": "*"
13+
},
14+
"main": "index.html",
15+
"license": "MIT"
16+
}

css/main.css

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
h1 {
2+
text-align: center;
3+
font-size: 60px;
4+
}
5+
#content {
6+
display: block;
7+
width: 1200px;
8+
height: 100%;
9+
margin: 0 auto;
10+
}
11+
12+
#video {
13+
}
14+
15+
.video {
16+
display: inline;
17+
width: 300px;
18+
height: 200px;
19+
float: left;
20+
border: 1px solid #000088;
21+
border-radius: 5px;
22+
margin: 20px 30px;
23+
}
24+
25+
.video#local {
26+
border: 1px solid #008800;
27+
}
28+
29+
video {
30+
width: 100%;
31+
height: 100%;
32+
display: block;
33+
}

index.html

Lines changed: 40 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,50 @@
33
<head>
44
<title>Тест WebRTC</title>
55
<meta charset="utf-8">
6-
<script language="JavaScript" src="http://code.jquery.com/jquery-2.1.0.min.js"></script>
7-
<script language="JavaScript" src="./main.js"></script>
6+
<script language="JavaScript" src="bower_components/jquery/dist/jquery.js"></script>
7+
<script language="JavaScript" src="js/client.js"></script>
8+
9+
<link rel="stylesheet" type="text/css" href="bower_components/reset-css/reset.css" />
10+
<link rel="stylesheet" type="text/css" href="css/main.css" />
811
</head>
912
<body>
10-
<h1>Тест WebRTC</h1>
1113
<div id="content">
12-
<div class="video" id="local"></div>
13-
<div class="video" id="user" style="display: none;"></div>
14-
<div id="users">
15-
14+
<h1>Тест WebRTC</h1>
15+
<div id="video">
16+
<div class="video" id="local">
17+
<video autoplay="autoplay"></video>
18+
</div>
19+
<div class="video">
20+
<video autoplay="autoplay"></video>
21+
</div>
22+
<div class="video">
23+
<video autoplay="autoplay"></video>
24+
</div>
25+
<div class="video">
26+
<video autoplay="autoplay"></video>
27+
</div>
28+
<div class="video">
29+
<video autoplay="autoplay"></video>
30+
</div>
31+
<div class="video">
32+
<video autoplay="autoplay"></video>
33+
</div>
34+
<div class="video">
35+
<video autoplay="autoplay"></video>
36+
</div>
37+
<div class="video">
38+
<video autoplay="autoplay"></video>
39+
</div>
40+
<div class="video">
41+
<video autoplay="autoplay"></video>
42+
</div>
1643
</div>
1744
</div>
18-
<div id="call" style="display: none"><a href="#">Подключиться</a></div>
45+
46+
<!-- Немного скрытых элементов для копирования -->
47+
<div class="video" id="remote" style="display: none;">
48+
<video autoplay="autoplay"></video>
49+
</div>
50+
1951
</body>
2052
</html>

js/client.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
$(function(){
2+
var pc = null;
3+
var PeerConnection = window.mozRTCPeerConnection || window.webkitRTCPeerConnection;
4+
var IceCandidate = window.mozRTCIceCandidate || window.RTCIceCandidate;
5+
var SessionDescription = window.mozRTCSessionDescription || window.RTCSessionDescription;
6+
var WebSocket = window.WebSocket || window.MozWebSocket;
7+
navigator.getUserMedia = navigator.getUserMedia || navigator.mozGetUserMedia || navigator.webkitGetUserMedia;
8+
var connection = new WebSocket('ws://' + location.hostname + ':1337');
9+
10+
11+
});

main.js

Lines changed: 0 additions & 140 deletions
This file was deleted.

server/package.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"name": "pliv.ru",
3+
"version": "0.0.0",
4+
"description": "connect",
5+
"main": "server.js",
6+
"dependencies": {
7+
"socket.io": "*",
8+
"peer": "*"
9+
},
10+
"devDependencies": {},
11+
"scripts": {
12+
"test": "echo \"Error: no test specified\" && exit 1",
13+
"start": "node server.js"
14+
},
15+
"repository": {
16+
"type": "git",
17+
"url": "git://github.com/vaseninm/connect.git"
18+
},
19+
"author": "vaseninm <[email protected]>",
20+
"license": "MIT",
21+
"bugs": {
22+
"url": "https://github.com/vaseninm/connect/issues"
23+
},
24+
"homepage": "https://github.com/vaseninm/connect"
25+
}
File renamed without changes.

0 commit comments

Comments
 (0)