mirror of
https://github.com/easytarget/esp32-cam-webserver.git
synced 2024-02-16 18:18:24 +08:00
Stream view fix, Status dump (#63)
* Better treatment of rotated stream in stream viewer, still not perfect but ok for now. * Info Page: fix #56
This commit is contained in:
@ -19,26 +19,6 @@ const uint8_t index_ov2640_html[] = R"=====(
|
||||
flex-wrap: nowrap;
|
||||
align-items: stretch
|
||||
}
|
||||
|
||||
figure img {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
width: auto;
|
||||
height: auto
|
||||
}
|
||||
|
||||
figure {
|
||||
padding: 0 0 0 0px;
|
||||
margin: 0;
|
||||
-webkit-margin-before: 0;
|
||||
margin-block-start: 0;
|
||||
-webkit-margin-after: 0;
|
||||
margin-block-end: 0;
|
||||
-webkit-margin-start: 0;
|
||||
margin-inline-start: 0;
|
||||
-webkit-margin-end: 0;
|
||||
margin-inline-end: 0
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
@ -274,7 +254,8 @@ const uint8_t index_ov2640_html[] = R"=====(
|
||||
<button id="clear_prefs" title="Erase saved Preferences on camera module">Erase</button>
|
||||
</div>
|
||||
<div class="input-group" id="cam_name-group">
|
||||
<label for="cam_name">Name:</label>
|
||||
<label for="cam_name">
|
||||
<a href="/dump" title="System Info" target="_blank">Name</a></label>
|
||||
<div id="cam_name" class="default-action"></div>
|
||||
</div>
|
||||
<div class="input-group" id="code_ver-group">
|
||||
@ -303,6 +284,7 @@ const uint8_t index_ov2640_html[] = R"=====(
|
||||
document.addEventListener('DOMContentLoaded', function (event) {
|
||||
var baseHost = document.location.origin;
|
||||
var streamURL = 'Undefined';
|
||||
var viewerURL = 'Undefined';
|
||||
|
||||
const settings = document.getElementById('sidebar')
|
||||
const waitSettings = document.getElementById('wait-settings')
|
||||
@ -391,14 +373,16 @@ const uint8_t index_ov2640_html[] = R"=====(
|
||||
rotate.value = value;
|
||||
applyRotation();
|
||||
} else if(el.id === "stream_url"){
|
||||
streamURL = value;
|
||||
viewerURL = value + 'view';
|
||||
stream_url.innerHTML = value;
|
||||
stream_link.setAttribute("title", "Open stream viewer ( " + value + "view )");
|
||||
stream_link.setAttribute("title", "Open stream viewer (" + viewerURL + ")");
|
||||
stream_link.style.textDecoration = "underline";
|
||||
stream_link.style.cursor = "pointer";
|
||||
streamURL = value;
|
||||
streamButton.setAttribute("title", `You can also browse to '${streamURL}' for a raw stream`);
|
||||
show(streamGroup)
|
||||
console.log('Stream URL set to:' + value);
|
||||
console.log('Stream URL set to: ' + streamURL);
|
||||
console.log('Stream Viewer URL set to: ' + viewerURL);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -495,7 +479,7 @@ const uint8_t index_ov2640_html[] = R"=====(
|
||||
|
||||
streamLink.onclick = () => {
|
||||
stopStream();
|
||||
window.open(streamURL + "view", "_blank");
|
||||
window.open(viewerURL, "_blank");
|
||||
}
|
||||
|
||||
stillButton.onclick = () => {
|
||||
|
Reference in New Issue
Block a user