mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-13 01:30:31 +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;
|
include /etc/nginx/proxy-params.conf;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /streamer {
|
location ~ ^/streamer/(snapshot|stream)(?:/(.*))?$ {
|
||||||
rewrite /streamer/?(.*) /$1 break;
|
rewrite /streamer/?(.*)(?:/(.*))?$ /?action=$1 break;
|
||||||
proxy_pass http://mjpg_streamer;
|
proxy_pass http://mjpg_streamer;
|
||||||
include /etc/nginx/proxy-params.conf;
|
include /etc/nginx/proxy-params.conf;
|
||||||
proxy_buffering off;
|
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
|
// XXX: In current implementation we don't need this event because Stream() has own state poller
|
||||||
|
|
||||||
var __startPoller = function() {
|
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) {
|
if (http.readyState === 2 || http.readyState === 4) {
|
||||||
var status = http.status;
|
var status = http.status;
|
||||||
http.onreadystatechange = null;
|
http.onreadystatechange = null;
|
||||||
@ -117,7 +117,7 @@ function Stream() {
|
|||||||
|
|
||||||
__normal_size = result.size;
|
__normal_size = result.size;
|
||||||
__applySizeFactor();
|
__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