mirror of
https://github.com/gtxaspec/wz_mini_hacks.git
synced 2024-12-22 20:33:33 +00:00
pull request to display go2rtc when it is active in the webserver (#606)
* improve index.html for wz_mini webserver * shared top for dynamically generated base index * base documentation for go2rtc in webserver It seems like there should be more but I didn't immediately see any...
This commit is contained in:
parent
3e7a24f68e
commit
a8b70cf19d
@ -7,6 +7,39 @@
|
||||
|
||||
. /opt/wz_mini/wz_mini.conf
|
||||
|
||||
|
||||
compose_home()
|
||||
{
|
||||
target=/opt/wz_mini/www/index.html
|
||||
rm $target
|
||||
cp /opt/wz_mini/www/index.top.html $target
|
||||
|
||||
|
||||
if [[ "$WEB_SERVER_OPTIONS" ]]; then
|
||||
for part in $WEB_SERVER_OPTIONS
|
||||
do
|
||||
case "$part" in
|
||||
cam) echo '<a class="server_LINK" href="/cam.cgi" >Wyze Camera Core Config</a>' >> $target ;;
|
||||
config) echo '<a class="server_LINK" href="/config.cgi" >Wz Mini Configuration</a>' >> $target ;;
|
||||
car) echo '<a class="server_LINK" href="/car.html" >Car Tool</a>' >> $target ;;
|
||||
current) echo '<a class="server_LINK" href="/jpeg.cgi" >Current Screen</a>' >> $target ;;
|
||||
diag) echo '<a class="server_LINK" href="/diagnostics.cgi" >Diagnostics</a>' >> $target ;;
|
||||
esac
|
||||
done
|
||||
|
||||
echo '<a class="server_LINK" href="/mulitcam.html" >Multi-Cam</a>' >> $target
|
||||
fi
|
||||
|
||||
if [[ "$GO2RTC_SERVER_ENABLED" == "true" ]]; then
|
||||
echo '<a class="server_LINK" href="#Go2RTC" onclick="javascript:event.target.port=1984">Go2RTC Server</a>' >> $target
|
||||
|
||||
fi
|
||||
|
||||
echo '<div id="display_BAR"><div class="github_link"><a target="_new" href="https://github.com/gtxaspec/wz_mini_hacks">GitHub: wz_mini_hack</a></div></div>' >> $target
|
||||
echo '</body></html>' >> $target
|
||||
}
|
||||
|
||||
|
||||
create_httpdconf()
|
||||
{
|
||||
conffile="/opt/wz_mini/etc/httpd.conf"
|
||||
@ -28,6 +61,7 @@ EOF
|
||||
|
||||
}
|
||||
|
||||
|
||||
do_start()
|
||||
{
|
||||
create_httpdconf
|
||||
@ -57,6 +91,7 @@ if [[ "$WEB_SERVER_ENABLED" == "true" ]]; then
|
||||
case "$1" in
|
||||
start)
|
||||
echo "#####$(basename "$0")#####"
|
||||
compose_home
|
||||
do_start
|
||||
;;
|
||||
stop)
|
||||
@ -64,6 +99,7 @@ case "$1" in
|
||||
;;
|
||||
restart)
|
||||
do_stop
|
||||
compose_home
|
||||
do_start
|
||||
;;
|
||||
*)
|
||||
|
1
SD_ROOT/wz_mini/www/cgi-bin/GO2RTC_SERVER_ENABLED.md
Normal file
1
SD_ROOT/wz_mini/www/cgi-bin/GO2RTC_SERVER_ENABLED.md
Normal file
@ -0,0 +1 @@
|
||||
GO2RTC_SERVER provide an alternative way to do RTSP and streaming to web!
|
25
SD_ROOT/wz_mini/www/index.top.html
Normal file
25
SD_ROOT/wz_mini/www/index.top.html
Normal file
@ -0,0 +1,25 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>WZ Mini Web Tools</title>
|
||||
<style type="text/css">
|
||||
.server_LINK {
|
||||
display:block;
|
||||
|
||||
}
|
||||
#display_BAR {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
background-color: blue;
|
||||
border-top: 1px solid lightblue;
|
||||
color: #fff;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
height: var(--display_bar_height);
|
||||
}
|
||||
#display_BAR A , #display_BAR A:visited {
|
||||
color:white;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Wyze Mini Web Sever Menu</h1>
|
Loading…
Reference in New Issue
Block a user