| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- function setProgress(percent){
- $('input[type="range"]').val(percent).change();
- }
- function doAction(func){
- callFunc(func, '');
- }
- function queryVideoList(){
- var videos = $.checkTask.video_id.split(',');
- curVideo = videos[0];
- if(curVideo) {
- s1 = $.checkTask.start_time.replace(/-/g,"/");
- var startTime = new Date(s1).getTime()/1000;
- s1 = $.checkTask.end_time.replace(/-/g,"/");
- var endTime = new Date(s1).getTime()/1000;
-
- //获取摄像头信息
- VideoGetById(curVideo,function(data){
- if(data!=null && typeof(data)!="undefined"){
- var str = curVideo+'|'+startTime+'|'+endTime+'|'+data.cameratype+'|'+data.playtype;
- callFunc("findvideolist",str);
- }
- },function(error){
- });
- // alert(curVideo);
-
- }else{
- }
- }
- function playVideo(id){
- callFunc("playvideo", id);
- }
- var maxVV;
- function setProcessValue(maxValue){
- // alert(maxValue);
- // console.log(max);
- maxVV = maxValue;
- $("#ex1").slider({step: 5, min: 0, max: maxValue});
- }
- function setCurrentProcessValue(value){
- // alert("ddd"+value);
- // console.log(value);
-
- var vv =maxVV*(value/100)
- $("#ex1").slider('setValue',parseInt(vv));
- }
- function setVideoProcess(value){
- // console.log(value);
- var vv = value*100/maxVV;
- callFunc("setcurrenplayttime", parseInt(vv));
- }
- function callFunc(func, param){
- event = document.createEvent('MessageEvent');
- var origin = window.location.protocol + '//' + window.location.host;
- event.initMessageEvent (func, true, true, param, origin, 1234, window, null);
- document.dispatchEvent (event);
- }
|