-
Notifications
You must be signed in to change notification settings - Fork 0
/
remote.html
93 lines (93 loc) · 4.9 KB
/
remote.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
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>Hello, Remote!</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<link rel="icon" href="./img/baseline-settings_remote-24px.png">
<style type="text/css">
#consoleMessagesList {
height: 50vh;
max-height: 50vh;
overflow-y: scroll;
}
</style>
</head>
<body>
<div class="container">
<h1 class="text-center my-4">
Remote Page<br/>
<small class="text-muted">This is the page used to control the screen page</small>
</h1>
<div class="alert alert-warning" role="alert" id="presentationAlert" hidden>
<h4 class="alert-heading">PresentationRequest not in window.</h4>
<p class="mb-0">If using Firefox, please enable <code>dom.presentation.controller.enabled</code> in <a href="about:config">about:config</a>.</p>
<p class="mb-0">Make sure you are running this at <code>localhost</code> or with <code>HTTPS</code> enabled.</p>
</div>
<div class="row">
<div class="col col-sm-12 col-lg-4">
<div class="card">
<div class="card-header">Connection</div>
<div class="card-body border-bottom">
<h5 class="card-title">PresentationConnection Object</h5>
<p class="card-text">The PresentationConnection Object adds properties and methods to control the current presentation session</p>
</div>
<div class="card-body">
<button type="button" class="btn btn-success btn-block" id="startScreen" title="Starts a new Presentation session" disabled>Start</button>
<button type="button" class="btn btn-info btn-block" id="reconnectScreen" title="Reconnects to a Presentation session" disabled>Reconnect</button>
<button type="button" class="btn btn-warning btn-block" id="closeScreen" title="Closes a Presentation session" disabled>Close</button>
<button type="button" class="btn btn-danger btn-block" id="terminateScreen" title="Terminates a Presentation session" disabled>Terminate</button>
<span class="badge badge-danger w-100" id="errorScreenBadge" hidden>Unable to find screen</span>
</div>
<ul class="list-group list-group-flush">
<li class="list-group-item d-flex flex-wrap justify-content-between align-items-center">
<code>binaryType</code>
<var id="connectionBinaryTypeVar">null</var>
</li>
<li class="list-group-item d-flex flex-wrap justify-content-between align-items-center">
<code>id</code>
<var id="connectionIdVar">null</var>
</li>
<li class="list-group-item d-flex flex-wrap justify-content-between align-items-center">
<code>state</code>
<span class="badge badge-secondary" id="connectionStateBadge">null</span>
</li>
<li class="list-group-item d-flex flex-wrap justify-content-between align-items-center">
<code>url</code>
<var id="connectionUrlVar">null</var>
</li>
<li class="list-group-item d-flex flex-wrap justify-content-between align-items-center">
<code class="text-muted" title="Custom property">resolution</code>
<var id="connectionResolutionVar">null</var>
</li>
</ul>
</div>
</div>
<div class="col col-sm-12 col-lg-8">
<div class="card">
<div class="card-header">
<div class="d-flex w-100 justify-content-between align-items-center">
Console
<a href="#" id="consoleClearBtn">Clear</a>
</div>
</div>
<div class="list-group list-group-flush" id="consoleMessagesList">
<div class="list-group-item text-muted">
<p class="mb-1">This is the console. It logs all messages sent by the other page.</p>
<p class="mb-1">Whenever the other page sends a message, a <code>message</code> event is sent to this page.</p>
<p class="mb-1">The sending page can also send data, which will be accessible via the <code>data</code> property of the event.</p>
</div>
</div>
<div class="card-footer">
<form id="consoleForm">
<input type="text" class="form-control" id="consoleInput" placeholder="Send a command to the other page">
<div class="invalid-feedback">Connection not found or closed</div>
</form>
</div>
</div>
</div>
</div>
</div>
<script src="./js/remote.js" charset="utf-8"></script>
</body>
</html>