Commit 03fe3594 authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

updated for new jquery-jp4 plugin

parent b7d797ad
...@@ -188,14 +188,15 @@ $(function(){ ...@@ -188,14 +188,15 @@ $(function(){
}); });
function init_jp4_previews(){ function init_jp4_previews(){
$('.port_preview').each(function(){ $('.port_preview').each(function(){
index = parseInt($(this).attr("index")); index = parseInt($(this).attr("index"));
if (jp4_previews_enable) { if (jp4_previews_enable) {
$(this).jp4({ip:location.host,port:2323+index,width:300,fast:true,lowres:4}); //$(this).jp4({ip:location.host,port:2323+index,width:300,fast:true,lowres:4});
}else{ $(this).jp4({src:"http://"+location.host+":"+(2323+index)+"/img",width:300,fast:true,lowres:4});
$(this).html("<img width='300' src='http://"+location.host+":"+(2323+index)+"/img' />"); }else{
} $(this).html("<img width='300' src='http://"+location.host+":"+(2323+index)+"/img' />");
}); }
});
} }
function init_awb_toggle(){ function init_awb_toggle(){
......
...@@ -65,7 +65,7 @@ function handleImage(e) { ...@@ -65,7 +65,7 @@ function handleImage(e) {
//console.log(SETTINGS.width); //console.log(SETTINGS.width);
view.jp4({image:myimg, fromhtmlinput: true, width:SETTINGS.width,fast:true, lowres:SETTINGS.quality, webworker_path:"../js"}); view.jp4({src:myimg, fromhtmlinput: true, width:SETTINGS.width,fast:true, lowres:SETTINGS.quality, webworker_path:"../js"});
//view.jp4({image:"test.jp4", input: false, width:1200,fast:true, lowres:1}); //view.jp4({image:"test.jp4", input: false, width:1200,fast:true, lowres:1});
$("#jp4view").append(view); $("#jp4view").append(view);
......
...@@ -477,8 +477,9 @@ function refresh_previews(){ ...@@ -477,8 +477,9 @@ function refresh_previews(){
//console.log("preview does not exist"); //console.log("preview does not exist");
var jp4prev = elem.find(".port_preview[index="+j+"]"); var jp4prev = elem.find(".port_preview[index="+j+"]");
var preview = jp4prev.jp4({ var preview = jp4prev.jp4({
ip: cam.ip, //ip: cam.ip,
port: cam.ports[j].port, //port: cam.ports[j].port,
src: "http://"+cam.ip+":"+cam.ports[j].port+"/img",
width: 200, width: 200,
fast: true, fast: true,
lowres:4, lowres:4,
......
...@@ -50,8 +50,9 @@ $(function(){ ...@@ -50,8 +50,9 @@ $(function(){
}); });
display_object = $("#display-panel").jp4({ display_object = $("#display-panel").jp4({
ip:location.host, //ip:location.host,
port:2323, //port:2323,
src: "http://"+location.host+":2323/img",
width:600, width:600,
fast:true, fast:true,
lowres:0, lowres:0,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment