mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-12 09:10:30 +08:00
unifised urls without binding to mjpg_streamer
This commit is contained in:
parent
16345b1005
commit
bc24d2c193
@ -112,8 +112,8 @@ http {
|
||||
include /etc/nginx/proxy-params.conf;
|
||||
}
|
||||
|
||||
location /streamer {
|
||||
rewrite /streamer/?(.*) /$1 break;
|
||||
location ~ ^/streamer/(snapshot|stream)(?:/(.*))?$ {
|
||||
rewrite /streamer/?(.*)(?:/(.*))?$ /?action=$1 break;
|
||||
proxy_pass http://mjpg_streamer;
|
||||
include /etc/nginx/proxy-params.conf;
|
||||
proxy_buffering off;
|
||||
|
||||
@ -27,7 +27,7 @@ function Stream() {
|
||||
// XXX: In current implementation we don't need this event because Stream() has own state poller
|
||||
|
||||
var __startPoller = function() {
|
||||
var http = tools.makeRequest("GET", "/streamer/?action=snapshot", function() {
|
||||
var http = tools.makeRequest("GET", "/streamer/snapshot", function() {
|
||||
if (http.readyState === 2 || http.readyState === 4) {
|
||||
var status = http.status;
|
||||
http.onreadystatechange = null;
|
||||
@ -117,7 +117,7 @@ function Stream() {
|
||||
|
||||
__normal_size = result.size;
|
||||
__applySizeFactor();
|
||||
$("stream-image").src = "/streamer/?action=stream&time=" + new Date().getTime();
|
||||
$("stream-image").src = "/streamer/stream/" + new Date().getTime();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user