-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
96 lines (73 loc) · 2.9 KB
/
index.html
1
2
3
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>WebRTC Reversi</title>
<link rel="stylesheet" href="css/style.css">
<script src="bower_components/webrtc-adapter/release/adapter.js"></script>
<script src="bower_components/director/build/director.min.js"></script>
<script src="js/p2p-connection.js"></script>
<script async src="js/serverless-webrtc.js"></script>
</head>
<body>
<div id="createOrJoinPage" class="page-content-container hidden">
<div class="page-content">
<h1>Create or join a room?</h1>
<div class="bottom-button-container">
<button id="joinRoomButton">Join</button>
<button id="createRoomButton">Create</button>
</div>
</div>
</div>
<div id="showLocalOfferPage" class="page-content-container hidden">
<div class="page-content">
<h1>Send your local offer to someone else</h1>
<p>Here's your "offer" -- it tells someone else how to connect to you.</p>
<p>Send the whole thing to them, for example in an instant message or e-mail.</p>
<textarea id="localOfferText" rows="10" cols="100"></textarea>
<button onclick="App.router.setRoute('/create-room/await-answer')">Okay, I sent it.</button>
</div>
</div>
<div id="getRemoteAnswerPage" class="page-content-container hidden">
<div class="page-content">
<h1>Paste the "answer" you received</h1>
<p>Now paste in the "answer" that was sent back to you.</p>
<textarea id="remoteAnswerInput" rows="10" cols="100"></textarea>
<button id="answerReceivedButton">Okay, I pasted it.</button>
</div>
</div>
<div id="getRemoteOfferPage" class="page-content-container hidden">
<div class="page-content">
<h1>Paste the "offer" you received</h1>
<p>The person who created the room will send you an "offer" string. Paste it here.</p>
<textarea id="remoteOfferInput" rows="10" cols="100"></textarea>
<button id="remoteOfferReceivedButton">Okay, I pasted it.</button>
</div>
</div>
<div id="showLocalAnswerPage" class="page-content-container hidden">
<div class="page-content">
<h1>Send your local answer to someone else</h1>
<p>Here's your "answer" - it tells someone else how to connect to you.</p>
<p>Send the whole thing to them, for example in an instant message or e-mail.</p>
<textarea id="localAnswerText" rows="10" cols="100"></textarea>
<button onclick="App.router.setRoute('/await-connection')">Okay, I sent it.</button>
</div>
</div>
<div id="waitForConnectionPage" class="page-content-container hidden">
<div class="page-content">
<h1>Waiting for connection</h1>
<p>This dialog will disappear when a connection is made.</p>
<img class="spinner" src="img/spinner.gif"></img>
</div>
</div>
<div id="gamePage" class="page-content-container hidden">
<div class="page-content">
<div id="gameBoard"></div>
<div id="chatContainer">
<div id="chatlog"></div>
<input type="text" placeholder="Chat...">
</div>
</div>
</div>
</body>
</html>