Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
elphel-web-camvc
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Elphel
elphel-web-camvc
Commits
a7aa5b7e
Commit
a7aa5b7e
authored
Jun 27, 2017
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
+JP4 viewing from camvc
parent
9d3eda11
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
62 additions
and
5 deletions
+62
-5
camvc2.html
src/camvc2.html
+9
-1
camvc_camcomm.js
src/camvc_camcomm.js
+3
-1
camvc_interface.js
src/camvc_interface.js
+50
-3
No files found.
src/camvc2.html
View file @
a7aa5b7e
...
...
@@ -227,6 +227,12 @@ input {
<script
src=
"camvc_configs.js?_TIMESTAMP_"
type=
"text/javascript"
></script>
<script
src=
"camvc_dvr.js?_TIMESTAMP_"
type=
"text/javascript"
></script>
<script
src=
"js/elphel.js"
></script>
<script
src=
"js/jquery-3.1.1.js"
></script>
<script
src=
"js/jcanvas.js"
></script>
<script
src=
"js/exif.js"
></script>
<script
src=
"js/jquery-jp4.js"
></script>
</head>
<body
onload=
"initOnLoad();"
onResize=
"resizeMainWindow();"
onunload=
"hideStreamPage();"
style=
"background-color: #888888; overflow:hidden;"
>
<div
id=
"idStartup"
style=
"position:absolute; width:100%; height:100%; background-color: #ffffff; z-index:100; cursor:wait;background-image:url(images/elphel_logo256x256.png?_TIMESTAMP_);background-repeat:no-repeat;background-position:center center;"
><H1>
Loading...
</H1>
...
...
@@ -273,7 +279,9 @@ input {
<div
id=
"idShieldButtonsFromPlugin_200"
style=
"position:fixed;"
>
<!-- -->
</div>
<div
id=
"idShieldButtonsFromPlugin_225"
style=
"position:fixed;"
>
<!-- -->
</div>
<div
id=
"idDivCameraImage"
style=
"position:absolute;left:256; top:0; width:544; height:256;"
>
<img
id=
"idCameraImage"
src=
"images/empty.png?_TIMESTAMP_"
style=
"width:100%;height:100%;z-index:-3"
onClick=
"startRefresh()"
>
<div
id=
"idCameraImage_div"
style=
"position:absolute;top:0px;left:0px;width:100%;height:100%;z-index:0"
onClick=
"startRefresh()"
>
</div>
<img
id=
"idCameraImage"
src=
"images/empty.png?_TIMESTAMP_"
style=
"width:100%;height:100%;z-index:-3;display:none;"
onClick=
"startRefresh()"
>
<div
id=
"idDivCameraImageCover"
style=
"position:absolute;left:0; top:0; width:100%; height:100%;"
>
<img
src=
"images/empty.png?_TIMESTAMP_"
style=
"width:1; height:1"
>
</div>
...
...
src/camvc_camcomm.js
View file @
a7aa5b7e
...
...
@@ -440,7 +440,9 @@ Requests.prototype.sendHttpReq=function() {
this
.
url
+=
this
.
extraParameters
;
this
.
url
+=
"&_time="
+
this
.
timestamp
;
if
(
this
.
imgsrv
==
""
)
this
.
url
+=
"&imgsrv"
;
checkBadUrl
(
this
.
url
,
"Requests.prototype.sendHttpReq"
);
checkBadUrl
(
this
.
url
,
"Requests.prototype.sendHttpReq"
);
gXML_req
=
new
XMLHttpRequest
();
gXML_req
.
open
(
"GET"
,
this
.
url
,
true
);
gXML_req
.
reqObject
=
this
;
...
...
src/camvc_interface.js
View file @
a7aa5b7e
...
...
@@ -573,6 +573,8 @@ camInterface.prototype.gotHistogram=function() {
requestsNextState
(
true
);
// **** back to the main loop: GOOD
}
var
jp4obj
;
camInterface
.
prototype
.
gotShadow
=
function
()
{
// alert ("gotShadow: typeof(this)="+typeof(this)+"\ntypeof(gRequests)="+typeof(gRequests));
if
((
gPRoot
[
"comp_run"
].
getValue
()
!=
'run'
)
&&
(
gRequests
.
shadowImage
.
src
.
indexOf
(
gRequests
.
circbuf_fp
)
>=
0
))
{
...
...
@@ -581,6 +583,45 @@ camInterface.prototype.gotShadow=function() {
gRequests
.
inProgress
=
false
;
document
.
imageGot
=
true
;
document
.
getElementById
(
"idCameraImage"
).
src
=
gRequests
.
shadowImage
.
src
;
var
tmp
=
gRequests
.
imgsrv
;
tmp
=
tmp
.
split
(
":"
);
var
img_addr
=
tmp
[
1
].
replace
(
/
\/
/ig
,
""
);
var
img_port
=
tmp
[
2
].
replace
(
/
\/
/ig
,
""
);
if
(
jp4obj
!=
undefined
){
var
tmp
=
jp4obj
.
data
.
getAddr
();
if
(
img_port
!=
tmp
[
1
]){
jp4obj
.
data
.
setAddr
(
img_addr
,
img_port
);
}
var
format
=
jp4obj
.
data
.
getFormat
();
var
format_note
=
document
.
getElementById
(
"format_note"
);
if
(
format
!=
"JPEG"
){
if
(
format_note
==
null
){
format_note
=
document
.
createElement
(
"div"
);
format_note
.
setAttribute
(
"id"
,
"format_note"
);
format_note
.
style
.
cssText
=
"position:absolute;top:5px;right:5px;color:white;font-size:16px;text-shadow:0px 0px 1px rgba(50,50,50,0.5);opacity:0.7;"
;
document
.
getElementById
(
"idDivCameraImage"
).
appendChild
(
format_note
);
}
format_note
.
innerHTML
=
format
;
}
else
{
if
(
format_note
!=
null
)
format_note
.
remove
();
}
//jp4obj.data.refresh();
jp4obj
.
data
.
resize
(
document
.
getElementById
(
"idDivCameraImage"
).
offsetWidth
);
}
else
{
// this requires jquery
jp4obj
=
$
(
"#idCameraImage_div"
).
jp4
({
ip
:
img_addr
,
port
:
img_port
,
width
:
document
.
getElementById
(
"idDivCameraImage"
).
offsetWidth
,
fast
:
true
,
lowres
:
1
,
note
:
true
});
}
document
.
getElementById
(
"idImageLink"
).
href
=
gRequests
.
shadowImage
.
src
;
// frAmeselSetImage ("idMagnifier_frAmesel", gRequests.shadowImage.src);
/// copy to navigator
...
...
@@ -609,9 +650,15 @@ camInterface.prototype.gotShadow=function() {
}
else
{
dbgp
(
4
,
" Iold"
);
}
frAmeselSetImage
(
"idMagnifier_frAmesel"
,
gRequests
.
shadowImage
.
src
);
frAmeselSetImage
(
"idWindow_frAmesel"
,
gRequests
.
shadowImage
.
src
);
//new src
var
newsrc
=
(
$
(
"#idCameraImage_div"
).
find
(
"#display"
)[
0
]).
toDataURL
();
//frAmeselSetImage ("idMagnifier_frAmesel", gRequests.shadowImage.src);
//frAmeselSetImage ("idWindow_frAmesel",gRequests.shadowImage.src);
frAmeselSetImage
(
"idMagnifier_frAmesel"
,
newsrc
);
frAmeselSetImage
(
"idWindow_frAmesel"
,
newsrc
);
requestsNextState
(
true
);
// **** back to the main loop: GOOD
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment