Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
screen
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pub
screen
Commits
39453047
Commit
39453047
authored
8 years ago
by
Neil Gershenfeld
Browse files
Options
Downloads
Patches
Plain Diff
initial viewer commit
parent
04b234e2
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
viewer.html
+61
-0
61 additions, 0 deletions
viewer.html
with
61 additions
and
0 deletions
viewer.html
0 → 100644
+
61
−
0
View file @
39453047
<html>
<body>
<img
id=
"img"
alt=
"waiting for screen transmission to start"
><br>
<a
href=
"screen.js"
>
screen.js
</a>
<a
href=
"viewer.html"
>
viewer.html
</a>
<script
type=
"text/javascript"
>
//
// viewer.html
// screen.js content viewer
// Neil Gershenfeld
// 2/9/17
//
var
client_delay
initialize
()
update
()
function
initialize
()
{
var
req
=
new
XMLHttpRequest
()
req
.
open
(
'
GET
'
,
'
/initvars
'
,
true
);
req
.
send
()
req
.
addEventListener
(
'
loadend
'
,
function
(
evt
)
{
if
(
evt
.
loaded
==
0
)
{
req
.
abort
()
}
else
{
var
vars
=
JSON
.
parse
(
req
.
responseText
)
client_delay
=
vars
.
client_delay
}
})
var
req
=
new
XMLHttpRequest
()
req
.
open
(
'
GET
'
,
'
/initimg
'
,
true
);
req
.
responseType
=
'
blob
'
req
.
send
()
req
.
addEventListener
(
'
loadend
'
,
function
(
evt
)
{
if
(
evt
.
loaded
==
0
)
{
req
.
abort
()
}
else
{
var
url
=
window
.
URL
.
createObjectURL
(
req
.
response
)
document
.
getElementById
(
"
img
"
).
src
=
url
}
})
}
function
update
()
{
var
req
=
new
XMLHttpRequest
()
req
.
open
(
'
GET
'
,
'
/img
'
,
true
);
req
.
responseType
=
'
blob
'
req
.
send
()
req
.
addEventListener
(
'
loadend
'
,
function
(
evt
)
{
if
(
evt
.
loaded
==
0
)
{
req
.
abort
()
document
.
getElementById
(
"
img
"
).
alt
=
'
screen transmission ended
'
document
.
getElementById
(
"
img
"
).
src
=
''
}
else
{
var
url
=
window
.
URL
.
createObjectURL
(
req
.
response
)
document
.
getElementById
(
"
img
"
).
src
=
url
setTimeout
(
update
,
client_delay
)
}
})
}
</script>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment