Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
ftl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nicolas Pope
ftl
Commits
8eb6cb5b
Commit
8eb6cb5b
authored
5 years ago
by
Sami Spets
Browse files
Options
Downloads
Patches
Plain Diff
Started to implement lbide265
parent
35c0a725
No related branches found
No related tags found
No related merge requests found
Pipeline
#15891
passed
5 years ago
Stage: all
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
web-service/server/public/js/index.js
+10
-5
10 additions, 5 deletions
web-service/server/public/js/index.js
web-service/server/src/index.js
+3
-1
3 additions, 1 deletion
web-service/server/src/index.js
with
13 additions
and
6 deletions
web-service/server/public/js/index.js
+
10
−
5
View file @
8eb6cb5b
...
...
@@ -40,12 +40,15 @@ const getAvailableStreams = async () => {
}
const
videoPlayer
=
()
=>
{
const
containerDiv
=
document
.
getElementById
(
'
container
'
);
window
.
open
(
`http://localhost:8080/stream?uri=
${
asd
}
`
)
const
containerDiv
=
document
.
getElementById
(
'
container
'
)
containerDiv
.
innerHTML
=
`<h1>Stream
${
current_uri
}
is live right here!</h1><br><button onclick="renderThumbnails()">Go back</button><br>
<canvas id="ftlab-stream-video" width="0" height="0"></canvas>`
;
containerDiv
.
innerHTML
+=
'
<br>
'
containerDiv
.
innerHTML
+=
''
let
decoder
=
new
libde265
.
Decoder
();
console
.
log
(
decoder
)
}
let
webSocket
=
new
WebSocket
(
'
ws://localhost:8080/
'
)
/**
* Creates thumbnail (image) for all available streams and adds them to div class='container'
...
...
@@ -58,6 +61,7 @@ const renderThumbnails = async () => {
console
.
log
(
containerDiv
)
for
(
var
i
=
0
;
i
<
thumbnails
.
length
;
i
++
){
const
encodedURI
=
encodeURIComponent
(
thumbnails
[
i
])
current_uri
=
encodedURI
console
.
log
(
"
THUMBNAIL[i]
"
,
thumbnails
[
i
])
try
{
const
someData
=
await
fetch
(
`http://localhost:8080/stream/rgb?uri=
${
encodedURI
}
`
)
...
...
@@ -77,6 +81,7 @@ const renderThumbnails = async () => {
}
}
// //FOR LAPTOP
// const renderThumbnails = async () => {
// const containerDiv = document.getElementById('container')
...
...
@@ -118,7 +123,7 @@ const createCard = (url, viewers, uri) => {
return
`<div class='ftlab-card-component' >
<img src='
${
url
}
' class="thumbnail-img" alt="Hups" width="250px"></img>
<p>Viewers:
${
viewers
}
</p>
<button onclick="
current_uri=
${
uri
}
; window.location.href='/stream?uri=
${
uri
}
';
">button</button>
<button onclick="
videoPlayer()
">button</button>
</div>`
}
...
...
This diff is collapsed.
Click to expand it.
web-service/server/src/index.js
+
3
−
1
View file @
8eb6cb5b
...
...
@@ -275,9 +275,11 @@ app.get('/stream/config', async(req, res) => {
app
.
get
(
'
/stream
'
,
(
req
,
res
)
=>
{
let
uri
=
req
.
query
.
uri
;
uri_data
[
uri
]
console
.
log
(
uri_data
[
uri
]);
console
.
log
(
uri
)
res
.
end
();
})
/*
...
...
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