1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419 |
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <meta http-equiv="Content-Script-Type" content="text/javascript" />
- <meta http-equiv="Content-Style-Type" content="text/css" />
- <meta http-equiv="X-UA-Compatible" content="IE=edge" />
- <title id="page_title"></title>
- <link rel="stylesheet" type="text/css" href="/resources/css/init.css" /> <!-- init -->
- <link rel="stylesheet" type="text/css" href="/resources/css/comm.css" /> <!-- comm -->
- <link rel="stylesheet" type="text/css" href="/resources/css/setup.css" />
- <link rel="stylesheet" type="text/css" href="/resources/css/live.css" /> <!-- live -->
-
- <script type="text/javascript" charset="utf-8" src="/resources/lib/jquery-1.9.1.min.js"></script> <!-- jquery -->
- <script src="/resources/lib/flot/jquery.flot.js" type="text/javascript"></script>
- <link rel="stylesheet" href="/resources/css/base/jquery.ui.all.css">
- <script src="/resources/lib/ui/jquery.ui.core.js"></script>
- <script src="/resources/lib/ui/jquery.ui.widget.js"></script>
- <script src="/resources/lib/ui/jquery.ui.mouse.js"></script>
- <script src="/resources/lib/ui/jquery.ui.draggable.js"></script>
- <script src="/resources/lib/ui/jquery.ui.slider.js"></script>
- <script src="/resources/lib/ui/jquery.ui.position.js"></script>
- <script src="/resources/lib/ui/jquery.ui.resizable.js"></script>
- <script src="/resources/lib/ui/jquery.ui.dialog.js"></script>
- <script src="/resources/lib/ui/jquery.ui.effect.js"></script>
- <script src="/resources/lib/ui/jquery.ui.tooltip.js"></script>
- <script src="/resources/lib/ui/jquery.ui.spinner.js"></script>
- <script src="/resources/lib/ui/jquery.ui.button.js"></script>
- <script type="text/javascript" charset="utf-8" src="/resources/lib/comm.js"></script> <!-- comm -->
- <script type="text/javascript" charset="utf-8" src="/resources/lib/live.js"></script> <!-- live -->
- <script type="text/javascript" charset="utf-8" src="/resources/lib/setup.js"></script>
- <script type="text/javascript" charset="utf-8" src="/resources/lib/jquery.customSelect.js"></script>
- <script type="text/javascript" charset="utf-8" src="/resources/lib/T_Lib.js"></script>
- <script type="text/javascript" charset="utf-8" src="/resources/lib/T_Util.js"></script>
- <script type="text/javascript" charset="utf-8" src="/resources/lib/T_Param.js"></script>
- <script type="text/javascript" charset="utf-8" src="/resources/lib/T_Dzoom.js"></script>
- <script type="text/javascript" charset="utf-8" src="/resources/lib/T_Ptz.js"></script>
- <script src="/resources/lib/tvs.js"></script>
- <script src="/resources/lib/vxgmp.js"></script>
- <!-- vxgmp -->
- <script type="text/javascript" src="/vxgplayer/vxgplayer-2.8.41.js"></script>
- <link href="/vxgplayer/vxgplayer-2.8.41.min.css" rel="stylesheet"/>
- <script>
- if (VXGMP_GetBrowser() != BR_MSIE)
- {
- if (parseInt(readSetupByKey("SYS_SUPPORT_WEBSOCKET")) == 1)
- {
- load_script = function(src) {
- // Initialize scripts queue
- if( load_script.scripts === undefined ) {
- load_script.scripts = [];
- load_script.index = -1;
- load_script.loading = false;
- load_script.next = function() {
- if( load_script.loading ) return;
- // Load the next queue item
- load_script.loading = true;
- var item = load_script.scripts[++load_script.index];
- var head = document.getElementsByTagName('head')[0];
- var script = document.createElement('script');
- script.type = 'text/javascript';
- script.src = item.src;
- // When complete, start next item in queue and resolve this item's promise
- script.onload = function() {
- load_script.loading = false;
- if( load_script.index < load_script.scripts.length - 1 ) load_script.next();
- item.resolve();
- };
- head.appendChild(script);
- };
- };
- // Adding a script to the queue
- if( src ) {
- // Check if already added
- for(var i=0; i < load_script.scripts.length; i++) {
- if( load_script.scripts[i].src == src ) return load_script.scripts[i].promise;
- }
- // Add to the queue
- var item = { src: src };
- item.promise = new Promise(function(resolve) { item.resolve = resolve;});
- load_script.scripts.push(item);
- load_script.next();
- }
- // Return the promise of the last queue item
- return load_script.scripts[ load_script.scripts.length - 1 ].promise;
- };
- [ "/vxgwsplayer/media-stream-library.dev.js",
- "/vxgwsplayer/vxgwsplayer-1.0.9.js",
- ].forEach(load_script);
- $('head').append('<link href="\/vxgwsplayer\/vxgwsplayer-1.0.9.min.css" rel="stylesheet"\/>');
- }
- }
- </script>
- <script type="text/javascript">
- $(function() {
- var centerX;
- var centerY;
- var radius;
- var cursorSize;
- function getLengthFromCenter(event) {
- x = event.clientX - centerX;
- y = event.clientY - centerY;
- l = Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2));
- return l;
- }
- function getIntersect(event) {
- r = radius - cursorSize / 2;
- r2 = Math.pow(r, 2);
- cx = event.clientX - centerX;
- cy = event.clientY - centerY;
- x = Math.sqrt(r2 / (1 + Math.pow(cy / cx, 2)));
- if(cx < 0)
- x = 0 - x;
- y = Math.sqrt(r2 / (1 + Math.pow(cx / cy, 2)));
- if(cy < 0)
- y = 0 - y;
-
- return new Array(x, y);
- }
- $( "#draggable3" ).draggable({
- containment: "#containment-wrapper", scroll: false, revert: true,
- revertDuration: 50, customPos: true, snap: "#containment-wrapper",
-
- start: function(event, ui) {
- },
- drag: function(event, ui) {
- var x;
- var y;
- var distance;
- var result = false;
- // yckim : browser resize 때문에
- var bt = document.body.scrollTop;
- var bl = document.body.scrollLeft;
- var et = document.documentElement ? document.documentElement.scrollTop : null;
- var el = document.documentElement ? document.documentElement.scrollLeft: null;
- centerX = $(containment).parent().position().left + radius - (bl || el);
- centerY = $(containment).parent().position().top + radius - (bt || et);
-
- distance = getLengthFromCenter(event);
- if(distance < (radius - cursorSize / 2))
- result = true;
- if(!result) {
- pos = getIntersect(event);
- x = pos[0] + radius - cursorSize / 2;
- y = pos[1] + radius - cursorSize / 2;
- }
- else {
- x = event.clientX - centerX + radius - cursorSize / 2;
- y = event.clientY - centerY + radius - cursorSize / 2;
- }
- ui.helper[0].style.left = x + "px";
- ui.helper[0].style.top = y + "px";
- // pan(-70 ~ 70) & tilt(-70 ~ 70)
- pan = x - radius + cursorSize / 2;
- tilt = y - radius + cursorSize / 2;
- // alert("PAN=" + pan + ", TILT=" + tilt);
- ptz_pt(ptzchannel, pan, tilt);
- return false;
- },
- stop: function() {
- // alert("test stop");
- ptz_pt(ptzchannel, 0, 0);
- }
- });
- pointer = $("#draggable3");
- containment = $("#draggable3").draggable("option", "containment");
- radius = $(containment).width() / 2;
- cursorSize = $("#draggable3").width();
- {
- var bt = document.body.scrollTop;
- var bl = document.body.scrollLeft;
- var et = document.documentElement ? document.documentElement.scrollTop : null;
- var el = document.documentElement ? document.documentElement.scrollLeft: null;
-
- centerX = $(containment).parent().position().left + radius - (bl || el);
- centerY = $(containment).parent().position().top + radius - (bt || et);
- //console.log("centerX = " + centerX + ", centerY = " + centerY);
- }
- // for mousedown and move on the containment-wrapper
- $("#containment-wrapper").slider({
- joystick: true,
- pointerId: "draggable3",
- pointerMove: function(event, pos) {
- ptz_pt(ptzchannel, pos.x, pos.y);
- }
- });
- });
- // $(function () {
- // 넓이 변경이 있을때 스크립트로 넓이 조절
- //$.changeWidth(100);
-
- // 메뉴의 경우 오픈 하고 싶은 메뉴에
- //<li class="menuWrap on"> 이렇게 on 클래스를 주시면 됩니다. 오픈이 아닐경우
- //<li class="menuWrap"> 온 클래스를 없애 주시면 닫힘니다. 세부 메뉴 링크도 동일 하게 on 클래스를 주시면 됩니다.
-
- // 각종 기능의 활성 비활성의 경우 - 초기값은 활성상태 입니다. 비활성 화 시키고 싶으실때는 아래 처럼 id를 주신 후 비활 성화 시키시면 됩니다.
- //$.khjDisable("accordion1", 0);
- //$.khjDisable("toggle1", 0);
- //$.khjDisable("selectBox1");
- //$.khjDisable("btn1");
- //$.khjDisable("slider");
- // });
- </script>
- <style type="text/css">
- /* 넓이 변경이 있을때 직접 조절 */
- /*
- .wrapWidth {width: 1026px;}
- .viewWidth {width: 785px;}
- */
- </style>
-
- <script language="JavaScript" type="text/javascript">
- var canvas_ptz = 0 ;
- var context_ptz;
- var canvas_detection_4ch = [0,0,0,0];
- var context_detection_4ch = [0,0,0,0];
- var canvas_PTZ_position = [0,0,0,0];
- var context_PTZ_position = [0,0,0,0];
- var player_init_completed = [0,0,0,0];
- var resolutionAPIString = "VID_RESOLUTION";
- var talk_disabled = 0;
- var isSemocon = 0;
- var browser = 0;
- var trnPlayer = 0;
- var trnPlayerForceJpeg = 0;
- var trnPlayerSupportWS = 0;
- var trnDetectionCamPlayerSupportWS = 0;
- var currentvalgo = 0;
- var indexcount = 0;
- var indexcount_detection_4ch = [0,0,0,0] ;
- var detection_4ch_IP = 0 ;
- var detection_4ch_HTTPPort = 0;
- var detection_4ch_HTTPSPort = 0;
- var detection_4ch_RtspPort = 0;
- var detection_4ch_BasePort = 0;
- var detection_4ch_ID = 0;
- var detection_4ch_PW = 0;
- const DETECTION_4CH_IMG_UPDATE_NAME = 'img_update_4_'
- const SHOW_DETECTIONCAM = 0;
- const HIDE_DETECTIONCAM = 1;
- const SHOW_IN_LIVE_DETECTIONCAM =0;
- const SHOW_IN_JPG_DETECTIONCAM =1;
- var show_hide_directioncam = 0; // show
- var live_jpg_directioncam = 1; // jpg
- var g_detection_info_valid = 0;
- function IS_SHOW_DETECTIONCAM()
- {
- if(SHOW_DETECTIONCAM == show_hide_directioncam) {
- return 1 ;
- }
- return 0 ;
- }
- function IS_SHOW_IN_LIVE_DETECTIONCAM()
- {
- if(SHOW_IN_LIVE_DETECTIONCAM == live_jpg_directioncam) {
- return 1 ;
- }
- return 0 ;
- }
- function Show_Hide_LiveOrJPGBtn(show)
- {
- if(is_tta) {
- $("[name=LiveOrJPGBtn]").css("display","none");
- return ;
- }
- if(show) {
- for (var i = 0; i < 4; i++) {
- if(trnDetectionCamPlayer[i] == PLAYER_WEBSOCKET || trnDetectionCamPlayer[i] == PLAYER_CHROMEPLUGIN || trnDetectionCamPlayer[i] == PLAYER_ACTIVEX){
- $("[name=LiveOrJPGBtn]").css("display","");
- break;
- }
- }
- }
- else {
- $("[name=LiveOrJPGBtn]").css("display","none");
- }
- }
- function Show_Hide_ShowHideDirectionBtn(show)
- {
- if(show) {
- $("[name=ShowHideDirectionBtn]").css("display","");
- }
- else {
- $("[name=ShowHideDirectionBtn]").css("display","none");
- }
- }
- function Show_Hide_DetectionCamWarning(show)
- {
- if(0 == show) {
- $("[name=ShowHidBtns]").css("display", "none");
- $("[name=DetectionCamInit_Warning]").css("display", "none");
- $("[name=BtnGoDetectionCam]").css("display", "none");
- }
- else {
- if(g_detection_info_valid) {
- $("[name=ShowHidBtns]").css("display", "");
- $("[name=DetectionCamInit_Warning]").css("display", "none");
- $("[name=BtnGoDetectionCam]").css("display", "none");
- }
- else {
- $("[name=ShowHidBtns]").css("display", "none");
- $("[name=DetectionCamInit_Warning]").css("display", "");
- $("[name=BtnGoDetectionCam]").css("display", "");
- }
- }
- }
- let timerTickBusy = 0;
- let timerTickId = undefined;
- function timerTick()
- {
- if($("[name=SYS_MODE]").val() != 1) {
- if (timerTickBusy == 0)
- {
- timerTickBusy = 1;
-
- var sAddress = getJPGURL(is_secondary, 0);
- var img = new Image();
- img.onload = function() {
- timerTickBusy = 0;
- if (img.naturalWidth != 0 && img.naturalHeight != 0) {
- document["img_update"].src = img.src;
- }
- }
- img.onerror = function() { timerTickBusy = 0; }
- img.onabort = function() { timerTickBusy = 0; }
- img.src = "/capturx/"+sAddress+"?index=" + indexcount;
- indexcount++;
- }
- }
- }
- var timerTickDetection4ChId = undefined;
- function timerTickDetection4Ch()
- {
- if($("[name=SYS_MODE]").val() != 1) {
- if(IS_SHOW_DETECTIONCAM()) {
- if( SUPPORT_DETECTION_CAM_4CH == g_detection_4ch_support ) {
- if(0 == player_init_completed[0] || 0 == player_init_completed[1] || 0 == player_init_completed[2] || 0 == player_init_completed[3] ) {
- return ;
- }
- for (var i = 0; i < 4; i++) {
- if (trnDetectionCamPlayer[i] == PLAYER_JPEGSNAP ||
- (!IS_SHOW_IN_LIVE_DETECTIONCAM() && IS_SHOW_DETECTIONCAM))
- {
- var sJPGURL = getJPGURL(i, 1);
- var img_update_detection_4ch = DETECTION_4CH_IMG_UPDATE_NAME + i;
- // if (document.getElementById(img_update_detection_4ch).complete)
- {
- document[img_update_detection_4ch].src = "/capturx_direction/"+sJPGURL+"?index=" + indexcount_detection_4ch[i];
- indexcount_detection_4ch[i]++;
- }
- }
- }
- }
- }
- }
- }
- function getJPGURL(sub,force_detection_cam)
- {
- if($("[name=SYS_BOARDID]").val() == 0x1003 || $("[name=SYS_BOARDID]").val() == 0x1007){
- if(sub == 0){
- sAddress = 'ch1.jpg';
- resolutionAPIString = "VID_RESOLUTION";
- }
- else if(sub == 1){
- sAddress = 'ch2.jpg';
- resolutionAPIString = "VI1_RESOLUTION";
- }
- else if(sub == 2){
- sAddress = 'ch3.jpg';
- resolutionAPIString = "VI2_RESOLUTION";
- }
- else if(sub == 3){
- sAddress = 'ch4.jpg';
- resolutionAPIString = "VI3_RESOLUTION";
- }
- else if(sub == 4){
- sAddress = 'ch1_1.jpg';
- resolutionAPIString = "VID_DUALRESOLUTION";
- }
- else if(sub == 5){
- sAddress = 'ch2_1.jpg';
- resolutionAPIString = "VI1_DUALRESOLUTION";
- }
- else if(sub == 6){
- sAddress = 'ch3_1.jpg';
- resolutionAPIString = "VI2_DUALRESOLUTION";
- }
- else if(sub == 7){
- sAddress = 'ch4_1.jpg';
- resolutionAPIString = "VI3_DUALRESOLUTION";
- }
- else if(sub == 8){
- sAddress = 'ch5.jpg';
- resolutionAPIString = "VI4_RESOLUTION";
- }
- }
- else if(($("[name=SYS_BOARDID]").val() == 0xB001) || (1 == force_detection_cam)){
- if(sub == 0){
- sAddress = 'ch1.jpg';
- if(1 != force_detection_cam) {
- resolutionAPIString = "VID_RESOLUTION";
- }
- }
- else if(sub == 1){
- sAddress = 'ch2.jpg';
- if(1 != force_detection_cam) {
- resolutionAPIString = "VI1_RESOLUTION";
- }
- }
- else if(sub == 2){
- sAddress = 'ch3.jpg';
- if(1 != force_detection_cam) {
- resolutionAPIString = "VI2_RESOLUTION";
- }
- }
- else if(sub == 3){
- sAddress = 'ch4.jpg';
- if(1 != force_detection_cam) {
- resolutionAPIString = "VI3_RESOLUTION";
- }
- }
- else if(sub == 4){
- sAddress = 'ch1_1.jpg';
- if(1 != force_detection_cam) {
- resolutionAPIString = "VID_DUALRESOLUTION";
- }
- }
- else if(sub == 5){
- sAddress = 'ch2_1.jpg';
- if(1 != force_detection_cam) {
- resolutionAPIString = "VI1_DUALRESOLUTION";
- }
- }
- else if(sub == 6){
- sAddress = 'ch3_1.jpg';
- if(1 != force_detection_cam) {
- resolutionAPIString = "VI2_DUALRESOLUTION";
- }
- }
- else if(sub == 7){
- sAddress = 'ch4_1.jpg';
- if(1 != force_detection_cam) {
- resolutionAPIString = "VI3_DUALRESOLUTION";
- }
- }
- else if(sub == 8){
- sAddress = 'ch5.jpg';
- if(1 != force_detection_cam) {
- resolutionAPIString = "VI4_RESOLUTION";
- }
- }
- else if(sub == 9){
- sAddress = 'ch5_1.jpg';
- if(1 != force_detection_cam) {
- resolutionAPIString = "VI4_DUALRESOLUTION";
- }
- }
- }
- else{
- if(sub == 0){
- sAddress = 'ch1.jpg';
- resolutionAPIString = "VID_RESOLUTION";
- }
- else if(sub == 1){
- sAddress = 'ch1_1.jpg';
- resolutionAPIString = "VID_DUALRESOLUTION";
- }
- else if(sub == 2){
- sAddress = 'ch1_2.jpg';
- resolutionAPIString = "VID_TRIPLERESOLUTION1";
- }
- else if(sub == 3){
- sAddress = 'ch1_3.jpg';
- resolutionAPIString = "VID_TRIPLERESOLUTION2";
- }
- else{
- sAddress = 'ch1.jpg';
- resolutionAPIString = "VID_RESOLUTION";
- }
- }
- return sAddress;
- }
- function getRTSPURL(sub, force_detection_cam)
- {
- if($("[name=SYS_BOARDID]").val() == 0x1003 || $("[name=SYS_BOARDID]").val() == 0x1007){
- if(sub == 0){
- sAddress = '/video1+audio1';
- resolutionAPIString = "VID_RESOLUTION";
- }
- else if(sub == 1){
- sAddress = '/video2+audio1';
- resolutionAPIString = "VI1_RESOLUTION";
- }
- else if(sub == 2){
- sAddress = '/video3+audio1';
- resolutionAPIString = "VI2_RESOLUTION";
- }
- else if(sub == 3){
- sAddress = '/video4+audio1';
- resolutionAPIString = "VI3_RESOLUTION";
- }
- else if(sub == 4){
- sAddress = '/video1s+audio1';
- resolutionAPIString = "VID_DUALRESOLUTION";
- }
- else if(sub == 5){
- sAddress = '/video2s+audio1';
- resolutionAPIString = "VI1_DUALRESOLUTION";
- }
- else if(sub == 6){
- sAddress = '/video3s+audio1';
- resolutionAPIString = "VI2_DUALRESOLUTION";
- }
- else if(sub == 7){
- sAddress = '/video4s+audio1';
- resolutionAPIString = "VI3_DUALRESOLUTION";
- }
- else if(sub == 8){
- sAddress = '/quad+audio1';
- resolutionAPIString = "VI4_RESOLUTION";
- }
- }
- else if( ($("[name=SYS_BOARDID]").val() == 0xB001) || (1 == force_detection_cam)){
- if(sub == 0){
- sAddress = '/video1';
- if(1 != force_detection_cam) {
- resolutionAPIString = "VID_RESOLUTION";
- }
- }
- else if(sub == 1){
- sAddress = '/video2';
- if(1 != force_detection_cam) {
- resolutionAPIString = "VI1_RESOLUTION";
- }
- }
- else if(sub == 2){
- sAddress = '/video3';
- if(1 != force_detection_cam) {
- resolutionAPIString = "VI2_RESOLUTION";
- }
- }
- else if(sub == 3){
- sAddress = '/video4';
- if(1 != force_detection_cam) {
- resolutionAPIString = "VI3_RESOLUTION";
- }
- }
- else if(sub == 4){
- sAddress = '/video1s1';
- if(1 != force_detection_cam) {
- resolutionAPIString = "VID_DUALRESOLUTION";
- }
- }
- else if(sub == 5){
- sAddress = '/video2s1';
- if(1 != force_detection_cam) {
- resolutionAPIString = "VI1_DUALRESOLUTION";
- }
- }
- else if(sub == 6){
- sAddress = '/video3s1';
- if(1 != force_detection_cam) {
- resolutionAPIString = "VI2_DUALRESOLUTION";
- }
- }
- else if(sub == 7){
- sAddress = '/video4s1';
- if(1 != force_detection_cam) {
- resolutionAPIString = "VI3_DUALRESOLUTION";
- }
- }
- else if(sub == 8){
- sAddress = '/quad';
- if(1 != force_detection_cam) {
- resolutionAPIString = "VI4_RESOLUTION";
- }
- }
- else if(sub == 9){
- sAddress = '/quads1';
- if(1 != force_detection_cam) {
- resolutionAPIString = "VI4_DUALRESOLUTION";
- }
- }
- }
- else{
- if(sub == 0){
- sAddress = '/video1+audio1';
- resolutionAPIString = "VID_RESOLUTION";
- }
- else if(sub == 1){
- sAddress = '/video1s+audio1';
- resolutionAPIString = "VID_DUALRESOLUTION";
- }
- else if(sub == 2){
- sAddress = '/video1s2+audio1';
- resolutionAPIString = "VID_TRIPLERESOLUTION1";
- }
- else if(sub == 3){
- sAddress = '/video1s3+audio1';
- resolutionAPIString = "VID_TRIPLERESOLUTION2";
- }
- else{
- sAddress = '/video1+audio1';
- resolutionAPIString = "VID_RESOLUTION";
- }
- }
- return sAddress;
- }
- function ptz_begin_local(cmd)
- {
- ptz_begin(ptzchannel, cmd);
- }
- function ptz_cmd_local(cmd)
- {
- ptz_cmd(ptzchannel, cmd);
- }
- function ptz_begin_semocon_ir_local(cmd, val)
- {
- ptz_begin_semocon_ir(ptzchannel, cmd, val)
- }
- function ptz_set_semocon_irvalue_preset(i)
- {
- var num;
- if(i < 10) num = "00" + i;
- else if(i < 100) num = "0" + i;
- else num = i;
- $("#after_action_select").val(readSetupByKey("PTZ_SEMOCON_PRESET_ACTION_" + num));
- }
- function on_preset_set()
- {
- var i = parseInt($( "#preset_select" ).val());
- if (i != 0) {
- if(isSemocon == 1) {
- var action = parseInt($("#after_action_select").val());
- ptz_preset_set_semocon(ptzchannel, i, action);
- }
- else {
- ptz_preset_set(ptzchannel, i);
- }
- }
- }
- function on_preset_goto()
- {
- var i = parseInt($( "#preset_select" ).val());
- if (i != 0) {
- ptz_preset_goto(ptzchannel, i);
- if(isSemocon == 1) {
- ptz_set_semocon_irvalue_preset(i);
- }
- }
- }
- function on_preset_clear()
- {
- var i = parseInt($( "#preset_select" ).val());
- if (i != 0) {
- ptz_preset_clear(ptzchannel, i);
- if(isSemocon == 1) {
- ptz_set_semocon_irvalue_preset(i);
- }
- }
- }
- function on_pattern_goto()
- {
- var i = parseInt($( "#list_select" ).val());
-
- if (i > 4){
- alert(GetLan(645));
- return;
- }
- else if (i != 0) ptz_pattern_goto(i);
- }
- function on_swing_goto()
- {
- var i = parseInt($( "#list_select" ).val());
- if (i != 0) ptz_swing_goto(i);
- }
- function on_group_goto()
- {
- var i = parseInt($( "#list_select" ).val());
- if (i != 0) ptz_group_goto(i);
- }
- function on_wiper()
- {
- writeSetupAsync("ETC_HOUSINGWIPER=0");
- }
- function on_defug()
- {
- writeSetupAsync("CAM_DEFOG_MODE_ONOFF=0");
- }
- function on_irpower()
- {
- writeSetupAsync("ETC_HOUSINGIRPOWER=0");
- }
- function on_setdo(index, state)
- {
- writeStateAsync("OUT_ALARM" + index + "=" + state);
- }
- function ptz_p7_wiper(start)
- {
- var i = parseInt($( "#WiperTime" ).val());
- if(start == 1){
- if(i == 0) ptz_general_command(0x1A);
- else if(i == 1) ptz_cmd_local('wiper_1h');
- else if(i == 2) ptz_cmd_local('wiper_2h');
- else if(i == 3) ptz_cmd_local('wiper_3h');
- }
- else{
- if(i == 0) ptz_general_command(0x1B);
- }
- }
- function on_reboot()
- {
- if (confirm(GetLan(269)) != true)
- {
- return;
- }
- writeSetupAsync("SYS_REBOOT=0");
- alert(GetLan(270));
- top.window.close();
- }
- function on_reset_zoom_module()
- {
- if (confirm(GetLan(1029)) != true)
- {
- return;
- }
- writeSetupAsync("SYS_ZOOMRESET=0");
- alert(GetLan(270));
- top.window.close();
- }
- var Full_Screen_Mode = 0;
- var FSM_Once = 1;
- var numofsensor;
- var numofalarm;
- var minwidth;
- var currnetRes = 0;
- var viewsizerate = 50;
- var displaybuffer = 0;
- var is_secondary = 0;
- var ptzchannel = 1;
- var viewaccordion;
- var started = 0;
- var initcanvas = 0;
- var Ccurrentrec = 0;
- function init_video_select(src,num)
- {
- var ch;
- var i;
- for( i=src.length; i>=0; --i ){
- src.remove( i );
- }
- if($("[name=SYS_BOARDID]").val() == 0x1003 || $("[name=SYS_BOARDID]").val() == 0x1007){
- for( i=0; i<4; i++ )
- {
- var j = i+1;
- var tmpOption = new Option();
- tmpOption.value = i;
- tmpOption.text = GetLan(107)+"#"+j + " " + GetLan(391);
- src.options.add( tmpOption, i );
- }
- for( i=4; i<8; i++ )
- {
- var j = i-3;
- var tmpOption = new Option();
- tmpOption.value = i;
- tmpOption.text = GetLan(107)+"#"+j + " " + GetLan(392);
- src.options.add( tmpOption, i );
- }
- {
- var tmpOption = new Option();
- tmpOption.value = 8;
- tmpOption.text = "Quad " + GetLan(107);
- src.options.add( tmpOption, i );
- }
- }
- else if($("[name=SYS_BOARDID]").val() == 0xB001) {
- for( i=0; i<4; i++ )
- {
- var j = i+1;
- var tmpOption = new Option();
- tmpOption.value = i;
- tmpOption.text = GetLan(107)+"#"+j + " " + GetLan(391);
- src.options.add( tmpOption, i );
- }
- for( i=4; i<8; i++ )
- {
- var j = i+1;
- var tmpOption = new Option();
- tmpOption.value = i;
- tmpOption.text = GetLan(107)+"#"+(j-4) + " " + GetLan(392);
- src.options.add( tmpOption, i );
- }
- {
- i = 8;
- var tmpOption = new Option();
- tmpOption.value = 8;
- tmpOption.text = "Quad " + GetLan(391);
- src.options.add( tmpOption, i );
- }
- {
- i = 9;
- var tmpOption = new Option();
- tmpOption.value = 9;
- tmpOption.text = "Quad " + GetLan(392);
- src.options.add( tmpOption, i );
- }
- }
- else{
- //disable Secondary#3 in AMBA
- if ((parseInt($("[name=SYS_BOARDID]").val()) & 0xF000) == 0x4000 || (parseInt($("[name=SYS_BOARDID]").val()) & 0xF000) == 0x6000
- || (parseInt($("[name=SYS_BOARDID]").val()) & 0xFFF0) == 0xD040/*S5L, TCAM/TR, IMX307*/) {num = num - 1;}
- for( i=0; i<num; i++ )
- {
- var tmpOption = new Option();
- tmpOption.value = i;
- if(i == 0){
- tmpOption.text = GetLan(391);
- }
- else{
- if(num == 2)
- tmpOption.text = GetLan(392);
- else
- tmpOption.text = GetLan(392)+"#"+i;
- }
- src.options.add( tmpOption, i );
- }
- }
- }
- function on_cameraselect_clicked()
- {
- var address = "";
- var ip = readSetupByKey("DIRECTIONCAM_IP");
- var port = 80;
- if (location.protocol == "https:") {
- port = readSetupByKey("DIRECTIONCAM_HTTPS_PORT");
- address = "https://" + ip + ":" + port;
- } else {
- port = readSetupByKey("DIRECTIONCAM_HTTP_PORT");
- address = "http://" + ip + ":" + port;
- }
- window.location.assign(address);
- }
- function on_videoselect_clicked()
- {
- is_secondary = $("#videosel").val();
- setCookie('truenvideoselect', is_secondary, 100);
- if($("[name=SYS_BOARDID]").val() == 0x1003 || $("[name=SYS_BOARDID]").val() == 0x1007 || $("[name=SYS_BOARDID]").val() == 0xB001){
- if(is_secondary == 1 || is_secondary == 5) ptzchannel = 2;
- else if(is_secondary == 2 || is_secondary == 6) ptzchannel = 3;
- else if(is_secondary == 3 || is_secondary == 7) ptzchannel = 4;
- else ptzchannel = 1;
- }
- term();
- init();
- ZoomHome();
- }
- var password_warning = 1;
- function initDialog()
- {
- $( "#dialog-warning" ).dialog({
- autoOpen: false,
- height: 160,
- width: 650,
- modal: true,
- });
- $( "#dialog-warning2" ).dialog({
- autoOpen: false,
- height: 160,
- width: 650,
- modal: true,
- close: function() {
- password_warning = 0;
- term();
- init();
- }
- });
- }
- function on_dialog_close()
- {
- $( "#dialog-warning" ).dialog( "close" );
- }
- function on_dialog2_move()
- {
- location.href("/admin/useruserlist.html");
- }
- function on_dialog2_later()
- {
- $( "#dialog-warning2" ).dialog( "close" );
- }
- function on_dialog2_never()
- {
- writeSetup("SYS_IgnorePasswordWarning=1");
- $( "#dialog-warning2" ).dialog( "close" );
- }
- var shock_exist;
- var airwiper; // 3(P7), 4(P8)
- var boardid ;
- var ft_ir4 ;
- var is_tta ;
- var obj_ptz_getposition = { channel:0, nX:0, nY:0 }
- var prevobj_ptz_getposition = { channel:0, nX:0, nY:0 }
- var obj_ptz_getposition_realpos = { channel:0, nX:0, nY:0 }
- var prevobj_ptz_getposition_realpos = { channel:0, nX:0, nY:0 }
- var need_force_update = 0;
- var need_pause_ptzdrawpos = 0;
- var intervalPTZDrawPositionId = undefined;
- var intervalPTZDrawPositionST = 0;
- var intervalPTZDrawPositionUT = 0;
- function __cb_obj_ptz_getposition(data)
- {
- obj_ptz_getposition = data;
- intervalPTZDrawPositionUT = Date.now();
- }
- function intervalPTZDrawPosition()
- {
- var process = 0 ;
-
- if(0 == player_init_completed[0] || 0 == player_init_completed[1] || 0 == player_init_completed[2] || 0 == player_init_completed[3] ) {
- return ;
- }
- if(need_pause_ptzdrawpos) {
- // console.log("Now need_pause_ptzdrawpos : " + need_pause_ptzdrawpos);
- return ;
- }
- var dnow = Date.now();
- if (dnow - intervalPTZDrawPositionUT > 2000) {
- ;
- }
- else {
- if (dnow - intervalPTZDrawPositionUT < 500) {
- return;
- }
- if (intervalPTZDrawPositionST > intervalPTZDrawPositionUT) {
- return;
- }
- }
- intervalPTZDrawPositionST = dnow;
-
- if( (prevobj_ptz_getposition.channel != obj_ptz_getposition.channel) ||
- (prevobj_ptz_getposition.nX != obj_ptz_getposition.nX) ||
- (prevobj_ptz_getposition.nY != obj_ptz_getposition.nY) || need_force_update)
- {
- // console.log("obj_ptz_getposition.channel : " + obj_ptz_getposition.channel + ", need_force_update : " + need_force_update);
- obj_ptz_getposition_realpos.channel = prevobj_ptz_getposition.channel = obj_ptz_getposition.channel ;
-
- if(obj_ptz_getposition.nX < 0) {
- obj_ptz_getposition.nX = 0 ;
- }
- if(obj_ptz_getposition.nY < 0) {
- obj_ptz_getposition.nY = 0 ;
- }
- if(trnDetectionCamPlayer[0] == PLAYER_ACTIVEX && (IS_SHOW_IN_LIVE_DETECTIONCAM() && IS_SHOW_DETECTIONCAM())){
- if(1 == player_init_completed[obj_ptz_getposition_realpos.channel]) {
- obj_ptz_getposition_realpos.nX = (obj_ptz_getposition.nX / 10) ;
- obj_ptz_getposition_realpos.nY = (obj_ptz_getposition.nY / 10) ;
- process = 1 ;
- //console.log("[IE obj_ptz_getposition_realpos] channel : " + obj_ptz_getposition_realpos.channel + ", nX : " + obj_ptz_getposition_realpos.nX + ", nY : " + obj_ptz_getposition_realpos.nY );
- //console.log("[IE obj_ptz_getposition] channel : " + obj_ptz_getposition.channel + ", nX : " + obj_ptz_getposition.nX + ", nY : " + obj_ptz_getposition.nY );
- }
- }
- else {
- if(1 == player_init_completed[obj_ptz_getposition_realpos.channel]) {
- obj_ptz_getposition_realpos.nX = (obj_ptz_getposition.nX * context_PTZ_position[obj_ptz_getposition_realpos.channel].canvas.width) / 1000 ;
- obj_ptz_getposition_realpos.nY = (obj_ptz_getposition.nY * context_PTZ_position[obj_ptz_getposition_realpos.channel].canvas.height) / 1000 ;
- process = 1 ;
- //console.log("[ obj_ptz_getposition_realpos] channel : " + obj_ptz_getposition_realpos.channel + ", nX : " + obj_ptz_getposition_realpos.nX + ", nY : " + obj_ptz_getposition_realpos.nY );
- //console.log("[ obj_ptz_getposition] channel : " + obj_ptz_getposition.channel + ", nX : " + obj_ptz_getposition.nX + ", nY : " + obj_ptz_getposition.nY );
- }
- }
- if(1 == process) {
- redraw_ptz_position(need_force_update);
- need_force_update = 0 ;
- prevobj_ptz_getposition.nX = obj_ptz_getposition.nX ;
- prevobj_ptz_getposition.nY = obj_ptz_getposition.nY ;
- }
- }
- ptz_det_getposition(__cb_obj_ptz_getposition);
- }
- function redraw_ptz_position(need_force_update)
- {
- if( (prevobj_ptz_getposition_realpos.channel != obj_ptz_getposition_realpos.channel) ||
- (prevobj_ptz_getposition_realpos.nX != obj_ptz_getposition_realpos.nX) ||
- (prevobj_ptz_getposition_realpos.nY != obj_ptz_getposition_realpos.nY) || need_force_update)
- {
- if(need_force_update) {
- for(index = 0 ; index < 4 ; ++index) {
- if(trnDetectionCamPlayer[0] == PLAYER_ACTIVEX && (IS_SHOW_IN_LIVE_DETECTIONCAM() && IS_SHOW_DETECTIONCAM())){
- tvs_SetDrawCross_4Ch(index, 0 , 0 , 0, 0, 0 );
- }
- else {
- context_PTZ_position[index].clearRect(0, 0, context_PTZ_position[index].canvas.width, context_PTZ_position[index].canvas.height); // Clears the canvas
- }
- }
- }
- else {
- var index = prevobj_ptz_getposition_realpos.channel ;
- if(trnDetectionCamPlayer[0] == PLAYER_ACTIVEX && (IS_SHOW_IN_LIVE_DETECTIONCAM() && IS_SHOW_DETECTIONCAM())){
- tvs_SetDrawCross_4Ch(index, 0 , 0 , 0, 0, 0 );
- }
- else {
- context_PTZ_position[index].clearRect(0, 0, context_PTZ_position[index].canvas.width, context_PTZ_position[index].canvas.height); // Clears the canvas
- }
- }
-
- }
- var index = obj_ptz_getposition_realpos.channel ;
- if(trnDetectionCamPlayer[0] == PLAYER_ACTIVEX && (IS_SHOW_IN_LIVE_DETECTIONCAM() && IS_SHOW_DETECTIONCAM())){
- tvs_SetDrawCross_4Ch(index, parseInt(obj_ptz_getposition_realpos.nX) , parseInt(obj_ptz_getposition_realpos.nY) , 20, 1, 0x7FFF0000 );
- }
- else {
- context_PTZ_position[index].strokeStyle = "red";
- context_PTZ_position[index].lineJoin = "round";
- context_PTZ_position[index].lineWidth = 4;
- context_PTZ_position[index].beginPath();
- context_PTZ_position[index].moveTo(obj_ptz_getposition_realpos.nX,obj_ptz_getposition_realpos.nY+20);
- context_PTZ_position[index].lineTo(obj_ptz_getposition_realpos.nX,obj_ptz_getposition_realpos.nY-20);
- context_PTZ_position[index].moveTo(obj_ptz_getposition_realpos.nX+20,obj_ptz_getposition_realpos.nY);
- context_PTZ_position[index].lineTo(obj_ptz_getposition_realpos.nX-20,obj_ptz_getposition_realpos.nY);
- context_PTZ_position[index].closePath();
- context_PTZ_position[index].stroke();
- }
- prevobj_ptz_getposition_realpos.channel = obj_ptz_getposition_realpos.channel ;
- prevobj_ptz_getposition_realpos.nX = obj_ptz_getposition_realpos.nX ;
- prevobj_ptz_getposition_realpos.nY = obj_ptz_getposition_realpos.nY ;
- }
- function UpdateDrawCrossForce()
- {
- if(0 == player_init_completed[0] || 0 == player_init_completed[1] || 0 == player_init_completed[2] || 0 == player_init_completed[3] ) {
- return ;
- }
- need_force_update = 1;
- need_pause_ptzdrawpos = 0 ;
- console.log("need_force_update : "+need_force_update + ", need_pause_ptzdrawpos : " + need_pause_ptzdrawpos );
- }
- function timerVXGMP_Create0()
- {
- if(SUPPORT_DETECTION_CAM_4CH == g_detection_4ch_support) {
-
- if(PLAYER_CHROMEPLUGIN == trnDetectionCamPlayer[0] && (IS_SHOW_IN_LIVE_DETECTIONCAM() && IS_SHOW_DETECTIONCAM())){
- var index = 0 ;
- var sRTSPUrl = getRTSPURL(index , 1);
- var sAddress = 'rtsp://' + detection_4ch_ID + ':' + detection_4ch_PW + '@' + detection_4ch_IP + ':' + detection_4ch_RtspPort + sRTSPUrl;
- var vxgplayerID = 'vxgplayer_4_' + index ;
- var dynamicallyPlayerID = 'dynamicallyPlayers_4_' + index ;
- VXGMP_createPlayer(vxgplayerID, sAddress, 320, 180, dynamicallyPlayerID);
- VXGMP_resizePlayer(vxgplayerID, 320, 180);
- if(getCookie('truendisplaybuffer') == ''){
- VXGMP_SetBuffer(vxgplayerID,1);
- }
- else{
- var buf = parseInt(getCookie('truendisplaybuffer'));
- VXGMP_SetBuffer(vxgplayerID,buf);
- }
- }
- else if(PLAYER_WEBSOCKET == trnDetectionCamPlayer[0] && (IS_SHOW_IN_LIVE_DETECTIONCAM() && IS_SHOW_DETECTIONCAM())){
- var index = 0;
- var sRTSPUrl = getRTSPURL(index, 1);
- var sAddress = 'rtsp://' + detection_4ch_IP + ':' + detection_4ch_RtspPort + sRTSPUrl;
- var vxgwsplayerID = 'vxgwsplayer_4_' + index ;
- var dynamicallyPlayerID = 'dynamicallyPlayers_4_' + index ;
- if (location.protocol == "https:")
- {
- var sWSAddress = 'wss://' + detection_4ch_IP + ':' + detection_4ch_HTTPSPort + '/rtsp_over_websocket';
- }
- else // http:
- {
- var sWSAddress = 'ws://' + detection_4ch_IP + ':' + detection_4ch_HTTPPort + '/rtsp_over_websocket';
- }
- var buf = 1;
- if(getCookie('truendisplaybuffer') != ''){
- buf = parseInt(getCookie('truendisplaybuffer'));
- }
- VXGWSMP_createPlayer(vxgwsplayerID, sAddress, sWSAddress, 320, 180, buf, dynamicallyPlayerID, detection_4ch_ID, detection_4ch_PW);
- VXGWSMP_resizePlayer(vxgwsplayerID, 320, 180);
- vxgwsplayer('vxgwsplayer_4_0').onStateChange(function(state){
- if (parseInt(readSetupByKey("SYS_CUR_WS_CONNUM")) >= 8) {
- VXGWSMP_ShowError('vxgwsplayer_4_0', 'Too many connections');
- }
- else {
- VXGWSMP_HideError('vxgwsplayer_4_0');
- }
- });
- }
- if((PLAYER_ACTIVEX == trnDetectionCamPlayer[0]) || (PLAYER_CHROMEPLUGIN == trnDetectionCamPlayer[0]) || (PLAYER_WEBSOCKET == trnDetectionCamPlayer[0]) || (PLAYER_JPEGSNAP == trnDetectionCamPlayer[0])){
- canvasinit_detection_4ch(0);
- canvasinit_getposition(0);
- if((PLAYER_CHROMEPLUGIN == trnDetectionCamPlayer[0]) || (PLAYER_WEBSOCKET == trnDetectionCamPlayer[0]) || (PLAYER_JPEGSNAP == trnDetectionCamPlayer[0])) {
- player_init_completed[0] = 1;
- UpdateDrawCrossForce();
- }
- else if(PLAYER_ACTIVEX == trnDetectionCamPlayer[0]) {
- if(!IS_SHOW_IN_LIVE_DETECTIONCAM() && IS_SHOW_DETECTIONCAM()) {
- player_init_completed[0] = 1;
- UpdateDrawCrossForce();
- }
- }
- }
- }
- }
- function timerVXGMP_Create1()
- {
- if(SUPPORT_DETECTION_CAM_4CH == g_detection_4ch_support) {
- if(PLAYER_CHROMEPLUGIN == trnDetectionCamPlayer[1] && (IS_SHOW_IN_LIVE_DETECTIONCAM() && IS_SHOW_DETECTIONCAM())){
- var index = 1 ;
- var sRTSPUrl = getRTSPURL(index , 1);
- var sAddress = 'rtsp://' + detection_4ch_ID + ':' + detection_4ch_PW + '@' + detection_4ch_IP + ':' + detection_4ch_RtspPort + sRTSPUrl;
- var vxgplayerID = 'vxgplayer_4_' + index ;
- var dynamicallyPlayerID = 'dynamicallyPlayers_4_' + index ;
- VXGMP_createPlayer(vxgplayerID, sAddress, 320, 180, dynamicallyPlayerID);
- VXGMP_resizePlayer(vxgplayerID, 320, 180);
- if(getCookie('truendisplaybuffer') == ''){
- VXGMP_SetBuffer(vxgplayerID,1);
- }
- else{
- var buf = parseInt(getCookie('truendisplaybuffer'));
- VXGMP_SetBuffer(vxgplayerID,buf);
- }
- }
- else if(PLAYER_WEBSOCKET == trnDetectionCamPlayer[1] && (IS_SHOW_IN_LIVE_DETECTIONCAM() && IS_SHOW_DETECTIONCAM())){
- var index = 1;
- var sRTSPUrl = getRTSPURL(index, 1);
- var sAddress = 'rtsp://' + detection_4ch_IP + ':' + detection_4ch_RtspPort + sRTSPUrl;
- var vxgwsplayerID = 'vxgwsplayer_4_' + index ;
- var dynamicallyPlayerID = 'dynamicallyPlayers_4_' + index ;
- if (location.protocol == "https:")
- {
- var sWSAddress = 'wss://' + detection_4ch_IP + ':' + detection_4ch_HTTPSPort + '/rtsp_over_websocket';
- }
- else // http:
- {
- var sWSAddress = 'ws://' + detection_4ch_IP + ':' + detection_4ch_HTTPPort + '/rtsp_over_websocket';
- }
- var buf = 1;
- if(getCookie('truendisplaybuffer') != ''){
- buf = parseInt(getCookie('truendisplaybuffer'));
- }
- VXGWSMP_createPlayer(vxgwsplayerID, sAddress, sWSAddress, 320, 180, buf, dynamicallyPlayerID, detection_4ch_ID, detection_4ch_PW);
- VXGWSMP_resizePlayer(vxgwsplayerID, 320, 180);
- vxgwsplayer('vxgwsplayer_4_1').onStateChange(function(state){
- if (parseInt(readSetupByKey("SYS_CUR_WS_CONNUM")) >= 8) {
- VXGWSMP_ShowError('vxgwsplayer_4_1', 'Too many connections');
- }
- else {
- VXGWSMP_HideError('vxgwsplayer_4_1');
- }
- });
- }
- if((PLAYER_ACTIVEX == trnDetectionCamPlayer[1]) || (PLAYER_CHROMEPLUGIN == trnDetectionCamPlayer[1]) || (PLAYER_WEBSOCKET == trnDetectionCamPlayer[1]) || (PLAYER_JPEGSNAP == trnDetectionCamPlayer[1])){
- canvasinit_detection_4ch(1);
- canvasinit_getposition(1);
- if((PLAYER_CHROMEPLUGIN == trnDetectionCamPlayer[1]) || (PLAYER_WEBSOCKET == trnDetectionCamPlayer[1]) || (PLAYER_JPEGSNAP == trnDetectionCamPlayer[1])) {
- player_init_completed[1] = 1;
- UpdateDrawCrossForce();
- }
- else if(PLAYER_ACTIVEX == trnDetectionCamPlayer[1]) {
- if(!IS_SHOW_IN_LIVE_DETECTIONCAM() && IS_SHOW_DETECTIONCAM()) {
- player_init_completed[1] = 1;
- UpdateDrawCrossForce();
- }
- }
- }
- }
- }
- function timerVXGMP_Create2()
- {
- if(SUPPORT_DETECTION_CAM_4CH == g_detection_4ch_support) {
- if(PLAYER_CHROMEPLUGIN == trnDetectionCamPlayer[2] && (IS_SHOW_IN_LIVE_DETECTIONCAM() && IS_SHOW_DETECTIONCAM())){
- var index = 2 ;
- var sRTSPUrl = getRTSPURL(index , 1);
- var sAddress = 'rtsp://' + detection_4ch_ID + ':' + detection_4ch_PW + '@' + detection_4ch_IP + ':' + detection_4ch_RtspPort + sRTSPUrl;
- var vxgplayerID = 'vxgplayer_4_' + index ;
- var dynamicallyPlayerID = 'dynamicallyPlayers_4_' + index ;
- VXGMP_createPlayer(vxgplayerID, sAddress, 320, 180, dynamicallyPlayerID);
- VXGMP_resizePlayer(vxgplayerID, 320, 180);
- if(getCookie('truendisplaybuffer') == ''){
- VXGMP_SetBuffer(vxgplayerID,1);
- }
- else{
- var buf = parseInt(getCookie('truendisplaybuffer'));
- VXGMP_SetBuffer(vxgplayerID,buf);
- }
- }
- else if(PLAYER_WEBSOCKET == trnDetectionCamPlayer[2] && (IS_SHOW_IN_LIVE_DETECTIONCAM() && IS_SHOW_DETECTIONCAM())){
- var index = 2;
- var sRTSPUrl = getRTSPURL(index, 1);
- var sAddress = 'rtsp://' + detection_4ch_IP + ':' + detection_4ch_RtspPort + sRTSPUrl;
- var vxgwsplayerID = 'vxgwsplayer_4_' + index ;
- var dynamicallyPlayerID = 'dynamicallyPlayers_4_' + index ;
- if (location.protocol == "https:")
- {
- var sWSAddress = 'wss://' + detection_4ch_IP + ':' + detection_4ch_HTTPSPort + '/rtsp_over_websocket';
- }
- else // http:
- {
- var sWSAddress = 'ws://' + detection_4ch_IP + ':' + detection_4ch_HTTPPort + '/rtsp_over_websocket';
- }
- var buf = 1;
- if(getCookie('truendisplaybuffer') != ''){
- buf = parseInt(getCookie('truendisplaybuffer'));
- }
- VXGWSMP_createPlayer(vxgwsplayerID, sAddress, sWSAddress, 320, 180, buf, dynamicallyPlayerID, detection_4ch_ID, detection_4ch_PW);
- VXGWSMP_resizePlayer(vxgwsplayerID, 320, 180);
- vxgwsplayer('vxgwsplayer_4_2').onStateChange(function(state){
- if (parseInt(readSetupByKey("SYS_CUR_WS_CONNUM")) >= 8) {
- VXGWSMP_ShowError('vxgwsplayer_4_2', 'Too many connections');
- }
- else {
- VXGWSMP_HideError('vxgwsplayer_4_2');
- }
- });
- }
- if((PLAYER_ACTIVEX == trnDetectionCamPlayer[2]) || (PLAYER_CHROMEPLUGIN == trnDetectionCamPlayer[2]) || (PLAYER_WEBSOCKET == trnDetectionCamPlayer[2]) || (PLAYER_JPEGSNAP == trnDetectionCamPlayer[2])){
- canvasinit_detection_4ch(2);
- canvasinit_getposition(2);
- if((PLAYER_CHROMEPLUGIN == trnDetectionCamPlayer[2]) || (PLAYER_WEBSOCKET == trnDetectionCamPlayer[2]) || (PLAYER_JPEGSNAP == trnDetectionCamPlayer[2])) {
- player_init_completed[2] = 1;
- UpdateDrawCrossForce();
- }
- else if(PLAYER_ACTIVEX == trnDetectionCamPlayer[2]) {
- if(!IS_SHOW_IN_LIVE_DETECTIONCAM() && IS_SHOW_DETECTIONCAM()) {
- player_init_completed[2] = 1;
- UpdateDrawCrossForce();
- }
- }
- }
- }
- }
- function timerVXGMP_Create3()
- {
- if(SUPPORT_DETECTION_CAM_4CH == g_detection_4ch_support) {
- if(PLAYER_CHROMEPLUGIN == trnDetectionCamPlayer[3] && (IS_SHOW_IN_LIVE_DETECTIONCAM() && IS_SHOW_DETECTIONCAM())){
- var index = 3 ;
- var sRTSPUrl = getRTSPURL(index , 1);
- var sAddress = 'rtsp://' + detection_4ch_ID + ':' + detection_4ch_PW + '@' + detection_4ch_IP + ':' + detection_4ch_RtspPort + sRTSPUrl;
- var vxgplayerID = 'vxgplayer_4_' + index ;
- var dynamicallyPlayerID = 'dynamicallyPlayers_4_' + index ;
- VXGMP_createPlayer(vxgplayerID, sAddress, 320, 180, dynamicallyPlayerID);
- VXGMP_resizePlayer(vxgplayerID, 320, 180);
- if(getCookie('truendisplaybuffer') == ''){
- VXGMP_SetBuffer(vxgplayerID,1);
- }
- else{
- var buf = parseInt(getCookie('truendisplaybuffer'));
- VXGMP_SetBuffer(vxgplayerID,buf);
- }
- }
- else if(PLAYER_WEBSOCKET == trnDetectionCamPlayer[3] && (IS_SHOW_IN_LIVE_DETECTIONCAM() && IS_SHOW_DETECTIONCAM())){
- var index = 3;
- var sRTSPUrl = getRTSPURL(index, 1);
- var sAddress = 'rtsp://' + detection_4ch_IP + ':' + detection_4ch_RtspPort + sRTSPUrl;
- var vxgwsplayerID = 'vxgwsplayer_4_' + index ;
- var dynamicallyPlayerID = 'dynamicallyPlayers_4_' + index ;
- if (location.protocol == "https:")
- {
- var sWSAddress = 'wss://' + detection_4ch_IP + ':' + detection_4ch_HTTPSPort + '/rtsp_over_websocket';
- }
- else // http:
- {
- var sWSAddress = 'ws://' + detection_4ch_IP + ':' + detection_4ch_HTTPPort + '/rtsp_over_websocket';
- }
- var buf = 1;
- if(getCookie('truendisplaybuffer') != ''){
- buf = parseInt(getCookie('truendisplaybuffer'));
- }
- VXGWSMP_createPlayer(vxgwsplayerID, sAddress, sWSAddress, 320, 180, buf, dynamicallyPlayerID, detection_4ch_ID, detection_4ch_PW);
- VXGWSMP_resizePlayer(vxgwsplayerID, 320, 180);
- vxgwsplayer('vxgwsplayer_4_3').onStateChange(function(state){
- if (parseInt(readSetupByKey("SYS_CUR_WS_CONNUM")) >= 8) {
- VXGWSMP_ShowError('vxgwsplayer_4_3', 'Too many connections');
- }
- else {
- VXGWSMP_HideError('vxgwsplayer_4_3');
- }
- });
- }
- if((PLAYER_ACTIVEX == trnDetectionCamPlayer[3]) || (PLAYER_CHROMEPLUGIN == trnDetectionCamPlayer[3]) || (PLAYER_WEBSOCKET == trnDetectionCamPlayer[3]) || (PLAYER_JPEGSNAP == trnDetectionCamPlayer[3])){
- canvasinit_detection_4ch(3);
- canvasinit_getposition(3);
- if((PLAYER_CHROMEPLUGIN == trnDetectionCamPlayer[3]) || (PLAYER_WEBSOCKET == trnDetectionCamPlayer[3]) || (PLAYER_JPEGSNAP == trnDetectionCamPlayer[3])) {
- player_init_completed[3] = 1;
- UpdateDrawCrossForce();
- }
- else if(PLAYER_ACTIVEX == trnDetectionCamPlayer[3]) {
- if(!IS_SHOW_IN_LIVE_DETECTIONCAM() && IS_SHOW_DETECTIONCAM()) {
- player_init_completed[3] = 1;
- UpdateDrawCrossForce();
- }
- }
- }
- }
- }
- function timerTVS_Init0()
- {
- tvs_init_detection_4ch(0 , detection_4ch_IP , detection_4ch_BasePort, detection_4ch_ID, detection_4ch_PW);
- player_init_completed[0] = 1;
- UpdateDrawCrossForce();
- }
- function timerTVS_Init1()
- {
- tvs_init_detection_4ch(1 , detection_4ch_IP , detection_4ch_BasePort, detection_4ch_ID, detection_4ch_PW);
- player_init_completed[1] = 1;
- UpdateDrawCrossForce();
- }
- function timerTVS_Init2()
- {
- tvs_init_detection_4ch(2 , detection_4ch_IP , detection_4ch_BasePort, detection_4ch_ID, detection_4ch_PW);
- player_init_completed[2] = 1;
- UpdateDrawCrossForce();
- }
- function timerTVS_Init3()
- {
- tvs_init_detection_4ch(3 , detection_4ch_IP , detection_4ch_BasePort, detection_4ch_ID, detection_4ch_PW);
- player_init_completed[3] = 1;
- UpdateDrawCrossForce();
- }
- function valid_check_detectioncam()
- {
- if(SUPPORT_DETECTION_CAM_4CH == g_detection_4ch_support) {
- if(isValidIP(detection_4ch_IP) == false) {
- g_detection_info_valid = 0;
- }
- else if(detection_4ch_ID == "") {
- g_detection_info_valid = 0;
- }
- else if(detection_4ch_PW == "") {
- g_detection_info_valid = 0;
- }
- else {
- g_detection_info_valid = 1;
- }
- }
- else {
- g_detection_info_valid = 0;
- }
- }
- var trnDetectionCamPlayer = [0, 0, 0, 0];
- var currentDetectionCamvalgo = [0, 0, 0, 0];
- var tmpDetectionCamvalgo = [0, 0, 0, 0];
- function __cb_GetDetectionCamvalgo(result)
- {
- var tmp = result.split(',');
- if (tmp.length == 4) {
- for (var i = 0; i < tmp.length; i++) {
- tmpDetectionCamvalgo[i] = tmp[i];
- }
- }
- }
- function GetDetectionCamvalgo(__async)
- {
- if (__async)
- {
- readSetupByKeyAsync("DIRECTIONCAM_PRIMARY_ALGORITHM", __cb_GetDetectionCamvalgo);
- }
- else
- {
- var result = "";
- result = readSetupByKey("DIRECTIONCAM_PRIMARY_ALGORITHM"); // 0, 2, 1, 0
- var tmp = result.split(',');
- if (tmp.length == 4) {
- for (var i = 0; i < tmp.length; i++) {
- currentDetectionCamvalgo[i] = tmpDetectionCamvalgo[i] = tmp[i];
- }
- }
- }
- }
- var trnDetectionCamPlayerTimerId = undefined;
- var trnDetectionCamPlayerTimerPause = 0;
- function trnDetectionCamPlayerTimer()
- {
- if (trnDetectionCamPlayerTimerPause) {
- return;
- }
- var changed = 0;
- for (var i = 0; i < 4; i++) {
- if (currentDetectionCamvalgo[i] != tmpDetectionCamvalgo[i]) {
- currentDetectionCamvalgo[i] = tmpDetectionCamvalgo[i];
- if (trnDetectionCamPlayer[i] != VXGMP_GetPlayer(UseActiveX, browser, currentDetectionCamvalgo[i]), 1) {
- changed++;
- }
- }
- }
- if (changed) {
- trnDetectionCamPlayerTimerPause = 1;
- trnDetectionCamPlayerChange();
- return;
- }
- GetDetectionCamvalgo(1/*async*/);
- }
- function trnDetectionCamPlayerChange()
- {
- term_directioncam();
- init_directioncam();
- init_directioncam_browser();
- }
- function trnDetectionCamPlayerTimerStart()
- {
- GetDetectionCamvalgo(0/*sync*/);
- trnDetectionCamPlayerTimerPause = 0;
- if (trnDetectionCamPlayerTimerId == undefined) {
- trnDetectionCamPlayerTimerId = setTimeout(function _trnDetectionCamPlayerTimer() {
- trnDetectionCamPlayerTimer();
- trnDetectionCamPlayerTimerId = setTimeout(_trnDetectionCamPlayerTimer, 10000);
- },10000);
- }
- }
- function init_directioncam()
- {
- var contentsArray = [0,0,0,0];
-
- T_LoadSetup("detectioncamsinfo");
-
- detection_4ch_IP = readSetupByKey("DIRECTIONCAM_IP");
- detection_4ch_RtspPort = readSetupByKey("DIRECTIONCAM_RTSP_PORT");
- detection_4ch_HTTPPort = readSetupByKey("DIRECTIONCAM_HTTP_PORT");
- detection_4ch_HTTPSPort = readSetupByKey("DIRECTIONCAM_HTTPS_PORT");
- detection_4ch_BasePort = readSetupByKey("DIRECTIONCAM_BASE_PORT");
- detection_4ch_ID = readSetupByKey("DIRECTIONCAM_ID");
- detection_4ch_PW = readSetupByKey("DIRECTIONCAM_PW");
- valid_check_detectioncam();
-
- if(IS_SHOW_DETECTIONCAM())
- {
- ptz_det_getposition(__cb_obj_ptz_getposition);
-
- var liveOrJpgShow = 0;
- if (trnDetectionCamPlayerSupportWS == 1) {
- trnDetectionCamPlayerTimerStart();
- }
- for (var i = 0; i < 4; i++)
- {
- trnDetectionCamPlayer[i] = VXGMP_GetPlayer(UseActiveX, browser, currentDetectionCamvalgo[i], 1);
- if (trnDetectionCamPlayer[i] == PLAYER_ACTIVEX || trnDetectionCamPlayer[i] == PLAYER_CHROMEPLUGIN) {
- trnDetectionCamPlayerTimerPause = 1;
- }
- if (trnDetectionCamPlayer[i] == PLAYER_ACTIVEX) {
- liveOrJpgShow = 1;
- if (IS_SHOW_IN_LIVE_DETECTIONCAM() && IS_SHOW_DETECTIONCAM() && (0 == is_tta)) {
- contents = '<object classid="CLSID:DD01C8CA-5DA0-4b01-9603-B7194E561D32" name="Tvs4_' + i + '" width="320" height="180" codebase="/rel/webViewer.cab#Version=' + TVS_VERSION + '"></object>';
- }
- else {
- contents = '<div id="dynamicallyPlayers_4_' + i + '"><img style="width:320px;height:180px;"></img></div>';
- }
- }
- else if (trnDetectionCamPlayer[i] == PLAYER_CHROMEPLUGIN) {
- liveOrJpgShow = 1;
- if (IS_SHOW_IN_LIVE_DETECTIONCAM() && IS_SHOW_DETECTIONCAM() && (0 == is_tta)) {
- contents = '<div id="dynamicallyPlayers_4_' + i + '"></div>';
- }
- else {
- contents = '<div id="dynamicallyPlayers_4_' + i + '"><img style="width:320px;height:180px;"></img></div>';
- }
- }
- else if (trnDetectionCamPlayer[i] == PLAYER_WEBSOCKET) {
- liveOrJpgShow = 1;
- if (IS_SHOW_IN_LIVE_DETECTIONCAM() && IS_SHOW_DETECTIONCAM() && (0 == is_tta)) {
- contents = '<div id="dynamicallyPlayers_4_' + i + '"></div>';
- }
- else {
- contents = '<div id="dynamicallyPlayers_4_' + i + '"><img style="width:320px;height:180px;"></img></div>';
- }
- }
- else if (trnDetectionCamPlayer[i] == PLAYER_JPEGSNAP) {
- contents = '<div id="dynamicallyPlayers_4_' + i + '"><img style="width:320px;height:180px;"></img></div>';
- }
-
- $("#viewobjectArray4_" + i).html(contents);
- }
-
- Show_Hide_ShowHideDirectionBtn(1);
- $("[name=resizedivViewTable]").css("display", "");
- if(parseInt(readSetupByKey("SYS_TTA_SECURITY_VERIFIED")) == 1) {
- $("[name=LiveOrJPGBtn]").css("display","none");
- }
- else {
- if(liveOrJpgShow) {
- Show_Hide_LiveOrJPGBtn(1);
- }
- else {
- Show_Hide_LiveOrJPGBtn(0);
- }
- }
- }
- Show_Hide_DetectionCamWarning(1);
- }
- function init_directioncam_browser()
- {
- if( SUPPORT_DETECTION_CAM_4CH == g_detection_4ch_support ) {
- need_force_update = 0;
- for (var i = 0; i < 4; i++) {
- if(trnDetectionCamPlayer[i] == PLAYER_ACTIVEX){
- if((IS_SHOW_IN_LIVE_DETECTIONCAM()) && (IS_SHOW_DETECTIONCAM()) ) {
- if (i == 0) { setTimeout(timerVXGMP_Create0,100); }
- else if (i == 1) { setTimeout(timerVXGMP_Create1,200); }
- else if (i == 2) { setTimeout(timerVXGMP_Create2,300); }
- else if (i == 3) { setTimeout(timerVXGMP_Create3,400); }
- if (i == 0) { setTimeout(timerTVS_Init0,1000); }
- else if (i == 1) { setTimeout(timerTVS_Init1,2000); }
- else if (i == 2) { setTimeout(timerTVS_Init2,3000); }
- else if (i == 3) { setTimeout(timerTVS_Init3,4000); }
- }
- else if((!IS_SHOW_IN_LIVE_DETECTIONCAM()) && (IS_SHOW_DETECTIONCAM())) {
- var index = i;
- var sJPGURL = getJPGURL(index , 1);
- var dynamicallyPlayerID = '#dynamicallyPlayers_4_' + index ;
- var img_update_detection_4ch = DETECTION_4CH_IMG_UPDATE_NAME + index ;
- $(dynamicallyPlayerID).html("<div><img id="+ "\"" + img_update_detection_4ch + "\"" + " name=" + "\"" + img_update_detection_4ch + "\"" +
- " style=\"width:320px;height:180px\" src=\"/capturx_direction/"+sJPGURL+"?index=" + indexcount_detection_4ch[index] + "\" /></div>");
- indexcount_detection_4ch[index]++;
- if (i == 0) { setTimeout(timerVXGMP_Create0,1000); }
- else if (i == 1) { setTimeout(timerVXGMP_Create1,2000); }
- else if (i == 2) { setTimeout(timerVXGMP_Create2,3000); }
- else if (i == 3) { setTimeout(timerVXGMP_Create3,4000); }
- }
- }
- else if(trnDetectionCamPlayer[i] == PLAYER_CHROMEPLUGIN){
- if((IS_SHOW_IN_LIVE_DETECTIONCAM()) && (IS_SHOW_DETECTIONCAM()) ) {
- if (i == 0) { setTimeout(timerVXGMP_Create0,1000); }
- else if (i == 1) { setTimeout(timerVXGMP_Create1,2000); }
- else if (i == 2) { setTimeout(timerVXGMP_Create2,3000); }
- else if (i == 3) { setTimeout(timerVXGMP_Create3,4000); }
- }
- else if((!IS_SHOW_IN_LIVE_DETECTIONCAM()) && (IS_SHOW_DETECTIONCAM())) {
- var index = i;
- var sJPGURL = getJPGURL(index , 1);
- var dynamicallyPlayerID = '#dynamicallyPlayers_4_' + index ;
- var img_update_detection_4ch = DETECTION_4CH_IMG_UPDATE_NAME + index ;
- $(dynamicallyPlayerID).html("<div><img id="+ "\"" + img_update_detection_4ch + "\"" + " name=" + "\"" + img_update_detection_4ch + "\"" +
- " style=\"width:320px;height:180px\" src=\"/capturx_direction/"+sJPGURL+"?index=" + indexcount_detection_4ch[index] + "\" /></div>");
- indexcount_detection_4ch[index]++;
- if (i == 0) { setTimeout(timerVXGMP_Create0,1000); }
- else if (i == 1) { setTimeout(timerVXGMP_Create1,2000); }
- else if (i == 2) { setTimeout(timerVXGMP_Create2,3000); }
- else if (i == 3) { setTimeout(timerVXGMP_Create3,4000); }
- }
- }
- else if(trnDetectionCamPlayer[i] == PLAYER_WEBSOCKET){
- if((IS_SHOW_IN_LIVE_DETECTIONCAM()) && (IS_SHOW_DETECTIONCAM()) ) {
- if (i == 0) { setTimeout(timerVXGMP_Create0,1000); }
- else if (i == 1) { setTimeout(timerVXGMP_Create1,2000); }
- else if (i == 2) { setTimeout(timerVXGMP_Create2,3000); }
- else if (i == 3) { setTimeout(timerVXGMP_Create3,4000); }
- }
- else if((!IS_SHOW_IN_LIVE_DETECTIONCAM()) && (IS_SHOW_DETECTIONCAM())) {
- var index = i;
- var sJPGURL = getJPGURL(index , 1);
- var dynamicallyPlayerID = '#dynamicallyPlayers_4_' + index ;
- var img_update_detection_4ch = DETECTION_4CH_IMG_UPDATE_NAME + index ;
- $(dynamicallyPlayerID).html("<div><img id="+ "\"" + img_update_detection_4ch + "\"" + " name=" + "\"" + img_update_detection_4ch + "\"" +
- " style=\"width:320px;height:180px\" src=\"/capturx_direction/"+sJPGURL+"?index=" + indexcount_detection_4ch[index] + "\" /></div>");
- indexcount_detection_4ch[index]++;
- if (i == 0) { setTimeout(timerVXGMP_Create0,1000); }
- else if (i == 1) { setTimeout(timerVXGMP_Create1,2000); }
- else if (i == 2) { setTimeout(timerVXGMP_Create2,3000); }
- else if (i == 3) { setTimeout(timerVXGMP_Create3,4000); }
- }
- }
- else if(trnDetectionCamPlayer[i] == PLAYER_JPEGSNAP){
- var index = i;
- var sJPGURL = getJPGURL(index , 1);
- var dynamicallyPlayerID = '#dynamicallyPlayers_4_' + index ;
- var img_update_detection_4ch = DETECTION_4CH_IMG_UPDATE_NAME + index ;
- $(dynamicallyPlayerID).html("<div><img id="+ "\"" + img_update_detection_4ch + "\"" + " name=" + "\"" + img_update_detection_4ch + "\"" +
- " style=\"width:320px;height:180px\" src=\"/capturx_direction/"+sJPGURL+"?index=" + indexcount_detection_4ch[index] + "\" /></div>");
- indexcount_detection_4ch[index]++;
-
- if (i == 0) { setTimeout(timerVXGMP_Create0,1000); }
- else if (i == 1) { setTimeout(timerVXGMP_Create1,2000); }
- else if (i == 2) { setTimeout(timerVXGMP_Create2,3000); }
- else if (i == 3) { setTimeout(timerVXGMP_Create3,4000); }
- }
- else {
- ;
- }
- }
- $("[name=resizedivViewTable]").css("display", "");
- }
- }
- function init_directioncam_gui(enable_btn)
- {
- if( SUPPORT_DETECTION_CAM_4CH == g_detection_4ch_support ) {
- if(getCookie('truen_show_hide_directioncam') == ''){
- show_hide_directioncam = SHOW_DETECTIONCAM;
- setCookie('truen_show_hide_directioncam', show_hide_directioncam, 100);
- }
- else{
- show_hide_directioncam = parseInt(getCookie('truen_show_hide_directioncam'));
- }
- if(show_hide_directioncam) {
- $("[name=ShowHideDirectionBtn]").text(GetLan(1067)); // Show Direction Cam
- Show_Hide_LiveOrJPGBtn(0);
- $("[name=resizedivViewTable]").css("display", "none");
- }
- else {
- $("[name=ShowHideDirectionBtn]").text(GetLan(1068)); // Hide Direction Cam
- Show_Hide_LiveOrJPGBtn(1);
- $("[name=resizedivViewTable]").css("display", "");
- }
- if(getCookie('truen_live_jpg_directioncam') == ''){
- live_jpg_directioncam = SHOW_IN_JPG_DETECTIONCAM;
- setCookie('truen_live_jpg_directioncam', live_jpg_directioncam, 100);
- }
- else{
- live_jpg_directioncam = parseInt(getCookie('truen_live_jpg_directioncam'));
- }
- if(is_tta) {
- $("[name=LiveOrJPGBtn]").css("display","none");
- }
- else {
- if(live_jpg_directioncam) {
- $("[name=LiveOrJPGBtn]").text(GetLan(1069)); // View in Live
- }
- else {
- $("[name=LiveOrJPGBtn]").text(GetLan(1070)); // View in JPG
- }
- }
-
- if(IS_SHOW_DETECTIONCAM() && IS_SHOW_IN_LIVE_DETECTIONCAM()) {
- document.getElementById('ShowHideDirectionBtn').disabled = true ;
- document.getElementById('LiveOrJPGBtn').disabled = true ;
- if(enable_btn) {
- setTimeout(update_enable_btns, 10000);
- }
- }
- if(enable_btn) {
- intervalPTZDrawPositionId = setInterval(intervalPTZDrawPosition, 250);
- }
- }
- else {
- $("[name=resizedivViewTable]").css("display", "none");
- $("[name=ShowHideDirectionBtn]").css("display", "none");
- Show_Hide_ShowHideDirectionBtn(0);
- Show_Hide_LiveOrJPGBtn(0);
- }
- }
- var trnPlayerTimerId = undefined;
- var trnPlayerTimerPause = 0;
- function trnPlayerTimer()
- {
- if (trnPlayerTimerPause) {
- return;
- }
- GetVideoAlgorithm($("[name=SYS_BOARDID]").val(), $("[name=SYS_MODE]").val(), is_secondary, 0, function(valgo) {
- if (currentvalgo != parseInt(valgo)) {
- currentvalgo = parseInt(valgo);
- if (trnPlayer != VXGMP_GetPlayer(UseActiveX, browser, currentvalgo, 0)) {
- trnPlayerTimerPause = 1;
- trnPlayerChange();
- }
- }
- });
- }
- function trnPlayerChange()
- {
- setTimeout(function() {
- term();
- init();
- ZoomHome();
- },3000);
- }
- function trnPlayerTimerStart()
- {
- currentvalgo = GetVideoAlgorithm($("[name=SYS_BOARDID]").val(), $("[name=SYS_MODE]").val(), is_secondary, 0, undefined);
- trnPlayerTimerPause = 0;
- if (trnPlayerTimerId == undefined) {
- trnPlayerTimerId = setTimeout(function _trnPlayerTimer() {
- trnPlayerTimer();
- trnPlayerTimerId = setTimeout(_trnPlayerTimer, 1000);
- },1000);
- }
- }
- function vxgwsplayer_volume_mute()
- {
- if (trnPlayer == PLAYER_WEBSOCKET) {
- var mute = VXGWSMP_VolumeMute('vxgwsplayer1'); // toggle
- if (mute == false) {
- document.getElementById('vxgwsplayer_vol').style.background = "url('/resources/img/vol_unmute.png') no-repeat 0 0";
- document.getElementById('vxgwsplayer_vol').style.backgroundSize = "contain";
- }
- else { // mute == true
- document.getElementById('vxgwsplayer_vol').style.background = "url('/resources/img/vol_mute.png') no-repeat 0 0";
- document.getElementById('vxgwsplayer_vol').style.backgroundSize = "contain";
- }
- }
- }
- function init_id_speaker(en)
- {
- if (en) {
- if(Alarm_state[7] == TN_ES_OFF){
- $("#id_speaker").attr("src", "/resources/img/btn_r21_N.png");
- } else {
- $("#id_speaker").attr("src", "/resources/img/btn_r21_SN.png");
- }
- $("#id_speaker").bind();
- } else {
- $("#id_speaker").attr("src", "/resources/img/btn_r21_D.png");
- $("#id_speaker").unbind();
- }
- }
- function init_id_talk(en)
- {
- if (en) {
- talk_disabled = 0;
- $("#id_talk").attr("src", "/resources/img/btn_r12_N.gif");
- $("#id_talk").bind();
- } else {
- talk_disabled = 1;
- $("#id_talk").attr("src", "/resources/img/btn_r12_D.gif");
- $("#id_talk").unbind();
- }
- }
- function init_id_snapshot(en)
- {
- if (en) {
- $("#id_snapshot").attr("src", "/resources/img/btn_r11_N.gif");
- $("#id_snapshot").bind();
- } else {
- $("#id_snapshot").attr("src", "/resources/img/btn_r11_D.gif");
- $("#id_snapshot").unbind();
- }
- }
- function init_id_fullscreen(en)
- {
- if (en) {
- $("#id_fullscreen").attr("src", "/resources/img/btn_r02_N.gif");
- $("#id_fullscreen").bind();
- } else {
- $("#id_fullscreen").attr("src", "/resources/img/btn_r02_D.gif");
- $("#id_fullscreen").unbind();
- }
- }
- function init_id_buffering(en)
- {
- if (en) {
- $("#id_buffering").css("display", "");
- } else {
- $("#id_buffering").css("display", "none");
- }
- }
- function init()
- {
- var presetchannel = "PTZ";
- var ptztitle;
- Show_Hide_DetectionCamWarning(0);
-
-
- contents = ajaxGet("/resources/oem/title.html");
- if(contents){
- // $("#page_title").text(contents);
- document.title = contents;
- }
- else{
- document.title = readSetupByKey("SYS_SYSTEMID");
- if(document.title == ""){
- document.title = "Video Surveillance";
- }
- }
- contents = ajaxGet("/resources/oem/url.html");
- if(!contents){
- contents = ajaxGet("/bitmap/oem/logo.gif");
- if(!contents){
- contents = '<h1><img src="/resources/oem/logo.gif"/></h1>';
- } else {
- contents = '<h1><img src="/bitmap/oem/logo.gif"/></h1>';
- }
- }
- if((readSetupByKey("SYS_IS_HATTLELAND_SPEC")) == 1){
- contents3 = '<h2><img src="/resources/oem/logo2.gif"/></h2>';
- document.getElementById('logoarea1').style.display = "";
- $("#logoarea1").html(contents3);
- ptztitle = '<span>Zoom Control</span>'
- $("#panel_title").html(ptztitle);
- } else if(readSetupByKey("SYS_IS_JMAV_SPECIFIC") == 1) {
- model_name = readSetupByKey("SYS_MODELNAME");
- contents3 = '<h2><span id=modelname></span></h2>';
- document.getElementById('logoarea1').style.display = "";
- $( "#logoarea1" ).html(contents3);
- $( "#modelname" ).text(model_name);
- } else {
- document.getElementById('logoarea1').style.display = "none";
- ptztitle = '<span class="LAN_255"></span>'
- $("#panel_title").html(ptztitle);
- }
- if(readSetupByKey("SYS_IS_SYSPRO_SPECIFIC") == 1) {
- document.getElementById('logoarea2').style.display = "";
- $("#logoarea2").html(contents);
- } else {
- document.getElementById('logoarea2').style.display = "none";
- $("#logoarea").html(contents);
- }
- boardid = parseInt(readSetupByKey("SYS_BOARDID"));
- g_detection_4ch_support = NOT_SUPPORT_DETECTION_CAM_4CH ;
- ft_ir4 = parseInt(readSetupByKey("SYS_FTCAMERA_IR4")) ;
- is_tta = parseInt(readSetupByKey("SYS_TTA_SECURITY_VERIFIED"));
- var auth = readAuthInfo();
- if (parseInt(readSetupByKey("SYS_TTA_SECURITY_VERIFIED")) == 1 || parseInt(readSetupByKey("SYS_IS_STEINSVIKSPECIFIC")) == 1) {
- trnPlayerForceJpeg = 1;
- }
- else if(password_warning && readSetupByKey("SYS_IgnorePasswordWarning") == 0 && readSetupByKey("SYS_IsDefaultPassword") == 1 && auth["USR_LOGINID"] == "admin"){
- trnPlayerForceJpeg = 1;
- }
- else {
- trnPlayerSupportWS = parseInt(readSetupByKey("SYS_SUPPORT_WEBSOCKET"));
- if( ((boardid & 0xF000) == 0x9000 || (boardid & 0xF000) == 0xA000 || (boardid & 0xF000) == 0xB000 ) && (4 == ft_ir4)) {
- trnDetectionCamPlayerSupportWS = parseInt(readSetupByKey("DIRECTIONCAM_SYS_SUPPORT_WEBSOCKET"));
- }
- }
- if (trnPlayerSupportWS == 1 && trnPlayerForceJpeg != 1) {
- trnPlayerTimerStart();
- }
- browser = VXGMP_GetBrowser();
- trnPlayer = VXGMP_GetPlayer(UseActiveX, browser, currentvalgo, 0);
- if (trnPlayer == PLAYER_ACTIVEX || trnPlayer == PLAYER_CHROMEPLUGIN) {
- trnPlayerTimerPause = 1;
- }
-
- if(trnPlayer == PLAYER_ACTIVEX){
- contents = '<object classid="CLSID:DD01C8CA-5DA0-4b01-9603-B7194E561D32" name="Tvs" width="720" height="405" codebase="/rel/webViewer.cab#Version=' + TVS_VERSION + '"></object>';
- }
- else if(trnPlayer == PLAYER_CHROMEPLUGIN){
- contents = '<div id="dynamicallyPlayers"></div>';
- }
- else if(trnPlayer == PLAYER_WEBSOCKET){
- contents = '<div id="dynamicallyPlayers"></div>';
- }
- else if(trnPlayer == PLAYER_JAVAAPP){
- contents = '<object type="application/x-java-applet" name="Tvs" width=720 height=405 clsid="CAFEEFAC-0017-0000-FFFF-ABCDEFFEDCBA" codebase="http://java.sun.com/update/1.7.0/jinstall-7u51-windows-i586.cab#Version=1.7.0_51">'
- + '<param name ="separate_jvm" value="true" />'
- + '<param name="java_codebase" value="/resources/lib/" />'
- + '<param name="code" value="TViewer" />'
- + '<param name="archive" value="/resources/lib/TViewer.jar" />'
- + '<param name="scriptable" value="true" />'
- + '<param name="mayscript" value="true" />'
- + '</object>';
- }
- else { // trnPlayer == PLAYER_JPEGSNAP
- contents = '<div id="dynamicallyPlayers"><img style="height:405px;width:720px;"></img></div>';
- }
- $("#viewobject").html(contents);
- if(0) { //if (trnPlayer == PLAYER_WEBSOCKET) {
- if ((boardid & 0xFFFF) == 0xB001) {
- $("#vxgwsplayer_audiocontroller").css("display", "none");
- } else {
- $("#vxgwsplayer_audiocontroller").css("display", "");
- }
- } else {
- $("#vxgwsplayer_audiocontroller").css("display", "none");
- }
- contents = ajaxGet("/setup-item/presetlabel_sum.html");
- $("#presetlabel").html(contents);
- if(readSetupByKey("SYS_MODE") == 1){ // decoder system
- numofsensor = 4;
- numofalarm = 4;
- $("[name=li_record]").css("display", "none");
- $("[name=li_optionline]").css("display", "none");
- }
- else{
- numofsensor = parseInt(readSetupByKey("SYS_NUMOFSENSOR"));
- numofalarm = parseInt(readSetupByKey("SYS_NUMOFALARM"));
- }
-
- if(numofsensor < 5){
- $("[name=li_sensor5]").css("display", "none");
- }
- if(numofsensor < 4){
- $("[name=li_sensor4]").css("display", "none");
- }
- if(numofsensor < 3){
- $("[name=li_sensor3]").css("display", "none");
- }
- if(numofsensor < 2){
- $("[name=li_sensor2]").css("display", "none");
- }
- if(numofsensor < 1){
- $("[name=li_sensor1]").css("display", "none");
- $("[name=li_sensorline]").css("display", "none");
- }
-
- if(numofalarm < 4){
- $("[name=li_alarm4]").css("display", "none");
- }
- if(numofalarm < 3){
- $("[name=li_alarm3]").css("display", "none");
- }
- if(numofalarm < 2){
- $("[name=li_alarm2]").css("display", "none");
- }
- if(numofalarm < 1){
- $("[name=li_alarm1]").css("display", "none");
- $("[name=li_alarmline]").css("display", "none");
- }
- if(readSetupByKey("SYS_MODE") == 1){ // decoder system
- $("[name=li_videosel]").css("display", "none");
- }
- if(readSetupByKey("SYS_IS_CANON_ZOOM_SPECIFIC") != 1){
- $("[name=group_canon]").css("display", "none");
- }
- //HUNS
- if (readSetupByKey("SYS_BOARDID") == 0x3004) {
- $("[name=li_record]").css("display", "none");
- $("[name=li_optionline]").css("display", "none");
- }
- else if (readSetupByKey("SYS_BOARDID") == 0xB001) {
- $("[name=li_record]").css("display", "none");
- $("[name=li_optionline]").css("display", "none");
- $("[name=li_talk]").css("display", "none");
- $("[name=li_talkline]").css("display", "none");
- }
- minwidth = 454 + (36 * (numofsensor + numofalarm + 5));
-
- // shock_exist = parseInt(readSetupByKey("SYS_SHOCK_SENSOR_EXIST"));
- shock_exist = 0;
- if(shock_exist == 1){ // SYS_SHOCK_SENSOR_EXIST
- minwidth += 36;
- }
- else{
- $("[name=li_shock]").css("display", "none");
- }
- airwiper = parseInt(readSetupByKey("SYS_FTCAMERA_IR4"));
- if(airwiper == 3 || airwiper == 4){ // p7,p8
- minwidth += 36;
- }
- else{
- $("[name=li_wiper]").css("display", "none");
- }
- if (trnPlayer == PLAYER_WEBSOCKET) {
- minwidth += 36;
- $("[name=li_speaker]").css("display", "");
- }
- else{
- $("[name=li_speaker]").css("display", "none");
- }
- T_LoadSetup("general");
- T_LoadSetup("preset");
- if($("[name=SYS_BOARDID]").val() == 0x1003 || $("[name=SYS_BOARDID]").val() == 0x1007){
- T_LoadSetup("preset1");
- T_LoadSetup("preset2");
- T_LoadSetup("preset3");
- }
- T_LoadSetup("system");
- T_LoadSetup("video");
- T_LoadSetup("extptz");
- T_LoadSetup("curbcs");
- T_LoadSetup("directioncam");
-
- if((readSetupByKey("SYS_IS_STEINSVIKSPECIFIC") == 1) && ($("[name=SYS_BOARDID]").val() == 0x45005)) { // IMX-290 + IPM-900S
- T_LoadSetup("pelletmode");
- $("[name=li_pelletmode]").css("display", "");
- }
- else {
- $("[name=li_pelletmode]").css("display", "none");
- }
- if( ((boardid & 0xF000) == 0x9000 || (boardid & 0xF000) == 0xA000 || (boardid & 0xF000) == 0xB000 ) && (4 == ft_ir4)) {
- if(trnPlayer == PLAYER_ACTIVEX){
- g_detection_4ch_support = SUPPORT_DETECTION_CAM_4CH ;
- $("[name=ShowHideDirectionBtn]").css("display", "");
- Show_Hide_LiveOrJPGBtn(1);
- }
- else if(trnPlayer == PLAYER_CHROMEPLUGIN){
- g_detection_4ch_support = SUPPORT_DETECTION_CAM_4CH ;
- $("[name=ShowHideDirectionBtn]").css("display", "");
- Show_Hide_LiveOrJPGBtn(1);
- }
- else if(trnPlayer == PLAYER_WEBSOCKET){
- g_detection_4ch_support = SUPPORT_DETECTION_CAM_4CH ;
- $("[name=ShowHideDirectionBtn]").css("display", "");
- Show_Hide_LiveOrJPGBtn(1);
- }
- else if(trnPlayer == PLAYER_JPEGSNAP){
- g_detection_4ch_support = SUPPORT_DETECTION_CAM_4CH ;
- $("[name=ShowHideDirectionBtn]").css("display", "");
- Show_Hide_LiveOrJPGBtn(0);
- }
- else {
- ;
- }
- }
- if (ft_ir4 == 4 || (boardid & 0xFFFF) == 0xB001) { // P8 or P8S(0xB001)
- $("[name=li_camerasel]").css("display", "");
- if (ft_ir4 == 4) {
- document.getElementById("camerasel").selectedIndex = 0; // PTZ
- }
- else {
- document.getElementById("camerasel").selectedIndex = 1; // Direction
- }
- }
- initLanguage();
- init_directioncam_gui(0);
-
- if(readSetupByKey("SYS_LIVETOOLTIP") == 1) {
- $("#id_view_smaller").attr('title',GetLan(1045)); // "View Size Smaller"
- $("#id_view_larger").attr('title',GetLan(1046)); // "View Size Larger"
- $("#id_view_resize").attr('title',GetLan(1047)); // "Resize View"
- $("#id_fullscreen").attr('title',GetLan(684)); // "Fullscreen"
- $("#id_motion").attr('title',GetLan(39)); // "Motion Detection"
- $("#id_sensor1").attr('title',GetLan(154)+"1"); // "Sensor1"
- $("#id_sensor2").attr('title',GetLan(154)+"2");
- $("#id_sensor3").attr('title',GetLan(154)+"3");
- $("#id_sensor4").attr('title',GetLan(154)+"4");
- $("#id_sensor5").attr('title',GetLan(154)+"5");
- $("#id_alarm1").attr('title',GetLan(162)+"1"); // "Alarm1"
- $("#id_alarm2").attr('title',GetLan(162)+"2");
- $("#id_alarm3").attr('title',GetLan(162)+"3");
- $("#id_alarm4").attr('title',GetLan(162)+"4");
- $("#id_snapshot").attr('title',GetLan(248)); // "Snapshot"
- $("#id_talk").attr('title',GetLan(249)); // "Talk"
- $("#id_record").attr('title',GetLan(321)); // "Record"
- $("#id_shock").attr('title',GetLan(230)); // "Shock Detection" // shock_exist = 0; (always zero check in 2018-10-15)
- $("#id_wiper").attr('title',GetLan(175)); // "Wiper"
- $("#id_buffer_down").attr('title',GetLan(1048)); // "Player Buffer Size Down"
- $("#id_buffer_up").attr('title',GetLan(1049)); // "Player Buffer Size Up"
- $("#id_buffer_resize").attr('title',GetLan(1050)); // "Resize Player Buffer"
- }
- init_video_select(document.formView.videosel, readSetupByKey("VID_MAX_STREAM_OF_ONE_CHANNEL"));
- if(getCookie('truenvideoselect') == ''){
- if($("[name=SYS_BOARDID]").val() == 0xB001){
- is_secondary = 8;
- } else {
- is_secondary = 0;
- }
- setCookie('truenvideoselect', is_secondary, 100);
- }
- else{
- is_secondary = parseInt(getCookie('truenvideoselect'));
- if($("[name=SYS_BOARDID]").val() == 0x1003 || $("[name=SYS_BOARDID]").val() == 0x1007 || $("[name=SYS_BOARDID]").val() == 0xB001){
- if(is_secondary == 1 || is_secondary == 5) ptzchannel = 2;
- else if(is_secondary == 2 || is_secondary == 6) ptzchannel = 3;
- else if(is_secondary == 3 || is_secondary == 7) ptzchannel = 4;
- else ptzchannel = 1;
- }
- }
- $("#videosel").val(is_secondary);
-
- if((parseInt(readSetupByKey("SYS_NOT_SUPPORT_FUNCTION")) & parseInt(1<<PTZ_FUNCTION)) == parseInt(1<<PTZ_FUNCTION)){
- $("[name=group_camera]").css("display", "none");
- }
- else{
- $("#preset_select").empty();
- str = '<option value="0" selected="true">' + GetLan(325) + '</option>';
- $("#preset_select").append(str);
-
- if($("[name=SYS_BOARDID]").val() == 0x1003 || $("[name=SYS_BOARDID]").val() == 0x1007){
- if(is_secondary == 1 || is_secondary == 5) presetchannel = "PT1";
- else if(is_secondary == 2 || is_secondary == 6) presetchannel = "PT2";
- else if(is_secondary == 3 || is_secondary == 7) presetchannel = "PT3";
- else presetchannel = "PTZ";
-
- for(i = 1; i <= 9; i++) {
- str = '<option value="' + i + '">Preset-' + i + ': ' + $("[name=" + presetchannel + "_PRESET00" + i + "]").val() + '</option>';
- $("#preset_select").append(str);
- }
- for(i = 10; i <= 99; i++) {
- str = '<option value="' + i + '">Preset-' + i + ': ' + $("[name=" + presetchannel + "_PRESET0" + i + "]").val() + '</option>';
- $("#preset_select").append(str);
- }
- for(i = 100; i <= 128; i++) {
- str = '<option value="' + i + '">Preset-' + i + ': ' + $("[name=" + presetchannel + "_PRESET" + i + "]").val() + '</option>';
- $("#preset_select").append(str);
- }
- }
- else{
- for(i = 1; i <= 9; i++) {
- str = '<option value="' + i + '">Preset-' + i + ': ' + $("[name=PTZ_PRESET00" + i + "]").val() + '</option>';
- $("#preset_select").append(str);
- }
- for(i = 10; i <= 99; i++) {
- str = '<option value="' + i + '">Preset-' + i + ': ' + $("[name=PTZ_PRESET0" + i + "]").val() + '</option>';
- $("#preset_select").append(str);
- }
- for(i = 100; i <= 500; i++) {
- if((i >= 131 && i <= 134) || (i >= 141 && i <= 148) || (i >= 151 && i <= 158) || (i >= 161 && i <= 162) || (i == 167) || (i >= 174 && i <= 175) || (i >= 177 && i <= 179)){
- }
- else{
- str = '<option value="' + i + '">Preset-' + i + ': ' + $("[name=PTZ_PRESET" + i + "]").val() + '</option>';
- $("#preset_select").append(str);
- }
- }
- }
-
- if(0){
- $("#ptzbuttongroup_1").css("display", "");
- }
- else{
- $("#ptzbuttongroup_1").css("display", "none");
- }
- if(0){
- $("#ptzbuttongroup_2").css("display", "");
- }
- else{
- $("#ptzbuttongroup_2").css("display", "none");
- }
- if(0){
- $("#ptzbuttongroup_3").css("display", "");
- }
- else{
- $("#ptzbuttongroup_3").css("display", "none");
- }
- if($("[name=SYS_MODULE_TYPE]").val() == LG_MODULE || $("[name=SYS_MODULE_TYPE]").val() == WONWOO_MODULE){
- $("#ptzbuttongroup_4").css("display", "");
- }
- else{
- $("#ptzbuttongroup_4").css("display", "none");
- }
-
- tracking = 1;
- if (($("[name=SYS_MODULE_TYPE]").val() != PANASONIC_MODULE && readSetupByKey("SYS_USE_AUTO_PTZ") != 1) ||
- (parseInt(readSetupByKey("SYS_FTCAMERA_IR4")) == 4)){
- tracking = 0;
- }
-
- acw = 1;
- if($("[name=SYS_PTZ_TYPE]").val() != 7 || parseInt(readSetupByKey("SYS_INTELLIGENT_PTZ")) != 1) {
- acw = 0;
- }
- // console.log(tracking);
- if(tracking == 0 && acw == 0){
- $("#trackingbuttonline").css("display", "none");
- $("#trackingbuttongroup").css("display", "none");
- }
- else{
- if(tracking == 0){
- $("#TrackingButton").css("display", "none");
- }
- else{
- if(parseInt(readSetupByKey("ETC_AutoPursuit_Enable")) == 0 &&
- (parseInt(readSetupByKey("SYS_IS_OBJECT_DETECT")) == 1 && parseInt(readSetupByKey("ETC_OD_TRACKING_READY")) != 1)){
- $.khjDisable("TrackingButton");
- }
- }
- if(acw == 0){
- $("#ACWButton").css("display", "none");
- }
- }
-
- if(readSetupByKey("SER_PTZTYPE") != 9){
- $("#autopanline").css("display", "none");
- $("#autopanbuttongroup").css("display", "none");
- }
- if(parseInt(readSetupByKey("SYS_IS_SEMOCON_SPECIFIC")) == 1){
- $("#presetbuttongroup_1").css("display", "none");
- $("#presetbuttongroup_2").css("display", "");
- $("#ptzbuttongroup_5").css("display", "");
- $("#semocon_irmove_buttons").css("display", "");
- $("#after_action_group").css("display", "");
- if(parseInt(readSetupByKey("ETC_HOUSINGWASHERENABLE")) == 1){
- $("[name=li_sensor1]").css("display", "none");
- $("[name=li_alarm1]").css("display", "none");
- }
- isSemocon = 1;
- }
- else{
- $("#presetbuttongroup_2").css("display", "none");
- $("#ptzbuttongroup_5").css("display", "none");
- $("#semocon_irmove_buttons").css("display", "none");
- $("#after_action_group").css("display", "none");
- isSemocon = 0;
- }
- if(parseInt(readSetupByKey("SYS_IS_HAPCHEON_SPECIFIC")) == 1){
- document.getElementById('logout').style.display = "";
- $("#ptzbuttongroup_8").css("display", "");
- if( $("[name=SYS_MODULE_TYPE]").val() == SONY_MODULE ||
- $("[name=SYS_MODULE_TYPE]").val() == PANASONIC_MODULE ||
- $("[name=SYS_MODULE_TYPE]").val() == TECHWIN_MODULE ||
- $("[name=SYS_MODULE_TYPE]").val() == WONWOO_MODULE ) {
- $("[name=li_reset_zoom_module]").css("display", "");
- } else {
- $("[name=li_reset_zoom_module]").css("display", "none");
- }
- $("#div_ptz_panel_drag").css("display", "none");
- $("#div_ptz_panel_button").css("display", "");
- $("#panel_title_below").css("display", "none");
- } else if(readSetupByKey("SYS_IS_HATTLELAND_SPEC") == 1){
- $("[name=LAN_685]").css("display", "none");
- $("[name=li_talk]").css("display", "none");
- $("[name=li_talkline]").css("display", "none");
- $("#div_ptz_panel_drag").css("display", "none");
- $("#panel_title_below").css("display", "");
- $(".preset").css("display", "none");
- $(".freesetBtn").css("display", "none");
- $("#presetbuttongroup_1").css("display", "none");
- } else {
- $("#ptzbuttongroup_8").css("display", "none");
- $("#div_ptz_panel_drag").css("display", "");
- $("#div_ptz_panel_button").css("display", "none");
- $("#panel_title_below").css("display", "none");
- }
- if(parseInt(readSetupByKey("SYS_CYNIX_Wiper")) == 1){
- $("#ptzbuttongroup_6").css("display", "");
- }
- else{
- $("#ptzbuttongroup_6").css("display", "none");
- }
-
- if(parseInt(readSetupByKey("SYS_FTCAMERA_IR4")) == 3 || parseInt(readSetupByKey("SYS_FTCAMERA_IR4")) == 4){
- $("#ptzbuttongroup_7").css("display", "");
- }
- else{
- $("#ptzbuttongroup_7").css("display", "none");
- }
- }
- if(readSetupByKey("SYS_IS_BNB_SPECIFIC") == 1) {
- $("[name=li_sleepmode]").css("display", "");
- } else {
- $("[name=li_sleepmode]").css("display", "none");
- }
- if(readSetupByKey("SYS_BOARDID") == 0xB001) {
- if (is_secondary == 8 || is_secondary == 9) {
- $("[name=li_motion]").css("display", "none");
- $("[name=li_motionline]").css("display", "none");
- } else {
- $("[name=li_motion]").css("display", "");
- $("[name=li_motionline]").css("display", "");
- }
- }
- init_id_talk(1);
- init_id_speaker(0);
- init_id_snapshot(1);
- init_id_fullscreen(1);
- init_id_buffering(1);
- if(trnPlayer == PLAYER_ACTIVEX){
- $("[name=group_digital]").css("display", "");
- $("[name=group_file]").css("display", "");
- $("[name=group_file2]").css("display", "none");
- $("[name=group_file3]").css("display", "none");
- tvs_init(location.hostname, readSetupByKey("NET_BASEPORT"), auth["USR_LOGINID"], auth["USR_LOGINPASS"], is_secondary);
- }
- else if(trnPlayer == PLAYER_CHROMEPLUGIN){
- init_id_talk(0);
- $("[name=group_digital]").css("display", "");
- $("[name=group_file]").css("display", "none");
- $("[name=group_file2]").css("display", "none");
- $("[name=group_file3]").css("display", "none");
- var sRTSPUrl = getRTSPURL(is_secondary , 0);
- var sRTSPPort = readSetupByKey("NET_RTSPPORT");
- var sAddress = 'rtsp://' + auth["USR_LOGINID"] + ':' + auth["USR_LOGINPASS"] + '@' + location.hostname + ':' + sRTSPPort + sRTSPUrl;
- VXGMP_createPlayer('vxgplayer1', sAddress, 720, 405, 'dynamicallyPlayers');
- vxgplayer('vxgplayer1').onStateChange(function(readyState){
- if(readyState == 2){
- currnetRes = parseInt(readSetupByKey(resolutionAPIString));
- setviewsize(-1);
- }
- // console.log("NEW READY STATE: " + readyState);
- });
- vxgplayer('vxgplayer1').onRecord(function(player, status, file){
- if(status == "RECORD_STARTED"){
- document.formView.RecordInfo.value = " Recording...";
- document.formView.RecordFname.value = file;
- }
- else if(status == "RECORD_STOPPED"){
- document.formView.RecordFname.value = file;
- if(Ccurrentrec == 1){
- Ccurrentrec = 0;
- document.formView.CRecButton.value = 'Record Start';
- document.getElementById('recordinfo_msg').style.display = 'none';
- }
- }
- else if(status == "RECORD_FULL"){
- document.formView.RecordInfo.value = " No free space.";
- document.formView.CRecButton.value = 'Record Start';
- Ccurrentrec = -1;
- $( "#dialog-warning" ).dialog( "open" );
- }
-
- // console.log("player RECORD: " + player + " " + status+' '+file);
- });
- }
- else if(trnPlayer == PLAYER_WEBSOCKET){
- init_id_buffering(1);
- if (location.protocol == 'https:')
- {
- init_id_talk(1);
- }
- else // http:
- {
- $("#id_talk").attr('title',"only support HTTPS");
- init_id_talk(0);
- }
- init_id_speaker(1);
- $("[name=group_digital]").css("display", "");
- $("[name=group_file]").css("display", "none");
- $("[name=group_file2]").css("display", "none");
- $("[name=group_file3]").css("display", "");
- var sRTSPUrl = getRTSPURL(is_secondary , 0);
- var sRTSPPort = readSetupByKey("NET_RTSPPORT");
- var sAddress = 'rtsp://' + location.hostname + ':' + sRTSPPort + sRTSPUrl;
- var sWSAddress = (location.protocol == 'https:' ? 'wss://' : 'ws://') + location.hostname + (location.port ? ':' + location.port : '') + '/rtsp_over_websocket';
- var buf = 1;
- if(getCookie('truendisplaybuffer') != ''){
- buf = parseInt(getCookie('truendisplaybuffer'));
- }
- VXGWSMP_createPlayer('vxgwsplayer1', sAddress, sWSAddress, 720, 405, buf, 'dynamicallyPlayers', auth["USR_LOGINID"], auth["USR_LOGINPASS"]);
- vxgwsplayer('vxgwsplayer1').onStateChange(function(state){
- if (parseInt(readSetupByKey("SYS_CUR_WS_CONNUM")) >= 8) {
- VXGWSMP_ShowError('vxgwsplayer1', 'Too many connections');
- }
- else {
- VXGWSMP_HideError('vxgwsplayer1');
- }
- currnetRes = parseInt(readSetupByKey(resolutionAPIString));
- setviewsize(-1);
- });
- vxgwsplayer('vxgwsplayer1').onRecord = function(args){
- if (args.isRecording == true && args.isRecStopping == false) // started
- {
- WSRecTimeTick = -1;
- WSRecTimer();
- WSRecTimerId = setInterval(WSRecTimer, 1000);
- document.getElementById('WSRecTimeMsg').style.display = 'block';
- document.formView.WSRecButton.value = 'Stop';
- document.formView.WSRecButton.disabled = false;
- }
- else if (args.isRecording == false && args.isRecStopping == false) // stopped
- {
- if (Ccurrentrec) Ccurrentrec = 0;
- clearInterval(WSRecTimerId);
- WSRecTimerId = undefined;
- document.getElementById('WSRecTimeMsg').style.display = 'none';
- document.formView.WSRecButton.value = 'Start';
- document.formView.WSRecButton.disabled = false;
- }
- else // args.isRecStopping == true // stopping
- {
- document.formView.WSRecMsg.value = ' Stopping...';
- document.formView.WSRecButton.disabled = true;
- }
- };
- }
- else if(trnPlayer == PLAYER_JPEGSNAP){
- var sAddress = getJPGURL(is_secondary, 0);
- // alert("sAddress : " + sAddress); // ch1.jpg
- init_id_buffering(0);
- init_id_fullscreen(0);
- init_id_snapshot(0);
- init_id_talk(0);
- talk_disabled = 1;
- $("[name=group_digital]").css("display", "none");
- $("[name=group_file]").css("display", "none");
- $("[name=group_file2]").css("display", "none");
- $("[name=group_file3]").css("display", "none");
- if($("[name=SYS_MODE]").val() != 1) {
- $("#dynamicallyPlayers").html("<div><img id=\"img_update\" name=\"img_update\" style=\"width:720px;height:405px\" src=\"/capturx/"+sAddress+"?index=" + indexcount + "\" /></div>");
- indexcount++;
- if (timerTickId == undefined) {
- if((boardid & 0xF000) == 0xE000) {
- timerTickId = setInterval(timerTick, 1000);
- } else {
- timerTickId = setInterval(timerTick, 500);
- }
- }
- } else {
- var contents2 = "<div style=\"width:720px; height:405px; text-align:center; display:table-cell; vertical-align:middle;\"><span>" + GetLan(1008) + "</span></div>";
- $("#dynamicallyPlayers").html(contents2);
- }
- }
- else{
- init_id_fullscreen(0);
- init_id_snapshot(0);
- init_id_talk(0);
- talk_disabled = 1;
- $("[name=group_digital]").css("display", "none");
- $("[name=group_file]").css("display", "none");
- $("[name=group_file2]").css("display", "none");
- $("[name=group_file3]").css("display", "none");
- }
- if( SUPPORT_DETECTION_CAM_4CH == g_detection_4ch_support ) {
- init_directioncam();
- init_directioncam_browser();
- init_directioncam_gui(1);
- if (timerTickDetection4ChId == undefined) {
- timerTickDetection4ChId = setInterval(timerTickDetection4Ch, 3000);
- }
- }
-
- if($("[name=SYS_ISIPCAM]").val() == 0){
- $("[name=group_image]").css("display", "none");
- }
- else {
- if ($("[name=SYS_BOARDID]").val() == 0xB001) {
- $("[name=group_image]").css("display", "none");
- }
- else {
- if (parseInt(readSetupByKey("SYS_IS_JIINTECH_SPECIFIC")) == 1)
- {
- $("#div_image1").css("display", "none");
- $("#div_image2").css("display", "");
- }
- else
- {
- $("#div_image1").css("display", "");
- $("#div_image2").css("display", "none");
- }
- }
- }
- document.formView.Directory.value = getCookie('truenrecordpath');
- document.formView.FileName.value = getCookie('truenrecordfile');
- document.formView.WSRecFileName.value = getCookie('truenrecordfile');
- if(getCookie('truenfullscreenmode') == ''){
- Full_Screen_Mode = 1;
- setCookie('truenfullscreenmode', Full_Screen_Mode, 100);
- }
- else{
- Full_Screen_Mode = parseInt(getCookie('truenfullscreenmode'));
- if(Full_Screen_Mode != 1 && Full_Screen_Mode != 2){
- Full_Screen_Mode = 1;
- setCookie('truenfullscreenmode', Full_Screen_Mode, 100);
- }
- }
- FSM_Once = 1;
-
- if(getCookie('truenviewsize') == ''){
- viewsizerate = 50;
- if(SUPPORT_DETECTION_CAM_4CH == g_detection_4ch_support) {
- minwidth = 1400 ;
- }
- $(".viewSize").khjSlider(viewsizerate);
- setviewsize(viewsizerate);
- setCookie('truenviewsize', viewsizerate, 100);
- }
- else{
- var val = parseInt(getCookie('truenviewsize'));
- viewsizerate = val;
-
- if(SUPPORT_DETECTION_CAM_4CH == g_detection_4ch_support) {
- minwidth = 1400 ;
- }
- $(".viewSize").khjSlider(val);
- setviewsize(val);
- }
- if(getCookie('truendisplaybuffer') == ''){
- displaybuffer = 1;
- if(trnPlayer == PLAYER_ACTIVEX){
- tvs_SetBuffer(1);
- if(IS_SHOW_DETECTIONCAM() && IS_SHOW_IN_LIVE_DETECTIONCAM()) {
- tvs_SetBuffer_DirectionCam(1);
- }
- }
- else if(trnPlayer == PLAYER_CHROMEPLUGIN){
- VXGMP_SetBuffer('vxgplayer1', 1);
- }
- else if(trnPlayer == PLAYER_WEBSOCKET){
- //See VXGWSMP_createPlayer()
- //VXGWSMP_SetBuffer('vxgwsplayer1', 1);
- }
- setCookie('truendisplaybuffer', 1, 100);
- $(".buffering").khjSlider(1);
- }
- else{
- var buf = parseInt(getCookie('truendisplaybuffer'));
- if(trnPlayer == PLAYER_ACTIVEX){
- tvs_SetBuffer(buf);
- if(IS_SHOW_DETECTIONCAM() && IS_SHOW_IN_LIVE_DETECTIONCAM()) {
- tvs_SetBuffer_DirectionCam(buf);
- }
- }
- else if(trnPlayer == PLAYER_CHROMEPLUGIN){
- VXGMP_SetBuffer('vxgplayer1', buf);
- }
- else if(trnPlayer == PLAYER_WEBSOCKET){
- //See VXGWSMP_createPlayer()
- //VXGWSMP_SetBuffer('vxgwsplayer1', buf);
- }
- $(".buffering").khjSlider(buf);
- displaybuffer = buf;
- }
- if(getCookie('truenviewaccordion') == ''){
- setCookie('truenviewaccordion', 0, 100);
- viewaccordion = 0;
- }
- else{
- viewaccordion = parseInt(getCookie('truenviewaccordion'));
- if(viewaccordion & 0x01){
- $("#digital_accordion_button").click();
- }
- if(viewaccordion & 0x02){
- $("#ptz_accordion_button").click();
- }
- if(viewaccordion & 0x04){
- $("#rec_accordion_button").click();
- }
- if(viewaccordion & 0x08){
- $("#rec2_accordion_button").click();
- }
- if(viewaccordion & 0x10){
- $("#image_accordion_button").click();
- }
- if(viewaccordion & 0x20){
- $("#canon_accordion_button").click();
- }
- if(viewaccordion & 0x40){
- $("#wsrec_accordion_button").click();
- }
- }
-
- // $("[name=videosel]").customSelect();
- // $("[name=list_select]").customSelect();
- // $("[name=videosel]").trigger("update");
- if(trnPlayer != PLAYER_ACTIVEX || parseInt(readSetupByKey("SYS_DISABLE_VSNM")) == 1){
- timerEventId = setInterval(timerEvent, 1000);
- }
- else{
- if(airwiper == 3 || airwiper == 4){
- timerEvent2Id = setInterval(timerEvent2, 1000);
- }
- }
-
- if(trnPlayer == PLAYER_ACTIVEX) {
- }
- else if(trnPlayer == PLAYER_CHROMEPLUGIN || trnPlayer == PLAYER_WEBSOCKET || trnPlayer == PLAYER_JPEGSNAP){
- if (($("[name=SYS_PTZ_TYPE]").val() == '7') || (isSemocon == 1) || (($("[name=PTZ_ExtPTZUse]").val() == '1') && ($("[name=PTZ_ExtPTZDragandZoom]").val() == '1'))){
- if (initcanvas == 0) {
- canvasinit();
- initcanvas = 1;
- }
- }
- }
-
- initDialog();
-
- if(password_warning && readSetupByKey("SYS_IgnorePasswordWarning") == 0 && readSetupByKey("SYS_IsDefaultPassword") == 1 && auth["USR_LOGINID"] == "admin"){
- $( "#dialog-warning2" ).dialog( "open" );
- }
-
- started = 1;
- setviewsize(-1);
- }
- var paint;
- var StartX;
- var StartY;
- var CurrentX;
- var CurrentY;
- function canvasinit(){
- var canvasDiv = document.getElementById('canvasDiv');
- canvas_ptz = document.createElement('canvas');
- canvas_ptz.setAttribute('width', 640);
- canvas_ptz.setAttribute('height', 360);
- canvas_ptz.setAttribute('id', 'canvas_ptz_id');
- canvas_ptz.setAttribute('style', 'opacity: 0.5');
- canvasDiv.appendChild(canvas_ptz);
-
- if(typeof G_vmlCanvasManager != 'undefined') {
- canvas_ptz = G_vmlCanvasManager.initElement(canvas_ptz);
- }
- context_ptz = canvas_ptz.getContext("2d");
- $('#canvas_ptz_id').mousedown(function(e){
- if(e.button == 2){
- ptz_preset_goto(ptzchannel, 8000000);
- }
- else if(e.button == 0){
- var mouseX = e.offsetX - this.offsetLeft;
- var mouseY = e.offsetY - this.offsetTop;
- paint = true;
- StartX = mouseX;
- StartY = mouseY;
- }
- });
- $('#canvas_ptz_id').mousemove(function(e){
- if(paint){
- var mouseX = e.offsetX - this.offsetLeft;
- var mouseY = e.offsetY - this.offsetTop;
- CurrentX = mouseX;
- CurrentY = mouseY;
- redraw();
- }
- });
- $('#canvas_ptz_id').mouseup(function(e){
- if(paint){
- var mouseX = e.offsetX - this.offsetLeft;
- var mouseY = e.offsetY - this.offsetTop;
- CurrentX = mouseX;
- CurrentY = mouseY;
- a = Math.round(StartX*1000 / context_ptz.canvas.width);
- b = Math.round(StartY*1000 / context_ptz.canvas.height);
- c = Math.round(CurrentX*1000 / context_ptz.canvas.width);
- d = Math.round(CurrentY*1000 / context_ptz.canvas.height);
- if(a <= c){
- if(b <= d) ptz_drag_zoom(a, b, c, d);
- else ptz_drag_zoom(a, d, c, b);
- }
- else{
- if(b <= d) ptz_drag_zoom(c, b, a, d);
- else ptz_drag_zoom(c, d, a, b);
- }
-
- context_ptz.clearRect(0, 0, context_ptz.canvas.width, context_ptz.canvas.height); // Clears the canvas
- paint = false;
- }
- });
- $('#canvas_ptz_id').mouseleave(function(e){
- context_ptz.clearRect(0, 0, context_ptz.canvas.width, context_ptz.canvas.height); // Clears the canvas
- paint = false;
- });
- $('#canvas_ptz_id').dblclick(function(e){
- var mouseX = e.offsetX - this.offsetLeft;
- var mouseY = e.offsetY - this.offsetTop;
-
- aa = Math.round(mouseX*1000 / context_ptz.canvas.width);
- bb = Math.round(mouseY*1000 / context_ptz.canvas.height);
- z = aa*1000 + bb + 4000000;
- //alert('z='+z);
- ptz_preset_goto(ptzchannel, z);
- });
- }
- function redraw(){
- context_ptz.clearRect(0, 0, context_ptz.canvas.width, context_ptz.canvas.height); // Clears the canvas
-
- context_ptz.strokeStyle = "#ffffff";
- context_ptz.lineJoin = "round";
- context_ptz.lineWidth = 2;
- context_ptz.beginPath();
- context_ptz.rect(StartX, StartY, CurrentX - StartX, CurrentY - StartY);
- context_ptz.closePath();
- context_ptz.stroke();
-
- }
- var paint_4ch = [false,false,false,false];
- var StartX_4ch = [0,0,0,0];
- var StartY_4ch = [0,0,0,0];
- var CurrentX_4ch = [0,0,0,0];
- var CurrentY_4ch = [0,0,0,0];
- function detection_4ch_mousedown(e , index, val)
- {
- if(e.button == 2){
- // ptz_preset_goto(ptzchannel, 8000000);
- }
- else if(e.button == 0){
- var mouseX = e.offsetX - val.offsetLeft;
- var mouseY = e.offsetY - val.offsetTop;
- // console.log("e.offsetX:"+e.offsetX + ",val.offsetLeft:"+ val.offsetLeft + ",e.offsetY:" + e.offsetY + ",val.offsetTop:" + val.offsetTop);
- paint_4ch[index] = true;
- StartX_4ch[index] = mouseX;
- StartY_4ch[index] = mouseY;
- }
- }
- function detection_4ch_mousemove(e, index, val)
- {
- if(paint_4ch[index]){
- var mouseX = e.offsetX - val.offsetLeft;
- var mouseY = e.offsetY - val.offsetTop;
- CurrentX_4ch[index] = mouseX;
- CurrentY_4ch[index] = mouseY;
- redraw_detection_4ch(index);
- }
- }
- function detection_4ch_mouseup(e, index, val)
- {
- if(paint_4ch[index]){
- var mouseX = e.offsetX - val.offsetLeft;
- var mouseY = e.offsetY - val.offsetTop;
- // console.log("e.offsetX : "+ e.offsetX + " val.offsetLeft : " + val.offsetLeft + ", e.offsetY : "+ e.offsetY + " val.offsetTop : " + val.offsetTop);
-
- CurrentX_4ch[index] = mouseX;
- CurrentY_4ch[index] = mouseY;
- a = Math.round(StartX_4ch[index]*1000 / context_detection_4ch[index].canvas.width);
- b = Math.round(StartY_4ch[index]*1000 / context_detection_4ch[index].canvas.height);
- c = Math.round(CurrentX_4ch[index]*1000 / context_detection_4ch[index].canvas.width);
- d = Math.round(CurrentY_4ch[index]*1000 / context_detection_4ch[index].canvas.height);
- if(a <= c){
- if(b <= d) ptz_det_drag_zoom(index, a, b, c, d);
- else ptz_det_drag_zoom(index, a, d, c, b);
- }
- else{
- if(b <= d) ptz_det_drag_zoom(index, c, b, a, d);
- else ptz_det_drag_zoom(index, c, d, a, b);
- }
-
- context_detection_4ch[index].clearRect(0, 0, context_detection_4ch[index].canvas.width, context_detection_4ch[index].canvas.height); // Clears the canvas
- paint_4ch[index] = false;
- }
- }
- function detection_4ch_mouseleave(e, index, val)
- {
- context_detection_4ch[index].clearRect(0, 0, context_detection_4ch[index].canvas.width, context_detection_4ch[index].canvas.height); // Clears the canvas
- paint_4ch[index] = false;
- }
- function detection_4ch_dblclick(e, index, val)
- {
- var mouseX = e.offsetX - val.offsetLeft;
- var mouseY = e.offsetY - val.offsetTop;
-
- aa = Math.round(mouseX*1000 / context_detection_4ch[index].canvas.width);
- bb = Math.round(mouseY*1000 / context_detection_4ch[index].canvas.height);
- z = aa*1000 + bb + 4000000;
- //alert('z='+z);
- ptz_det_clicktocenter(index, aa, bb);
- }
- function canvasinit_getposition(index_param)
- {
- var firstCanvas = 0;
- var index ;
- for(index = 0; index < 4 ; ++ index) {
- if(index_param == index ) {
- if(0 == canvas_PTZ_position[index]) {
- var canvasDiv ;
- if(0 == index) {
- canvasDiv = document.getElementById('canvasDiv_PTZPosCam0');
- }
- else if(1 == index) {
- canvasDiv = document.getElementById('canvasDiv_PTZPosCam1');
- }
- else if(2 == index) {
- canvasDiv = document.getElementById('canvasDiv_PTZPosCam2');
- }
- else {
- canvasDiv = document.getElementById('canvasDiv_PTZPosCam3');
- }
-
- canvas_PTZ_position[index] = document.createElement('canvas');
- canvas_PTZ_position[index].setAttribute('width', 320);
- canvas_PTZ_position[index].setAttribute('height', 180);
- if(0 == index) {
- canvas_PTZ_position[index].setAttribute('id', 'canvas_PTZ_position0');
- }
- else if(1 == index) {
- canvas_PTZ_position[index].setAttribute('id', 'canvas_PTZ_position1');
- }
- else if(2 == index) {
- canvas_PTZ_position[index].setAttribute('id', 'canvas_PTZ_position2');
- }
- else {
- canvas_PTZ_position[index].setAttribute('id', 'canvas_PTZ_position3');
- }
-
- canvas_PTZ_position[index].setAttribute('style', 'opacity: 0.5');
- canvasDiv.appendChild(canvas_PTZ_position[index]);
-
- if(typeof G_vmlCanvasManager != 'undefined') {
- canvas_PTZ_position[index] = G_vmlCanvasManager.initElement(canvas_PTZ_position[index]);
- }
- context_PTZ_position[index] = canvas_PTZ_position[index].getContext("2d");
- }
- }
- }
- }
- function canvasinit_detection_4ch(index_param){
-
- var index ;
- for(index = 0; index < 4 ; ++ index) {
- if(index_param == index) {
- if(0 == canvas_detection_4ch[index]) {
- var canvasDiv ;
- if(0 == index) {
- canvasDiv = document.getElementById('canvasDiv_DetectionCam0');
- }
- else if(1 == index) {
- canvasDiv = document.getElementById('canvasDiv_DetectionCam1');
- }
- else if(2 == index) {
- canvasDiv = document.getElementById('canvasDiv_DetectionCam2');
- }
- else {
- canvasDiv = document.getElementById('canvasDiv_DetectionCam3');
- }
-
- canvas_detection_4ch[index] = document.createElement('canvas');
- canvas_detection_4ch[index].setAttribute('width', 320);
- canvas_detection_4ch[index].setAttribute('height', 180);
- if(0 == index) {
- canvas_detection_4ch[index].setAttribute('id', 'canvas_detection_4ch0');
- }
- else if(1 == index) {
- canvas_detection_4ch[index].setAttribute('id', 'canvas_detection_4ch1');
- }
- else if(2 == index) {
- canvas_detection_4ch[index].setAttribute('id', 'canvas_detection_4ch2');
- }
- else {
- canvas_detection_4ch[index].setAttribute('id', 'canvas_detection_4ch3');
- }
-
- canvas_detection_4ch[index].setAttribute('style', 'opacity: 0.5');
-
- canvasDiv.appendChild(canvas_detection_4ch[index]);
- if(typeof G_vmlCanvasManager != 'undefined') {
- canvas_detection_4ch[index] = G_vmlCanvasManager.initElement(canvas_detection_4ch[index]);
- }
- context_detection_4ch[index] = canvas_detection_4ch[index].getContext("2d");
- }
- }
- }
- if(0 == index_param) {
- // channel 0
- $('#canvas_detection_4ch0').mousedown(function(e){
- // console.log("e.offsetX:"+e.offsetX + ",this.offsetLeft:"+ this.offsetLeft + ",e.offsetY:" + e.offsetY + ",this.offsetTop:" + this.offsetTop);
- detection_4ch_mousedown(e, 0, this);
- });
- $('#canvas_detection_4ch0').mousemove(function(e){
- detection_4ch_mousemove(e, 0, this);
- });
- $('#canvas_detection_4ch0').mouseup(function(e){
- detection_4ch_mouseup(e, 0, this);
- });
- $('#canvas_detection_4ch0').mouseleave(function(e){
- detection_4ch_mouseleave(e, 0, this);
- });
- $('#canvas_detection_4ch0').dblclick(function(e){
- detection_4ch_dblclick(e, 0, this);
- });
- }
- else if(1 == index_param) {
- // channel 1
- $('#canvas_detection_4ch1').mousedown(function(e){
- detection_4ch_mousedown(e, 1, this);
- });
- $('#canvas_detection_4ch1').mousemove(function(e){
- detection_4ch_mousemove(e, 1, this);
- });
- $('#canvas_detection_4ch1').mouseup(function(e){
- detection_4ch_mouseup(e, 1, this);
- });
- $('#canvas_detection_4ch1').mouseleave(function(e){
- detection_4ch_mouseleave(e, 1, this);
- });
- $('#canvas_detection_4ch1').dblclick(function(e){
- detection_4ch_dblclick(e, 1, this);
- });
- }
- else if(2 == index_param) {
- // channel 2
- $('#canvas_detection_4ch2').mousedown(function(e){
- detection_4ch_mousedown(e, 2, this);
- });
- $('#canvas_detection_4ch2').mousemove(function(e){
- detection_4ch_mousemove(e, 2, this);
- });
- $('#canvas_detection_4ch2').mouseup(function(e){
- detection_4ch_mouseup(e, 2, this);
- });
- $('#canvas_detection_4ch2').mouseleave(function(e){
- detection_4ch_mouseleave(e, 2, this);
- });
- $('#canvas_detection_4ch2').dblclick(function(e){
- detection_4ch_dblclick(e, 2, this);
- });
- }
- else {
- // channel 3
- $('#canvas_detection_4ch3').mousedown(function(e){
- detection_4ch_mousedown(e, 3, this);
- });
- $('#canvas_detection_4ch3').mousemove(function(e){
- detection_4ch_mousemove(e, 3, this);
- });
- $('#canvas_detection_4ch3').mouseup(function(e){
- detection_4ch_mouseup(e, 3, this);
- });
- $('#canvas_detection_4ch3').mouseleave(function(e){
- detection_4ch_mouseleave(e, 3, this);
- });
- $('#canvas_detection_4ch3').dblclick(function(e){
- detection_4ch_dblclick(e, 3, this);
- });
- }
- }
- function redraw_detection_4ch(index){
- context_detection_4ch[index].clearRect(0, 0, context_detection_4ch[index].canvas.width, context_detection_4ch[index].canvas.height); // Clears the canvas
- context_detection_4ch[index].strokeStyle = "#ffffff";
- context_detection_4ch[index].lineJoin = "round";
- context_detection_4ch[index].lineWidth = 2;
- context_detection_4ch[index].beginPath();
- context_detection_4ch[index].rect(StartX_4ch[index], StartY_4ch[index], CurrentX_4ch[index] - StartX_4ch[index], CurrentY_4ch[index] - StartY_4ch[index]);
- context_detection_4ch[index].closePath();
- context_detection_4ch[index].stroke();
- }
- function update_enable_btns()
- {
- if(document.getElementById('ShowHideDirectionBtn').disabled) {
- document.getElementById('ShowHideDirectionBtn').disabled = false ;
- }
- if(document.getElementById('LiveOrJPGBtn').disabled) {
- document.getElementById('LiveOrJPGBtn').disabled = false ;
- }
- }
- function on_show_hide_directioncam()
- {
- need_pause_ptzdrawpos = 1 ;
- if(IS_SHOW_DETECTIONCAM()) { // Hide !
- document.getElementById('ShowHideDirectionBtn').disabled = true ;
- document.getElementById('LiveOrJPGBtn').disabled = true ;
- setTimeout(update_enable_btns, 5000);
- term_directioncam();
-
- show_hide_directioncam = HIDE_DETECTIONCAM ;
-
- init_directioncam();
- init_directioncam_browser();
- setCookie('truen_show_hide_directioncam', show_hide_directioncam, 100);
- $("[name=resizedivViewTable]").css("display", "none");
- $("[name=ShowHideDirectionBtn]").text(GetLan(1067)); // Show Direction Cam
- $("[name=LiveOrJPGBtn]").css("display","none");
-
- }
- else { // Show !
- show_hide_directioncam = SHOW_DETECTIONCAM ;
- $("[name=resizedivViewTable]").css("display", "");
- document.getElementById('ShowHideDirectionBtn').disabled = true ;
- document.getElementById('LiveOrJPGBtn').disabled = true ;
- setTimeout(update_enable_btns, 10000);
- init_directioncam();
- init_directioncam_browser();
- setCookie('truen_show_hide_directioncam', show_hide_directioncam, 100);
-
- $("[name=ShowHideDirectionBtn]").text(GetLan(1068)); // Hide Direction Cam
- Show_Hide_LiveOrJPGBtn(1);
- if(IS_SHOW_IN_LIVE_DETECTIONCAM() && (trnDetectionCamPlayer[0] == PLAYER_ACTIVEX)) {
- var buf = parseInt(getCookie('truendisplaybuffer'));
- tvs_SetBuffer_DirectionCam(buf);
- }
- }
- }
- function on_live_jpg_directioncam()
- {
- need_pause_ptzdrawpos = 1 ;
- if(IS_SHOW_IN_LIVE_DETECTIONCAM()) { // JPG !
- document.getElementById('LiveOrJPGBtn').disabled = true ;
- document.getElementById('ShowHideDirectionBtn').disabled = true ;
- setTimeout(update_enable_btns, 5000);
- term_directioncam();
- live_jpg_directioncam = SHOW_IN_JPG_DETECTIONCAM ;
-
- init_directioncam();
- init_directioncam_browser();
- setCookie('truen_live_jpg_directioncam', live_jpg_directioncam, 100);
- $("[name=LiveOrJPGBtn]").text(GetLan(1069)); // View in Live
-
- if(IS_SHOW_DETECTIONCAM()) {
- $("[name=resizedivViewTable]").css("display", "");
- }
- }
- else { // LIVE !
- document.getElementById('LiveOrJPGBtn').disabled = true ;
- document.getElementById('ShowHideDirectionBtn').disabled = true ;
- setTimeout(update_enable_btns, 10000);
- live_jpg_directioncam = SHOW_IN_LIVE_DETECTIONCAM ;
- init_directioncam();
- init_directioncam_browser();
- setCookie('truen_live_jpg_directioncam', live_jpg_directioncam, 100);
- $("[name=LiveOrJPGBtn]").text(GetLan(1070)); // View in JPG
- if(IS_SHOW_DETECTIONCAM()) {
- $("[name=resizedivViewTable]").css("display", "");
- }
- if(IS_SHOW_IN_LIVE_DETECTIONCAM() && (trnDetectionCamPlayer[0] == PLAYER_ACTIVEX)) {
- var buf = parseInt(getCookie('truendisplaybuffer'));
- tvs_SetBuffer_DirectionCam(buf);
- }
- }
- }
- function term_directioncam()
- {
- if (trnDetectionCamPlayerTimerId != undefined) {
- trnDetectionCamPlayerTimerPause = 1;
- }
- for (var i = 0; i < 4; i++) {
- if(trnDetectionCamPlayer[i] == PLAYER_ACTIVEX) {
- if(SUPPORT_DETECTION_CAM_4CH == g_detection_4ch_support) {
- if(IS_SHOW_DETECTIONCAM()) {
- var index = i;
- if(IS_SHOW_IN_LIVE_DETECTIONCAM()) {
- if (player_init_completed[index]) {
- tvs_discon_detection_4ch(index);
- }
- }
- player_init_completed[index] = 0 ;
- }
- }
- }
- else if((trnDetectionCamPlayer[i] == PLAYER_CHROMEPLUGIN) || (trnDetectionCamPlayer[i] == PLAYER_WEBSOCKET) || (trnDetectionCamPlayer[i] == PLAYER_JPEGSNAP)) {
- if(SUPPORT_DETECTION_CAM_4CH == g_detection_4ch_support) {
- if(IS_SHOW_DETECTIONCAM()) {
- var index = i;
- if (IS_SHOW_IN_LIVE_DETECTIONCAM())
- {
- if (trnDetectionCamPlayer[index] == PLAYER_CHROMEPLUGIN)
- {
- if (player_init_completed[index]) {
- var vxgplayerID = 'vxgplayer_4_' + index ;
- VXGMP_term(vxgplayerID);
- }
- }
- else if (trnDetectionCamPlayer[index] == PLAYER_WEBSOCKET)
- {
- if (player_init_completed[index]) {
- var vxgwsplayerID = 'vxgwsplayer_4_' + index ;
- VXGWSMP_term(vxgwsplayerID);
- }
- }
- }
- player_init_completed[index] = 0 ;
- }
- }
- }
- else {
- ;
- }
- }
- $("[name=resizedivViewTable]").css("display", "none");
- }
- function term()
- {
- if (timerTickId != undefined) {
- clearInterval(timerTickId);
- timerTickId = undefined;
- }
- if (intervalPTZDrawPositionId != undefined) {
- clearInterval(intervalPTZDrawPositionId);
- intervalPTZDrawPositionId = undefined;
- intervalPTZDrawPositionUT = intervalPTZDrawPositionST = 0;
- }
- if (timerEventId != undefined) {
- clearInterval(timerEventId);
- timerEventId = undefined;
- }
- if (timerEvent2Id != undefined) {
- clearInterval(timerEvent2Id);
- timerEvent2Id = undefined;
- }
- if (trnPlayerTimerId != undefined) {
- trnPlayerTimerPause = 1;
- }
- if(trnPlayer == PLAYER_ACTIVEX){
- if(currentrec){
- currentrec = 0;
- tvs_recstop();
- document.formView.RecordButton.value = 'Start';
- document.getElementById('recordtime_msg').style.display = 'none';
- }
-
- if(tvs_get_keepaspectratio() == false){
- Full_Screen_Mode = 2;
- }
- else{
- Full_Screen_Mode = 1;
- }
- setCookie('truenfullscreenmode', Full_Screen_Mode, 100);
- tvs_clrvideolossosd();
- tvs_term(0);
- }
- else if(trnPlayer == PLAYER_CHROMEPLUGIN){
- if(Ccurrentrec == 1){
- Ccurrentrec = 0;
- VXGMP_RecStopPlayer('vxgplayer1');
- document.formView.CRecButton.value = 'Record Start';
- document.getElementById('recordinfo_msg').style.display = 'none';
- }
- VXGMP_term('vxgplayer1');
- }
- else if(trnPlayer == PLAYER_WEBSOCKET){
- if(Ccurrentrec == 1){
- Ccurrentrec = 0;
- VXGWSMP_RecStopPlayer('vxgwsplayer1');
- document.formView.WSRecButton.value = 'Start';
- document.getElementById('WSRecTimeMsg').style.display = 'none';
- }
- VXGWSMP_term('vxgwsplayer1');
- }
- else{
- }
- if(SUPPORT_DETECTION_CAM_4CH == g_detection_4ch_support) {
- term_directioncam();
- }
- }
- function changesize()
- {
- var rw = getwidth(currnetRes);
- var rh = getheight(currnetRes);
- var vw;
- var vh;
- if(viewsizerate < 10){
- vw = rw * 5 / 100;
- vh = rh * 5 / 100;
- }
- else{
- vw = rw * viewsizerate / 100;
- vh = rh * viewsizerate / 100;
- }
- // alert("viewsizerate :"+ viewsizerate);
-
- if(vw > minwidth) $.changeWidth(vw);
- else $.changeWidth(minwidth);
-
- $("[name=resizediv]").css("width", vw);
- $("[name=resizediv]").css("height", vh);
- if(trnPlayer == PLAYER_ACTIVEX){
- tvs_set_width(vw);
- tvs_set_height(vh);
- if(SUPPORT_DETECTION_CAM_4CH == g_detection_4ch_support) {
- if(IS_SHOW_DETECTIONCAM() && IS_SHOW_IN_LIVE_DETECTIONCAM()) {
- tvs_set_width_detection_4ch(320);
- tvs_set_height_detection_4ch(180);
- }
- }
- RedrawDzoom();
- tvs_setnewosd($("[name=VID_INFODISPID]").val(), $("[name=VID_INFODISPTIME]").val(), $("[name=VID_INFODISPPOSITION]").val(), $("[name=SYS_SYSTEMID]").val(), tvs_get_width(), tvs_get_height());
- }
- else if(trnPlayer == PLAYER_CHROMEPLUGIN){
- VXGMP_resizePlayer('vxgplayer1', Math.round(vw), Math.round(vh));
- if(started && initcanvas){
- canvas_ptz.setAttribute('width', vw);
- canvas_ptz.setAttribute('height', vh);
- }
- }
- else if(trnPlayer == PLAYER_WEBSOCKET){
- VXGWSMP_resizePlayer('vxgwsplayer1', Math.round(vw), Math.round(vh));
- $('#vxgwsplayer_audiocontroller').css("width", vw);
- if(started && initcanvas){
- canvas_ptz.setAttribute('width', vw);
- canvas_ptz.setAttribute('height', vh);
- }
- }
- else if(trnPlayer == PLAYER_JPEGSNAP){
- if($("[name=SYS_MODE]").val() != 1) {
- $("[name=img_update]").css("width", vw);
- $("[name=img_update]").css("height", vh);
- if(started && initcanvas){
- canvas_ptz.setAttribute('width', vw);
- canvas_ptz.setAttribute('height', vh);
- if(SUPPORT_DETECTION_CAM_4CH == g_detection_4ch_support) {
- for(var index = 0 ; index < 4 ; ++ index) {
- canvas_detection_4ch[index].setAttribute('width', 320);
- canvas_detection_4ch[index].setAttribute('height', 180);
- }
- }
- }
- }
- }
- }
- function setviewsize(val)
- {
- if(val != -1){
- viewsizerate = val;
- }
- setCookie('truenviewsize', viewsizerate, 100);
- changesize();
- }
- function viewsizedown()
- {
- if(viewsizerate != 0){
- viewsizerate = parseInt(viewsizerate) - 10;
- if(viewsizerate < 0){
- viewsizerate = 0;
- }
- setCookie('truenviewsize', viewsizerate, 100);
- $(".viewSize").khjSlider(viewsizerate);
- changesize();
- }
- }
- function viewsizeup()
- {
- if(viewsizerate != 100){
- viewsizerate = parseInt(viewsizerate) + 10;
- if(viewsizerate > 100){
- viewsizerate = 100;
- }
- setCookie('truenviewsize', viewsizerate, 100);
- $(".viewSize").khjSlider(viewsizerate);
- changesize();
- }
- }
- let SetBufferId = undefined;
- let SetDetCamBufferId = [ undefined, undefined, undefined, undefined ];
- function display_buff_change(val)
- {
- setCookie('truendisplaybuffer', val, 100);
- if(trnPlayer == PLAYER_ACTIVEX){
- tvs_SetBuffer(val);
- }
- else if(trnPlayer == PLAYER_CHROMEPLUGIN){
- VXGMP_SetBuffer('vxgplayer1', val);
- }
- else if(trnPlayer == PLAYER_WEBSOCKET){
- if (SetBufferId != undefined) {
- clearTimeout(SetBufferId);
- }
- SetBufferId = setTimeout(function() {
- VXGWSMP_SetBuffer('vxgwsplayer1', val);
- }, 300);
- }
- if (SUPPORT_DETECTION_CAM_4CH == g_detection_4ch_support) {
- for (var index = 0; index < 4; index++) {
- if (trnDetectionCamPlayer[index] == PLAYER_CHROMEPLUGIN) {
- var vxgplayerID = 'vxgplayer_4_' + index ;
- VXGMP_SetBuffer(vxgplayerID, val);
- }
- else if (trnDetectionCamPlayer[index] == PLAYER_WEBSOCKET) {
- if (SetDetCamBufferId[index] != undefined) {
- clearTimeout(SetDetCamBufferId[index]);
- }
- SetDetCamBufferId[index] = setTimeout(function() {
- var vxgwsplayerID = 'vxgwsplayer_4_' + index ;
- VXGWSMP_SetBuffer(vxgwsplayerID, val);
- }, 300);
- }
- }
- }
- displaybuffer = val;
- }
- function bufferdown()
- {
- if(displaybuffer != 0){
- displaybuffer = parseInt(displaybuffer) - 10;
- if(displaybuffer < 0){
- displaybuffer = 0;
- }
- setCookie('truendisplaybuffer', displaybuffer, 100);
- $(".buffering").khjSlider(displaybuffer);
- if(trnPlayer == PLAYER_ACTIVEX){
- tvs_SetBuffer(displaybuffer);
- }
- else if(trnPlayer == PLAYER_CHROMEPLUGIN){
- VXGMP_SetBuffer('vxgplayer1', displaybuffer);
- }
- else if(trnPlayer == PLAYER_WEBSOCKET){
- if (SetBufferId != undefined) {
- clearTimeout(SetBufferId);
- }
- SetBufferId = setTimeout(function() {
- VXGWSMP_SetBuffer('vxgwsplayer1', displaybuffer);
- }, 300);
- }
- for (var index = 0; index < 4; index++) {
- if (trnDetectionCamPlayer[index] == PLAYER_CHROMEPLUGIN) {
- var vxgplayerID = 'vxgplayer_4_' + index ;
- VXGMP_SetBuffer(vxgplayerID, displaybuffer);
- }
- else if (trnDetectionCamPlayer[index] == PLAYER_WEBSOCKET) {
- if (SetDetCamBufferId[index] != undefined) {
- clearTimeout(SetDetCamBufferId[index]);
- }
- SetDetCamBufferId[index] = setTimeout(function() {
- var vxgwsplayerID = 'vxgwsplayer_4_' + index ;
- VXGWSMP_SetBuffer(vxgwsplayerID, displaybuffer);
- }, 300);
- }
- }
- }
- }
- function bufferup()
- {
- if(displaybuffer != 100){
- displaybuffer = parseInt(displaybuffer) + 10;
- if(displaybuffer > 100){
- displaybuffer = 100;
- }
- setCookie('truendisplaybuffer', displaybuffer, 100);
- $(".buffering").khjSlider(displaybuffer);
- if(trnPlayer == PLAYER_ACTIVEX){
- tvs_SetBuffer(displaybuffer);
- }
- else if(trnPlayer == PLAYER_CHROMEPLUGIN){
- VXGMP_SetBuffer('vxgplayer1', displaybuffer);
- }
- else if(trnPlayer == PLAYER_WEBSOCKET){
- if (SetBufferId != undefined) {
- clearTimeout(SetBufferId);
- }
- SetBufferId = setTimeout(function() {
- VXGWSMP_SetBuffer('vxgwsplayer1', displaybuffer);
- }, 300);
- }
- for (var index = 0; index < 4; index++) {
- if (trnDetectionCamPlayer[index] == PLAYER_CHROMEPLUGIN) {
- var vxgplayerID = 'vxgplayer_4_' + index ;
- VXGMP_SetBuffer(vxgplayerID, displaybuffer);
- }
- else if (trnDetectionCamPlayer[index] == PLAYER_WEBSOCKET) {
- if (SetDetCamBufferId[index] != undefined) {
- clearTimeout(SetDetCamBufferId[index]);
- }
- SetDetCamBufferId[index] = setTimeout(function() {
- var vxgwsplayerID = 'vxgwsplayer_4_' + index ;
- VXGWSMP_SetBuffer(vxgwsplayerID, displaybuffer);
- }, 300);
- }
- }
- }
- }
-
- function on_fullscreen()
- {
- if(FSM_Once == 0){
- if(trnPlayer == PLAYER_ACTIVEX){
- if(tvs_get_keepaspectratio() == false){
- Full_Screen_Mode = 2;
- }
- else{
- Full_Screen_Mode = 1;
- }
- setCookie('truenfullscreenmode', Full_Screen_Mode, 100);
- tvs_set_fullscreen(Full_Screen_Mode);
- }
- else if(trnPlayer == PLAYER_CHROMEPLUGIN){
- VXGMP_fullscreen('vxgplayer1', Full_Screen_Mode);
- }
- else if(trnPlayer == PLAYER_WEBSOCKET){
- VXGWSMP_fullscreen('vxgwsplayer1', Full_Screen_Mode);
- }
- else{
- }
- }
- else{
- if(trnPlayer == PLAYER_ACTIVEX){
- tvs_set_fullscreen(Full_Screen_Mode);
- }
- else if(trnPlayer == PLAYER_CHROMEPLUGIN){
- VXGMP_fullscreen('vxgplayer1', Full_Screen_Mode);
- }
- else if(trnPlayer == PLAYER_WEBSOCKET){
- VXGWSMP_fullscreen('vxgwsplayer1', Full_Screen_Mode);
- }
- else{
- }
- }
- ZoomHome();
- FSM_Once = 0;
- }
- function on_snapshot()
- {
- if(trnPlayer == PLAYER_ACTIVEX){
- var today = new Date();
- var fileName = 'C:\\' + today.getFullYear();
- var val = today.getMonth() + 1;
- if (val >= 10)
- {
- fileName += val;
- }
- else
- {
- fileName += ('0' + val);
- }
-
- val = today.getDate();
- if (val >= 10)
- {
- fileName += val;
- }
- else
- {
- fileName += ('0' + val);
- }
-
- val = today.getHours();
- if (val >= 10)
- {
- fileName += val;
- }
- else
- {
- fileName += ('0' + val);
- }
-
- val = today.getMinutes();
- if (val >= 10)
- {
- fileName += val;
- }
- else
- {
- fileName += ('0' + val);
- }
-
- val = today.getSeconds();
- if (val >= 10)
- {
- fileName += val;
- }
- else
- {
- fileName += ('0' + val);
- }
- fileName += '.bmp';
- tvs_snapshot(fileName);
- }
- else if(trnPlayer == PLAYER_CHROMEPLUGIN){
- VXGMP_Snapshot('vxgplayer1');
- }
- else if(trnPlayer == PLAYER_WEBSOCKET){
- VXGWSMP_Snapshot('vxgwsplayer1');
- }
- }
- var currentrec = 0;
- function file_recstart()
- {
- if(currentrec){
- currentrec = 0;
- tvs_recstop();
- document.formView.RecordButton.value = 'Start';
- document.getElementById('recordtime_msg').style.display = 'none';
- }
- else{
- var dateName = new Date();
- var path = getCookie('truenrecordpath') + '\\' + getCookie('truenrecordfile') + '_' + location.hostname + '_' + dateName.getHours() + '_' + dateName.getMinutes() + '_' + dateName.getSeconds() + '.avi';
- if(tvs_recstart(path) == -1){
- return;
- }
- currentrec = 1;
- document.formView.RecordButton.value = 'Stop';
- document.getElementById('recordtime_msg').style.display = 'block';
- }
- }
- function file_recstop()
- {
- tvs_recstop();
- }
- function file_location()
- {
- var pathtmp = tvs_get_location(document.formView.Directory.value);
- if(pathtmp != ''){
- document.formView.Directory.value = pathtmp;
- setCookie('truenrecordpath', document.formView.Directory.value, 100);
- }
- }
- function recordfileupdate()
- {
- if (trnPlayer == PLAYER_ACTIVEX) {
- setCookie('truenrecordfile', document.formView.FileName.value, 100);
- }
- else if (trnPlayer == PLAYER_WEBSOCKET) {
- setCookie('truenrecordfile', document.formView.WSRecFileName.value, 100);
- }
- }
- function cfile_start()
- {
- if(Ccurrentrec == 1){
- Ccurrentrec = 0;
- VXGMP_RecStopPlayer('vxgplayer1');
- document.formView.CRecButton.value = 'Record Start';
- document.getElementById('recordinfo_msg').style.display = 'none';
- }
- else if(Ccurrentrec == 0){
- VXGMP_RecStartPlayer('vxgplayer1');
- Ccurrentrec = 1;
- document.formView.CRecButton.value = 'Record Stop';
- document.getElementById('recordinfo_msg').style.display = 'block';
- document.getElementById('recordfname_msg').style.display = 'block';
- }
- else if(Ccurrentrec == -1){
- $( "#dialog-warning" ).dialog( "open" );
- }
- }
- function cfile_download()
- {
- if(Ccurrentrec != 1){
- VXGMP_RecDownloadPlayer('vxgplayer1', document.formView.RecordFname.value);
- }
- }
- function cfile_browse()
- {
- if(Ccurrentrec != 1){
- VXGMP_RecBrowsePlayer('vxgplayer1');
- }
- }
- var WSRecTimerId = undefined;
- var WSRecTimeTick = -1;
- function WSRecTimer()
- {
- var recStatus = VXGWSMP_RecGetStatus('vxgwsplayer1');
- if (recStatus.recStopping != true)
- {
- var tmp = ++WSRecTimeTick;
- if (WSRecTimeTick <= 0)
- {
- document.formView.WSRecSizeData.value = 0;
- }
- else
- {
- document.formView.WSRecSizeData.value = recStatus.recData264Len + recStatus.recData711Len;
- }
- var hour = Math.floor(tmp / 3600);
- tmp %= 3600;
- var min = Math.floor(tmp / 60);
- var sec = tmp % 60;
- var WSRecTime = "";
- if (min < 10 && sec < 10) {
- WSRecTime = hour + ':0' + min + ':0' + sec + ' ';
- }
- else if(min >= 10 && sec < 10){
- WSRecTime = hour + ':' + min + ':0' + sec + ' ';
- }
- else if(min < 10 && sec >= 10){
- WSRecTime = hour + ':0' + min + ':' + sec + ' ';
- }
- else{
- WSRecTime = hour + ':' + min + ':' + sec + ' ';
- }
- var WSRecSize = "";
- var recSizeData = parseInt(document.formView.WSRecSizeData.value);
- if (recSizeData > 1000000) {
- recSizeData = recSizeData/(1024*1024);
- WSRecSize = recSizeData.toFixed(1) + 'MB';
- }
- else if (recSizeData > 1000) {
- recSizeData = recSizeData/1024;
- WSRecSize = recSizeData.toFixed(0) + 'KB';
- }
- else {
- WSRecSize = recSizeData.toFixed(0) + 'B';
- }
- document.formView.WSRecMsg.value = WSRecTime + " " + WSRecSize;
- }
- }
- function WSRec_Start()
- {
- if(Ccurrentrec == 1) {
- Ccurrentrec = 0;
- VXGWSMP_RecStopPlayer('vxgwsplayer1');
- }
- else if (Ccurrentrec == 0) {
- var tDate = new Date();
- var hh = tDate.getHours();
- var mm = tDate.getMinutes();
- var ss = tDate.getSeconds();
- if (hh < 10) hh = "0" + hh;
- if (mm < 10) mm = "0" + mm;
- if (ss < 10) ss = "0" + ss;
- var recfilename = document.formView.WSRecFileName.value + '_' + location.hostname + '_' + hh + '_' + mm + '_' + ss;
- VXGWSMP_RecStartPlayer('vxgwsplayer1', recfilename);
- Ccurrentrec = 1;
- }
- }
- simgname = new Array(null, "img_sensor1", "img_sensor2", "img_sensor3", "img_sensor4", "img_sensor5", "img_motion", "img_record", "img_shock", "img_wiper");
- simgsrc_sn = new Array(null, "/resources/img/btn_r03_SN.gif", "/resources/img/btn_r04_SN.gif", "/resources/img/btn_r05_SN.gif", "/resources/img/btn_r06_SN.gif", "/resources/img/btn_r18_SN.gif", "/resources/img/btn_r13_SN.gif", "/resources/img/btn_r14_SN.gif", "/resources/img/btn_r20_SN.gif", "/resources/img/btn_r19_SN.gif");
- simgsrc_n = new Array(null, "/resources/img/btn_r03_N.gif", "/resources/img/btn_r04_N.gif", "/resources/img/btn_r05_N.gif", "/resources/img/btn_r06_N.gif", "/resources/img/btn_r18_N.gif", "/resources/img/btn_r13_N.gif", "/resources/img/btn_r14_N.gif", "/resources/img/btn_r20_N.gif", "/resources/img/btn_r19_N.gif");
- aimgname = new Array(null, "img_alarm1", "img_alarm2", "img_alarm3", "img_alarm4", "img_capture", "img_talk", "img_speaker");
- aimgsrc_sn = new Array(null, "/resources/img/btn_r07_SN.gif", "/resources/img/btn_r08_SN.gif", "/resources/img/btn_r09_SN.gif", "/resources/img/btn_r10_SN.gif", "/resources/img/btn_r11_SN.gif", "/resources/img/btn_r12_SN.gif", "/resources/img/btn_r21_SN.png");
- aimgsrc_n = new Array(null, "/resources/img/btn_r07_N.gif", "/resources/img/btn_r08_N.gif", "/resources/img/btn_r09_N.gif", "/resources/img/btn_r10_N.gif", "/resources/img/btn_r11_N.gif", "/resources/img/btn_r12_N.gif", "/resources/img/btn_r21_N.png");
- aimgsrc_so = new Array(null, "/resources/img/btn_r07_SO.gif", "/resources/img/btn_r08_SO.gif", "/resources/img/btn_r09_SO.gif", "/resources/img/btn_r10_SO.gif", "/resources/img/btn_r11_SO.gif", "/resources/img/btn_r12_SO.gif", "/resources/img/btn_r21_SO.png");
- aimgsrc_o = new Array(null, "/resources/img/btn_r07_O.gif", "/resources/img/btn_r08_O.gif", "/resources/img/btn_r09_O.gif", "/resources/img/btn_r10_O.gif", "/resources/img/btn_r11_O.gif", "/resources/img/btn_r12_O.gif", "/resources/img/btn_r21_O.png");
- aimgsrc_sp = new Array(null, "/resources/img/btn_r07_SP.gif", "/resources/img/btn_r08_SP.gif", "/resources/img/btn_r09_SP.gif", "/resources/img/btn_r10_SP.gif", "/resources/img/btn_r11_SP.gif", "/resources/img/btn_r12_SP.gif", "/resources/img/btn_r21_SP.png");
- aimgsrc_p = new Array(null, "/resources/img/btn_r07_P.gif", "/resources/img/btn_r08_P.gif", "/resources/img/btn_r09_P.gif", "/resources/img/btn_r10_P.gif", "/resources/img/btn_r11_P.gif", "/resources/img/btn_r12_P.gif", "/resources/img/btn_r21_P.png");
- Alarm_state = new Array(null, TN_ES_OFF, TN_ES_OFF, TN_ES_OFF, TN_ES_OFF, TN_ES_OFF, TN_ES_OFF, TN_ES_OFF);
- function on_mouseover(nIndex)
- {
- if(nIndex == 6 && talk_disabled == 1) return;
- if(nIndex == 7 && trnPlayer != PLAYER_WEBSOCKET) return;
- if(Alarm_state[nIndex] != TN_ES_OFF){
- document[aimgname[nIndex]].src = aimgsrc_so[nIndex];
- }
- else{
- document[aimgname[nIndex]].src = aimgsrc_o[nIndex];
- }
- }
- function on_mousedown(nIndex)
- {
- if(nIndex == 6 && talk_disabled == 1) return;
- if(nIndex == 7 && trnPlayer != PLAYER_WEBSOCKET) return;
- if(Alarm_state[nIndex] != TN_ES_OFF) document[aimgname[nIndex]].src = aimgsrc_sp[nIndex];
- else document[aimgname[nIndex]].src = aimgsrc_p[nIndex];
-
- if(nIndex <= 4){
- if(Alarm_state[nIndex] == TN_ES_OFF){
- on_setdo(nIndex, 1);
- // tvs_setDO(nIndex, 1);
- }
- else{
- on_setdo(nIndex, 0);
- // tvs_setDO(nIndex, 0);
- }
- }
- else if(nIndex == 6){
- if(Alarm_state[nIndex] == TN_ES_OFF){
- Alarm_state[nIndex] = TN_ES_ON;
- if(trnPlayer == PLAYER_ACTIVEX) tvs_enable_talk(true);
- else if(trnPlayer == PLAYER_WEBSOCKET) VXGWSMP_StartBackwardAudio('vxgwsplayer1');
- }
- else{
- Alarm_state[nIndex] = TN_ES_OFF;
- if(trnPlayer == PLAYER_ACTIVEX) tvs_enable_talk(false);
- else if(trnPlayer == PLAYER_WEBSOCKET) VXGWSMP_StopBackwardAudio('vxgwsplayer1');
- }
- }
- else if(nIndex == 7){
- if(Alarm_state[nIndex] == TN_ES_OFF){
- Alarm_state[nIndex] = TN_ES_ON;
- if (trnPlayer == PLAYER_WEBSOCKET) vxgwsplayer_volume_mute();
- }
- else{
- Alarm_state[nIndex] = TN_ES_OFF;
- if (trnPlayer == PLAYER_WEBSOCKET) vxgwsplayer_volume_mute();
- }
- }
- }
- function on_mouseleave(nIndex)
- {
- if(nIndex == 6 && talk_disabled == 1) return;
- if(nIndex == 7 && trnPlayer != PLAYER_WEBSOCKET) return;
- if(Alarm_state[nIndex] != TN_ES_OFF) document[aimgname[nIndex]].src = aimgsrc_sn[nIndex];
- else document[aimgname[nIndex]].src = aimgsrc_n[nIndex];
- }
- function change_Accordion(index, val){
- if(started){
- if((viewaccordion & index) == 0){
- viewaccordion += index;
- }
- else{
- viewaccordion -= index;
- }
- setCookie('truenviewaccordion', viewaccordion, 100);
- }
- }
- function clicktocenter(a,b,c,d)
- {
- var x;
- var y;
- var x2;
- var y2;
- var z;
- var aa;
- var bb;
- var cc;
- var dd;
-
- if(b == 515){ // WM_LBUTTONDBLCLK
- y = (d >> 16);
- x = (d & 0xFFFF);
- aa = Math.round(x*1000 / tvs_get_width());
- bb = Math.round(y*1000 / tvs_get_height());
- z = aa*1000 + bb + 4000000;
- //alert('z='+z);
- ptz_preset_goto(ptzchannel, z);
- //alert('x='+x+' : y='+y+' : w='+tvs_get_width()+' : h='+tvs_get_height());
- }
- else if(b == 516){ // WM_RBUTTONDOWN
- ptz_preset_goto(ptzchannel, 8000000);
- }
- else if(b == 1031){ // dragzoom
- y = (c >> 16);
- x = (c & 0xFFFF);
- y2 = (d >> 16);
- x2 = (d & 0xFFFF);
- aa = Math.round(x*1000 / tvs_get_width());
- bb = Math.round(y*1000 / tvs_get_height());
- cc = Math.round(x2*1000 / tvs_get_width());
- dd = Math.round(y2*1000 / tvs_get_height());
- ptz_drag_zoom(aa, bb, cc, dd);
- //alert('x='+x+' : y='+y+' : x2='+x2+' : y2='+y2);
- }
- }
- function clicktocenter_directioncam_4_0(a,b,c,d)
- {
- var x , y , x2 , y2 , z , aa , bb , cc , dd;
-
- if(b == 515){ // WM_LBUTTONDBLCLK
- y = (d >> 16);
- x = (d & 0xFFFF);
- aa = Math.round(x*1000 / tvs_get_width_detection_4ch(0));
- bb = Math.round(y*1000 / tvs_get_height_detection_4ch(0));
-
- // console.log("x("+x+")" + " y("+y+")"+ " aa(" + aa + ")" + " bb(" + bb + ")" + " tvs_x : " +
- // tvs_get_width_detection_4ch(0) + " tvs_y : " + tvs_get_height_detection_4ch(0));
- ptz_det_clicktocenter(0 , aa, bb);
- }
- else if(b == 516){ // WM_RBUTTONDOWN
- //ptz_preset_goto(ptzchannel, 8000000);
- }
- else if(b == 1031){ // dragzoom
- y = (c >> 16);
- x = (c & 0xFFFF);
- y2 = (d >> 16);
- x2 = (d & 0xFFFF);
- aa = Math.round(x*1000 / tvs_get_width_detection_4ch(0));
- bb = Math.round(y*1000 / tvs_get_height_detection_4ch(0));
- cc = Math.round(x2*1000 / tvs_get_width_detection_4ch(0));
- dd = Math.round(y2*1000 / tvs_get_height_detection_4ch(0));
- // console.log("x("+x+")" + " y("+y+")"+ " aa(" + aa + ")" + " bb(" + bb + ")" + " cc(" + cc + ")" + " dd(" + dd + ")" + " tvs_x : " +
- // tvs_get_width_detection_4ch(0) + " tvs_y : " + tvs_get_height_detection_4ch(0));
- ptz_det_drag_zoom(0,aa,bb,cc,dd);
- }
- }
- function clicktocenter_directioncam_4_1(a,b,c,d)
- {
- var x , y , x2 , y2 , z , aa , bb , cc , dd;
- if(b == 515){ // WM_LBUTTONDBLCLK
- y = (d >> 16);
- x = (d & 0xFFFF);
- aa = Math.round(x*1000 / tvs_get_width_detection_4ch(0));
- bb = Math.round(y*1000 / tvs_get_height_detection_4ch(0));
-
- // console.log("x("+x+")" + " y("+y+")"+ " aa(" + aa + ")" + " bb(" + bb + ")" + " tvs_x : " +
- // tvs_get_width_detection_4ch(0) + " tvs_y : " + tvs_get_height_detection_4ch(0));
- ptz_det_clicktocenter(1 , aa, bb);
- }
- else if(b == 516){ // WM_RBUTTONDOWN
- //ptz_preset_goto(ptzchannel, 8000000);
- }
- else if(b == 1031){ // dragzoom
- y = (c >> 16);
- x = (c & 0xFFFF);
- y2 = (d >> 16);
- x2 = (d & 0xFFFF);
- aa = Math.round(x*1000 / tvs_get_width_detection_4ch(0));
- bb = Math.round(y*1000 / tvs_get_height_detection_4ch(0));
- cc = Math.round(x2*1000 / tvs_get_width_detection_4ch(0));
- dd = Math.round(y2*1000 / tvs_get_height_detection_4ch(0));
- ptz_det_drag_zoom(1,aa,bb,cc,dd);
- }
- }
- function clicktocenter_directioncam_4_2(a,b,c,d)
- {
- var x , y , x2 , y2 , z , aa , bb , cc , dd;
- if(b == 515){ // WM_LBUTTONDBLCLK
- y = (d >> 16);
- x = (d & 0xFFFF);
- aa = Math.round(x*1000 / tvs_get_width_detection_4ch(0));
- bb = Math.round(y*1000 / tvs_get_height_detection_4ch(0));
-
- // console.log("x("+x+")" + " y("+y+")"+ " aa(" + aa + ")" + " bb(" + bb + ")" + " tvs_x : " +
- // tvs_get_width_detection_4ch(0) + " tvs_y : " + tvs_get_height_detection_4ch(0));
- ptz_det_clicktocenter(2 , aa, bb);
- }
- else if(b == 516){ // WM_RBUTTONDOWN
- //ptz_preset_goto(ptzchannel, 8000000);
- }
- else if(b == 1031){ // dragzoom
- y = (c >> 16);
- x = (c & 0xFFFF);
- y2 = (d >> 16);
- x2 = (d & 0xFFFF);
- aa = Math.round(x*1000 / tvs_get_width_detection_4ch(0));
- bb = Math.round(y*1000 / tvs_get_height_detection_4ch(0));
- cc = Math.round(x2*1000 / tvs_get_width_detection_4ch(0));
- dd = Math.round(y2*1000 / tvs_get_height_detection_4ch(0));
- ptz_det_drag_zoom(2,aa,bb,cc,dd);
- }
- }
- function clicktocenter_directioncam_4_3(a,b,c,d)
- {
- var x , y , x2 , y2 , z , aa , bb , cc , dd;
- if(b == 515){ // WM_LBUTTONDBLCLK
- y = (d >> 16);
- x = (d & 0xFFFF);
- aa = Math.round(x*1000 / tvs_get_width_detection_4ch(0));
- bb = Math.round(y*1000 / tvs_get_height_detection_4ch(0));
-
- // console.log("x("+x+")" + " y("+y+")"+ " aa(" + aa + ")" + " bb(" + bb + ")" + " tvs_x : " +
- // tvs_get_width_detection_4ch(0) + " tvs_y : " + tvs_get_height_detection_4ch(0));
- ptz_det_clicktocenter(3 , aa, bb);
- }
- else if(b == 516){ // WM_RBUTTONDOWN
- //ptz_preset_goto(ptzchannel, 8000000);
- }
- else if(b == 1031){ // dragzoom
- y = (c >> 16);
- x = (c & 0xFFFF);
- y2 = (d >> 16);
- x2 = (d & 0xFFFF);
- aa = Math.round(x*1000 / tvs_get_width_detection_4ch(0));
- bb = Math.round(y*1000 / tvs_get_height_detection_4ch(0));
- cc = Math.round(x2*1000 / tvs_get_width_detection_4ch(0));
- dd = Math.round(y2*1000 / tvs_get_height_detection_4ch(0));
- ptz_det_drag_zoom(3,aa,bb,cc,dd);
- }
- }
- document.onkeydown = on_keydown;
- document.onkeyup = on_keyup;
- var Alt_pressed = false;
- function on_keyup()
- {
- if (event.keyCode == 18) // Alt
- {
- Alt_pressed = false;
- }
- }
- function on_keydown()
- {
- if (event.keyCode == 18) // Alt
- {
- Alt_pressed = true;
- }
-
- if (event.keyCode == 112) // F1
- {
- if(Alt_pressed == true){
- if(trnPlayer == PLAYER_ACTIVEX) tvs_StatShowTrigger();
- }
- }
- if(trnPlayer == PLAYER_CHROMEPLUGIN){
- if (event.keyCode == 116) // F5
- {
- if(Alt_pressed == true){
- if(Full_Screen_Mode == 1){
- Full_Screen_Mode = 2;
- }
- else{
- Full_Screen_Mode = 1;
- }
- setCookie('truenfullscreenmode', Full_Screen_Mode, 100);
- VXGMP_aspectRatioMode('vxgplayer1', Full_Screen_Mode);
- }
- }
- }
- else if(trnPlayer == PLAYER_WEBSOCKET){
- if (event.keyCode == 116) // F5
- {
- if(Alt_pressed == true){
- if(Full_Screen_Mode == 1){
- Full_Screen_Mode = 2;
- }
- else{
- Full_Screen_Mode = 1;
- }
- setCookie('truenfullscreenmode', Full_Screen_Mode, 100);
- VXGWSMP_aspectRatioMode('vxgwsplayer1', Full_Screen_Mode);
- }
- }
- }
- }
- let timerEventId = undefined;
- function __cb_timerEvent(rate)
- {
- for(nIndex = 1; nIndex <= 5; nIndex++){
- if(rate["GIS_SENSOR" + nIndex] == 1){
- if (document[simgname[nIndex]].src.indexOf(simgsrc_sn[nIndex]) == -1) {
- document[simgname[nIndex]].src = simgsrc_sn[nIndex];
- }
- }
- else{
- if (document[simgname[nIndex]].src.indexOf(simgsrc_n[nIndex]) == -1) {
- document[simgname[nIndex]].src = simgsrc_n[nIndex];
- }
- }
- }
-
- for(nIndex = 1; nIndex <= 4; nIndex++){
- if(rate["GIS_ALARM" + nIndex] == 1){
- if (document[aimgname[nIndex]].src.indexOf(aimgsrc_sn[nIndex]) == -1) {
- document[aimgname[nIndex]].src = aimgsrc_sn[nIndex];
- }
- Alarm_state[nIndex] = 1;
- }
- else{
- if (document[aimgname[nIndex]].src.indexOf(aimgsrc_n[nIndex]) == -1) {
- document[aimgname[nIndex]].src = aimgsrc_n[nIndex];
- }
- Alarm_state[nIndex] = 0;
- }
- }
-
- nIndex = ptzchannel;
- if(rate["GIS_MOTION" + nIndex] == 1){
- if (document[simgname[6]].src.indexOf(simgsrc_sn[6]) == -1) {
- document[simgname[6]].src = simgsrc_sn[6];
- }
- }
- else{
- if (document[simgname[6]].src.indexOf(simgsrc_n[6]) == -1) {
- document[simgname[6]].src = simgsrc_n[6];
- }
- }
-
- nIndex = ptzchannel;
- if(rate["GIS_VIDEOLOSS" + nIndex] == 1){
- }
- else{
- }
-
- if(rate["GIS_RECORD1"] == 1){
- if (document[simgname[7]].src.indexOf(simgsrc_sn[7]) == -1) {
- document[simgname[7]].src = simgsrc_sn[7];
- }
- }
- else if(rate["GIS_RECORD1"] == 0){
- if (document[simgname[7]].src.indexOf(simgsrc_n[7]) == -1) {
- document[simgname[7]].src = simgsrc_n[7];
- }
- }
- else{
- if (document[simgname[7]].src.indexOf("/resources/img/btn_r15_N.gif") == -1) {
- document[simgname[7]].src = "/resources/img/btn_r15_N.gif";
- }
- }
-
- if(airwiper == 3 || airwiper == 4){
- if(rate["GIS_AIRWIPER"] == 0){
- if (document[simgname[9]].src.indexOf(simgsrc_sn[9]) == -1) {
- document[simgname[9]].src = simgsrc_sn[9];
- }
- }
- else if(rate["GIS_AIRWIPER"] == 1){
- if (document[simgname[9]].src.indexOf(simgsrc_n[9]) == -1) {
- document[simgname[9]].src = simgsrc_n[9];
- }
- }
- }
-
- if(trnPlayer == PLAYER_JPEGSNAP){
- cRes = parseInt(readSetupByKey(resolutionAPIString));
- if(currnetRes != cRes){
- currnetRes = cRes;
- setviewsize(-1);
- }
- }
- }
- function timerEvent()
- {
- readInputStateAsync(__cb_timerEvent);
- }
- let timerEvent2Id = undefined;
- function __cb_timerEvent2(rate)
- {
- if(airwiper == 3 || airwiper == 4){
- if(rate["GIS_AIRWIPER"] == 0){
- if (document[simgname[9]].src.indexOf(simgsrc_sn[9]) == -1) {
- document[simgname[9]].src = simgsrc_sn[9];
- }
- }
- else if(rate["GIS_AIRWIPER"] == 1){
- if (document[simgname[9]].src.indexOf(simgsrc_n[9]) == -1) {
- document[simgname[9]].src = simgsrc_n[9];
- }
- }
- }
- }
- function timerEvent2()
- {
- readInputStateAsync(__cb_timerEvent2);
- }
- function ApplyDirect2(item)
- {
- value = $("[name=" + item + "]").val();
- writeSetupAsync(item + "=" + value);
- }
- function BCScontrol(item, param)
- {
- var value;
- var min;
- var max;
- var diff;
- if(item == 0){
- value = parseInt($("[name=SYS_CUR_BRIGHTNESS]").val());
- min = parseInt($("[name=SYS_MIN_BRIGHTNESS]").val());
- max = parseInt($("[name=SYS_MAX_BRIGHTNESS]").val());
- }
- else if(item == 1){
- value = parseInt($("[name=SYS_CUR_SATURATION]").val());
- min = parseInt($("[name=SYS_MIN_SATURATION]").val());
- max = parseInt($("[name=SYS_MAX_SATURATION]").val());
- }
- else if(item == 2){
- value = parseInt($("[name=SYS_CUR_SHARPNESS]").val());
- min = parseInt($("[name=SYS_MIN_SHARPNESS]").val());
- max = parseInt($("[name=SYS_MAX_SHARPNESS]").val());
- }
- diff = Math.round((max-min) / 25);
- if(diff == 0){
- diff = 1;
- }
- if(param == 0){
- value = value - diff;
- if(value < min) value = min;
- }
- else{
- value = value + diff;
- if(value > max) value = max;
- }
-
- if(item == 0){
- $("[name=SYS_CUR_BRIGHTNESS]").val(value);
- ApplyDirect2("SYS_CUR_BRIGHTNESS");
- }
- else if(item == 1){
- $("[name=SYS_CUR_SATURATION]").val(value);
- ApplyDirect2("SYS_CUR_SATURATION");
- }
- else if(item == 2){
- $("[name=SYS_CUR_SHARPNESS]").val(value);
- ApplyDirect2("SYS_CUR_SHARPNESS");
- }
- }
- function BCScontrol_Default(item)
- {
- var value;
- if (item == 0)
- {
- value = parseInt(readSetupByKey("SYS_DEFAULT_BRIGHTNESS"));
- $("[name=SYS_CUR_BRIGHTNESS]").val(value);
- ApplyDirect2("SYS_CUR_BRIGHTNESS");
- }
- }
- function TDNControl(param)
- {
- var boardid = $("[name=SYS_BOARDID]").val();
- var isipcam = $("[name=SYS_ISIPCAM]").val();
- var module_type = $("[name=SYS_MODULE_TYPE]").val();
- var schedule = parseInt(readSetupByKey("SYS_CUR_CAM_SCHEDULE"));
- var imagegeneral = '';
- var message = '';
- var cam = '';
- if (schedule == 1)
- {
- cam = 'CA1_';
- }
- else if (schedule == 2)
- {
- cam = 'CA2_';
- }
- else if (schedule == 3)
- {
- cam = 'CA3_';
- }
- else
- {
- cam = 'CAM_';
- }
- if (boardid == 0x1003 || boardid == 0x1007)
- {
- // TODO:
- }
- else if (boardid == 0xB001)
- {
- // TODO:
- }
- else
- {
- if (isipcam == 0)
- {
- // TODO:
- }
- else {
- if (module_type == HI_ISP_MODULE)
- {
- imagegeneral = '_hi';
- }
- else if (module_type == HI3519_ISP_MODULE)
- {
- imagegeneral = '_hi';
- }
- else if (module_type == HI3519A_ISP_MODULE)
- {
- imagegeneral = '_hi';
- }
- else if (module_type == CV2_ISP_MODULE)
- {
- imagegeneral = '_cv2';
- }
- else
- {
- // TODO:
- }
- }
- }
- if (imagegeneral == '')
- {
- return;
- }
- else if (imagegeneral == '_hi' ||
- imagegeneral == '_cv2')
- {
- var mode;
- if (param == 'day') {
- mode = 2;
- }
- else if (param == 'night') {
- mode = 3;
- }
- else if (param == 'auto') {
- mode = 0;
- }
- else {
- return;
- }
- message = cam + 'HI_TDN_MODE=' + mode;
- writeSetup(message);
- }
- }
- function change_sleepmode(item)
- {
- value = $("#" + item.id).val();
- writeSetupAsync(item.id + "=" + value);
- on_videoselect_clicked(); // view init
- }
- function change_pelletmode(item)
- {
- value = $("#" + item.id).val();
- writeSetupAsync(item.id + "=" + value);
- if(value == 1){
- writeSetupAsync("CAM_HI_DEFOG_MODE=1&CAM_HI_AE_MODE=2&CA1_HI_DEFOG_MODE=1&CA1_HI_AE_MODE=2&CA2_HI_DEFOG_MODE=1&CA2_HI_AE_MODE=2&CA3_HI_DEFOG_MODE=1&CA3_HI_AE_MODE=2&CAM_HI_DEFOG_AUTOSTRENGTH=255&CA1_HI_DEFOG_AUTOSTRENGTH=255&CA2_HI_DEFOG_AUTOSTRENGTH=255&CA3_HI_DEFOG_AUTOSTRENGTH=255");
- }
- else{
- writeSetupAsync("CAM_HI_DEFOG_MODE=0&CA1_HI_DEFOG_MODE=0&CA2_HI_DEFOG_MODE=0&CA3_HI_DEFOG_MODE=0&CAM_HI_DEFOG_AUTOSTRENGTH=64&CA1_HI_DEFOG_AUTOSTRENGTH=64&CA2_HI_DEFOG_AUTOSTRENGTH=64&CA3_HI_DEFOG_AUTOSTRENGTH=64");
- }
-
- on_videoselect_clicked();
- }
- //-->
- </script>
- </head>
- <body onload="init()" onunload="term()" ondragstart="return false;" onselectstart="return false;">
- <script language="JavaScript" type="text/javascript">
- function ServerEventAction(lChID, eEventType, nIndex, eEventStatus, vData) {
- //alert("test : " + eEventType);
- switch (eEventType)
- {
- case TN_ET_DI:
- if (eEventStatus) document[simgname[nIndex]].src = simgsrc_sn[nIndex];
- else document[simgname[nIndex]].src = simgsrc_n[nIndex];
- break;
- case TN_ET_DO:
- if(nIndex > 0){
- if (eEventStatus) document[aimgname[nIndex]].src = aimgsrc_sn[nIndex];
- else document[aimgname[nIndex]].src = aimgsrc_n[nIndex];
- }
- Alarm_state[nIndex] = eEventStatus;
- break;
- case TN_ET_MOTION:
- if (eEventStatus) document[simgname[6]].src = simgsrc_sn[6];
- else document[simgname[6]].src = simgsrc_n[6];
- break;
- case TN_ET_RECORD:
- if (eEventStatus == 1) document[simgname[7]].src = simgsrc_sn[7];
- else if (eEventStatus == 0) document[simgname[7]].src = simgsrc_n[7];
- else document[simgname[7]].src = "/resources/img/btn_r15_N.gif";
- // alert("eEventStatus = " + eEventStatus);
- break;
- case TN_ET_VIDEOLOSS:
- if (eEventStatus)
- {
- tvs_clrvideolossosd();
- }
- else
- {
- var rcVL = new Array(tvs_get_width() / 2 - 60, tvs_get_height() / 2 - 30, tvs_get_width() / 2 + 80, tvs_get_height() / 2 + 30);
- tvs_setvideolossosd(rcVL[0], rcVL[1], rcVL[2], rcVL[3]);
- }
- break;
- case TN_ET_RESOLUTION:
- currnetRes = vData;
- setviewsize(-1);
- break;
- }
- }
- function OnServerEvent(lChID, eEventType, nIndex, eEventStatus, vData)
- {
- ServerEventAction(lChID, eEventType, nIndex, eEventStatus, vData);
- }
- function ChannelNotifyAction(a)
- {
- if (($("[name=SYS_PTZ_TYPE]").val() == '7') || (isSemocon == 1) || (($("[name=PTZ_ExtPTZUse]").val() == '1') && ($("[name=PTZ_ExtPTZDragandZoom]").val() == '1'))) {
- if(a & 0x00000001){ // TN_CS_CONNECTED
- tvs_set_motion_region_edit2(7, 9);
- }
- }
- }
- function ChannelNotifyAction_DetectionCam(channel, a)
- {
- if (($("[name=SYS_PTZ_TYPE]").val() == '7') || (isSemocon == 1) || (($("[name=PTZ_ExtPTZUse]").val() == '1') && ($("[name=PTZ_ExtPTZDragandZoom]").val() == '1'))) {
- if(a & 0x00000001){ // TN_CS_CONNECTED
- tvs_set_motion_region_edit2_detection_cam(channel , 7, 9);
- }
- }
- }
- function OnChannelNotify(a, b)
- {
- ChannelNotifyAction(b);
- ChannelNotifyAction_DetectionCam(0,b);
- ChannelNotifyAction_DetectionCam(1,b);
- ChannelNotifyAction_DetectionCam(2,b);
- ChannelNotifyAction_DetectionCam(3,b);
- }
- function FileRecordNotifyAction(time, size)
- {
- var hour = Math.floor(time/3600);
- var min = Math.floor((time%3600)/60);
- var sec = (time%60);
- if(min < 10 && sec < 10){
- document.formView.RecordTime.value = hour + ':0' + min + ':0' + sec + ' ';
- }
- else if(min >= 10 && sec < 10){
- document.formView.RecordTime.value = hour + ':' + min + ':0' + sec + ' ';
- }
- else if(min < 10 && sec >= 10){
- document.formView.RecordTime.value = hour + ':0' + min + ':' + sec + ' ';
- }
- else{
- document.formView.RecordTime.value = hour + ':' + min + ':' + sec + ' ';
- }
- document.formView.RecordSizeData.value = size;
- var sizek =parseInt(document.formView.RecordSizeData.value);
- if(sizek > 1000000){
- var calsize = sizek/(1024*1024);
- document.formView.RecordSize.value = calsize.toFixed(1) + 'MB';
- }
- else if(sizek > 1000){
- var calsize = sizek/1024;
- document.formView.RecordSize.value = calsize.toFixed(0) + 'KB';
- }
- else{
- document.formView.RecordSize.value =sizek + 'B';
- }
- }
- function OnFileRecordNotify(a, b, c, d, e)
- {
- FileRecordNotifyAction(d, e);
- }
- function MouseEventAction(a, b, c, d)
- {
- if (($("[name=SYS_PTZ_TYPE]").val() == '7') || (isSemocon == 1) || (($("[name=PTZ_ExtPTZUse]").val() == '1') && ($("[name=PTZ_ExtPTZCentering]").val() == '1')))
- clicktocenter(a, b, c, d);
- }
- function OnMouseEvent(a, b, c, d)
- {
- MouseEventAction(a, b, c, d);
- MouseEventAction_DetectionCam_4_0(a, b, c, d);
- MouseEventAction_DetectionCam_4_1(a, b, c, d);
- MouseEventAction_DetectionCam_4_2(a, b, c, d);
- MouseEventAction_DetectionCam_4_3(a, b, c, d);
- }
- function MouseEventAction_DetectionCam_4_0(a, b, c, d)
- {
- if (($("[name=SYS_PTZ_TYPE]").val() == '7') || (isSemocon == 1) || (($("[name=PTZ_ExtPTZUse]").val() == '1') && ($("[name=PTZ_ExtPTZCentering]").val() == '1'))) {
- clicktocenter_directioncam_4_0(a, b, c, d);
- }
- }
- function MouseEventAction_DetectionCam_4_1(a, b, c, d)
- {
- if (($("[name=SYS_PTZ_TYPE]").val() == '7') || (isSemocon == 1) || (($("[name=PTZ_ExtPTZUse]").val() == '1') && ($("[name=PTZ_ExtPTZCentering]").val() == '1'))) {
- clicktocenter_directioncam_4_1(a, b, c, d);
- }
- }
- function MouseEventAction_DetectionCam_4_2(a, b, c, d)
- {
- if (($("[name=SYS_PTZ_TYPE]").val() == '7') || (isSemocon == 1) || (($("[name=PTZ_ExtPTZUse]").val() == '1') && ($("[name=PTZ_ExtPTZCentering]").val() == '1'))) {
- clicktocenter_directioncam_4_2(a, b, c, d);
- }
- }
- function MouseEventAction_DetectionCam_4_3(a, b, c, d)
- {
- if (($("[name=SYS_PTZ_TYPE]").val() == '7') || (isSemocon == 1) || (($("[name=PTZ_ExtPTZUse]").val() == '1') && ($("[name=PTZ_ExtPTZCentering]").val() == '1'))) {
- clicktocenter_directioncam_4_3(a, b, c, d);
- }
- }
- </script>
- <script for="Tvs" event="OnServerEvent()" language="JavaScript">
- <!--
- ServerEventAction(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4]);
- //-->
- </script>
- <script for="Tvs" event="OnFileRecordNotify()" language="JavaScript">
- <!--
- FileRecordNotifyAction(arguments[3], arguments[4]);
- //-->
- </script>
- <script for="Tvs" event="OnChannelNotify()" language="JavaScript">
- <!--
- ChannelNotifyAction(arguments[1]);
- //-->
- </script>
- <script for="Tvs4_0" event="OnChannelNotify()" language="JavaScript">
- <!--
- ChannelNotifyAction_DetectionCam(0,arguments[1]);
- //-->
- </script>
- <script for="Tvs4_1" event="OnChannelNotify()" language="JavaScript">
- <!--
- ChannelNotifyAction_DetectionCam(1,arguments[1]);
- //-->
- </script>
- <script for="Tvs4_2" event="OnChannelNotify()" language="JavaScript">
- <!--
- ChannelNotifyAction_DetectionCam(2,arguments[1]);
- //-->
- </script>
- <script for="Tvs4_3" event="OnChannelNotify()" language="JavaScript">
- <!--
- ChannelNotifyAction_DetectionCam(3,arguments[1]);
- //-->
- </script>
- <script for="Tvs" event="OnMouseEvent();" language="JavaScript">
- <!--
- MouseEventAction(arguments[0], arguments[1], arguments[2], arguments[3]);
- //-->
- </script>
- <script for="Tvs4_0" event="OnMouseEvent();" language="JavaScript">
- <!--
- MouseEventAction_DetectionCam_4_0(arguments[0], arguments[1], arguments[2], arguments[3]);
- //-->
- </script>
- <script for="Tvs4_1" event="OnMouseEvent();" language="JavaScript">
- <!--
- MouseEventAction_DetectionCam_4_1(arguments[0], arguments[1], arguments[2], arguments[3]);
- //-->
- </script>
- <script for="Tvs4_2" event="OnMouseEvent();" language="JavaScript">
- <!--
- MouseEventAction_DetectionCam_4_2(arguments[0], arguments[1], arguments[2], arguments[3]);
- //-->
- </script>
- <script for="Tvs4_3" event="OnMouseEvent();" language="JavaScript">
- <!--
- MouseEventAction_DetectionCam_4_3(arguments[0], arguments[1], arguments[2], arguments[3]);
- //-->
- </script>
- <form id="formView" name="formView">
- <div id="dialog-warning" style="display:none;" title="Warning">
- <div class="txtWrap">
- <div class="txtInner">
- <div class="txt">
- <div class="menubox">
- <ul>
- <li>
- <span>No free space.</span>
- </li>
- <li>
- <span>Visit 'chrome://settings/cookies#cont'</span>
- </li>
- <li>
- <span>and remove 'File system' cache. </span>
- </li>
- </ul>
- <span>
- <button type="button" class="btn_pos" style="right: 6px;" onclick="on_dialog_close()"><span class="LAN_023"></span></button>
- </span>
- </div>
- <div class="menuspace">
- </div>
- </div>
- </div>
- </div>
- </div>
- <div id="dialog-warning2" style="display:none;" title="Warning">
- <div class="txtWrap">
- <div class="txtInner">
- <div class="txt">
- <div class="menubox">
- <ul>
- <li>
- <span class="LAN_1022"></span>
- </li>
- </ul>
- <span>
- <button type="button" class="btn_pos" style="width: 200px; right: 446px;" onclick="on_dialog2_move()"><span class="LAN_1023"></span></button>
- <button type="button" class="btn_pos" style="width: 200px; right: 226px;" onclick="on_dialog2_later()"><span class="LAN_1024"></span></button>
- <button type="button" class="btn_pos" style="width: 200px; right: 6px;" onclick="on_dialog2_never()"><span class="LAN_1025"></span></button>
- </span>
- </div>
- <div class="menuspace">
- </div>
- </div>
- </div>
- </div>
- </div>
- <div id="wrap" class="wrapWidth">
- <div class="header">
- <div class="headerBox">
- <div id="logoarea"></div>
- <div id="logoarea1"></div>
- <a href="/manager/videoinformation.html" class="pageLink">Setup</a>
- <a href="/logout.html" class="logoutLink" id="logout" style="display:none;">Logout</a>
- </div>
- </div>
- <div class="contentWrap">
- <div class="content">
- <div class="controller">
- <ul>
- <div id="logoarea2" style="display:none;">
- </div>
- <li class="group sleepmode" name = "li_sleepmode" style="display:none;">
- <p class="head"><span>Sleep Mode</span></p>
- <div class="body">
- <select name="SYS_SLEEPMODE" id="SYS_SLEEPMODE" style="width:140px; font-size:12px; font-family: Arial, Helvetica, sans-serif;" onchange="change_sleepmode(this);">
- <option value=0>Wake-up</option>
- <option value=1>Sleep</option>
- </select>
- </div>
- </li>
- <li class="group pelletmode" name = "li_pelletmode" style="display:none;">
- <p class="head"><span>Pellet Enhancement</span></p>
- <div class="body">
- <select name="ETC_PELLETMODE" id="ETC_PELLETMODE" style="width:140px; font-size:12px; font-family: Arial, Helvetica, sans-serif;" onchange="change_pelletmode(this);">
- <option value=0>Disable</option>
- <option value=1>Enable</option>
- </select>
- </div>
- </li>
- <li class="group camerasel" name = "li_camerasel" style="display:none;">
- <p class="head"><span class="LAN_1094"></span></p>
- <div class="body">
- <select name="camerasel" id="camerasel" style="width:140px; font-size:12px; font-family: Arial, Helvetica, sans-serif;" onchange="on_cameraselect_clicked();">
- <option value=0>PTZ</option>
- <option value=1>Direction</option>
- </select>
- </div>
- </li>
- <li class="group video" name = "li_videosel">
- <p class="head"><span class="LAN_393"></span></p>
-
- <div class="body">
- <select name="videosel" id="videosel" style="width:140px; font-size:12px; font-family: Arial, Helvetica, sans-serif;" onchange="on_videoselect_clicked();">
- </select>
- </div>
- </li>
- <li class="group image" name="group_image">
- <p class="head" >
- <span class="LAN_690"></span>
- <img src="/resources/img/btn02_N.gif" id="image_accordion_button" onclick="change_Accordion(16, this);"/>
- </p>
-
- <div class="body">
- <div id="div_image1">
- <center>
- <table cellpadding=0 cellspacing=0 border=0 width=150 height=110 >
- <tr><td colspan=4 height=5></td></tr>
- <tr>
- <td width=30 height=30 align="left"><img src="/resources/img/btn_r16_N.gif" class="btn down" onMouseDown="BCScontrol(0, 0)"/></td>
- <td width=65 height=30 align="center"><span class="LAN_057"></span></td>
- <td width=25 height=30 align="center"><input name="SYS_CUR_BRIGHTNESS" type="text" class="no_outline" style="text-align:center;" readonly="true"></td>
- <td width=30 height=30 align="right"><img src="/resources/img/btn_r17_N.gif" class="btn down" onMouseDown="BCScontrol(0, 1)"/></td>
- </tr>
- <tr><td colspan=4 height=5></td></tr>
- <tr>
- <td width=30 height=30 align="left"><img src="/resources/img/btn_r16_N.gif" class="btn down" onMouseDown="BCScontrol(1, 0)"/></td>
- <td width=65 height=30 align="center"><span class="LAN_060"></span></td>
- <td width=25 height=30 align="center"><input name="SYS_CUR_SATURATION" id="SYS_CUR_SATURATION" type="text" class="no_outline" style="text-align:center;" readonly="true"/></td>
- <td width=30 height=30 align="right"><img src="/resources/img/btn_r17_N.gif" class="btn down" onMouseDown="BCScontrol(1, 1)"/></td>
- </tr>
- <tr><td colspan=4 height=5></td></tr>
- <tr>
- <td width=30 height=30 align="left"><img src="/resources/img/btn_r16_N.gif" class="btn down" onMouseDown="BCScontrol(2, 0)"/></td>
- <td width=65 height=30 align="center"><span class="LAN_486"></span></td>
- <td width=25 height=30 align="center"><input name="SYS_CUR_SHARPNESS" id="SYS_CUR_SHARPNESS" type="text" class="no_outline" style="text-align:center;" readonly="true"/></td>
- <td width=30 height=30 align="right"><img src="/resources/img/btn_r17_N.gif" class="btn down" onMouseDown="BCScontrol(2, 1)"/></td>
- </tr>
- <tr><td colspan=4 height=5></td></tr>
- </table>
- </center>
- </div>
- <div id="div_image2" style="display:none;">
- <center>
- <table cellpadding=0 cellspacing=0 border=0 width=150 height=40 >
- <tr><td colspan=3 height=5></td></tr>
- <tr>
- <td width=50 height=30><img src="/resources/img/btn104_N.png" class="btn" onMouseUp="TDNControl('day')"/></td>
- <td width=50 height=30><img src="/resources/img/btn105_N.png" class="btn" onMouseUp="TDNControl('night')"/></td>
- <td width=50 height=30><img src="/resources/img/btn103_N.png" class="btn" onMouseUp="TDNControl('auto')"/></td>
- </tr>
- <tr><td colspan=3 height=2></td></tr>
- </table>
- <img src="/resources/img/groupLine.gif"/>
- <table cellpadding=0 cellspacing=0 border=0 width=150 height=40 >
- <tr><td colspan=4 height=5></td></tr>
- <tr>
- <td width=30 height=30 align="left"><img src="/resources/img/btn_r16_N.gif" class="btn down" onMouseDown="BCScontrol(0, 0)"/></td>
- <td width=65 height=30 align="center"><span>Gain</span></td>
- <td width=25 height=30 align="center"><input name="SYS_CUR_BRIGHTNESS" type="text" class="no_outline" style="text-align:center; font-size:13px;" readonly="true"/></td>
- <td width=30 height=30 align="right"><img src="/resources/img/btn_r17_N.gif" class="btn down" onMouseDown="BCScontrol(0, 1)"/></td>
- </tr>
- <tr><td colspan=4 height=5></td></tr>
- <tr>
- <td colspan=4 align="center">
- <button type="button" class="btn_pos" onclick="BCScontrol_Default(0)"><span>Default</span></button>
- </td>
- </tr>
- <tr><td colspan=4 height=5></td></tr>
- </table>
- </center>
- </div>
- </div>
- </li>
- <li class="group digital" name="group_digital">
- <p class="head" >
- <span class="LAN_254"></span>
- <img src="/resources/img/btn02_N.gif" id="digital_accordion_button" onclick="change_Accordion(1, this);"/>
- </p>
-
- <div class="body">
- <div>
- <center>
- <table cellpadding=0 cellspacing=0 border=0 width=150 height=130 >
- <tr>
- <td width=25 height=25 align="left"><img name="digitalzoom_leftup" class="btn" src="/resources/img/btn10_N.gif" onMouseUp="ButtonLeftUp()"/></td>
- <td width=100 height=25 align="center"><img name="digitalzoom_up" class="btn" src="/resources/img/btn03_N.gif" onMouseUp="ButtonUp()"/></td>
- <td width=25 height=25 align="right"><img name="digitalzoom_rightup" class="btn" src="/resources/img/btn04_N.gif" onMouseUp="ButtonRightUp()"/></td>
- </tr>
- <tr>
- <td width=25 height=80 align="left"><img name="digitalzoom_left" class="btn" src="/resources/img/btn09_N.gif" onMouseUp="ButtonLeft()"/></td>
- <td valign=top align=left width=100 height=80 onClick='clickTable();' background='/resources/img/digitalBg.jpg'>
- <div style="position:relative;width:100px;height:80px;border:0px solid #000000;background-image: url(/resources/img/100_80.jpg);" id='remote'
- onMouseOver='onLayerSet(true);' onMouseOut='onLayerSet(false);' onClick='clickLayer();'>
- </div>
- </td>
- <td width=25 height=80 align="right"><img name="digitalzoom_right" class="btn" src="/resources/img/btn05_N.gif" onMouseUp="ButtonRight()"/></td>
- </tr>
- <tr>
- <td width=25 height=25 align="left"><img name="digitalzoom_leftdown" class="btn" src="/resources/img/btn08_N.gif" onMouseUp="ButtonLeftDown()"/></td>
- <td width=100 height=25 align="center"><img name="digitalzoom_down" class="btn" src="/resources/img/btn07_N.gif" onMouseUp="ButtonDown()"/></td>
- <td width=25 height=25 align="right"><img name="digitalzoom_rightdown" class="btn" src="/resources/img/btn06_N.gif" onMouseUp="ButtonRightDown()"/></td>
- </tr>
- </table>
- </center>
- </div>
-
- <ul class="btnWrap">
- <li><img src="/resources/img/btn11_N.gif" class="btn" id="btn1" onMouseUp="ZoomIn()"/></li>
- <li><img src="/resources/img/btn12_N.gif" class="btn" onMouseUp="ZoomOut()"/></li>
- <li><img src="/resources/img/btn13_N.gif" class="btn" onMouseUp="ZoomHome()"/></li>
- </ul>
- </div>
- </li>
- <li class="group camera" name="group_camera">
- <div class="head">
- <div id="panel_title"></div>
- <img src="/resources/img/btn02_N.gif" id="ptz_accordion_button" onclick="change_Accordion(2, this);"/>
- </div>
- <div class="body">
- <center>
- <div style="height:5px;" id="panel_title_below"></div>
- <div style="width:150px;" id="div_ptz_panel_drag">
- <div id="containment-wrapper" style="width:150px; height:150px; border-radius:75px; background-color:Black; background-image: url(/resources/img/cameraBg_02.jpg);">
- <div id="draggable3" class="draggable ui-widget-content" style="width:18px; height:21px; background-color:Transparent; background-image: url(/resources/img/b_01.png); border: 0px; left:66px; top:66px;">
-
- </div>
- </div>
- </div>
- <div id="div_ptz_panel_button" style="width:150px; display:none;">
- <table style="width:100%;">
- <tr>
- <td>
- <img style="width:100%;" src="/resources/img/btn83_N.png" class="btn" onMouseDown="ptz_pt(ptzchannel, -49, -49)" onMouseUp="ptz_pt(ptzchannel, 0, 0)" onMouseOut="ptz_pt(ptzchannel, 0, 0)"/>
- </td>
- <td>
- <img style="width:100%;" src="/resources/img/btn84_N.png" class="btn" onMouseDown="ptz_pt(ptzchannel, 0, -49)" onMouseUp="ptz_pt(ptzchannel, 0, 0)" onMouseOut="ptz_pt(ptzchannel, 0, 0)"/>
- </td>
- <td>
- <img style="width:100%;" src="/resources/img/btn85_N.png" class="btn" onMouseDown="ptz_pt(ptzchannel, 49, -49)" onMouseUp="ptz_pt(ptzchannel, 0, 0)" onMouseOut="ptz_pt(ptzchannel, 0, 0)"/>
- </td>
- </tr>
- <tr>
- <td>
- <img style="width:100%;" src="/resources/img/btn86_N.png" class="btn" onMouseDown="ptz_pt(ptzchannel, -49, 0)" onMouseUp="ptz_pt(ptzchannel, 0, 0)" onMouseOut="ptz_pt(ptzchannel, 0, 0)"/>
- </td>
- <td>
- <img style="width:100%;" src="/resources/img/btn87_N.png" class="btn" onMouseDown="ptz_pt(ptzchannel, 0, 0)" onMouseUp="ptz_pt(ptzchannel, 0, 0)" onMouseOut="ptz_pt(ptzchannel, 0, 0)"/>
- </td>
- <td>
- <img style="width:100%;" src="/resources/img/btn88_N.png" class="btn" onMouseDown="ptz_pt(ptzchannel, 49, 0)" onMouseUp="ptz_pt(ptzchannel, 0, 0)" onMouseOut="ptz_pt(ptzchannel, 0, 0)"/>
- </td>
- </tr>
- <tr>
- <td>
- <img style="width:100%;" src="/resources/img/btn89_N.png" class="btn" onMouseDown="ptz_pt(ptzchannel, -49, 49)" onMouseUp="ptz_pt(ptzchannel, 0, 0)" onMouseOut="ptz_pt(ptzchannel, 0, 0)"/>
- </td>
- <td>
- <img style="width:100%;" src="/resources/img/btn90_N.png" class="btn" onMouseDown="ptz_pt(ptzchannel, 0, 49)" onMouseUp="ptz_pt(ptzchannel, 0, 0)" onMouseOut="ptz_pt(ptzchannel, 0, 0)"/>
- </td>
- <td>
- <img style="width:100%;" src="/resources/img/btn91_N.png" class="btn" onMouseDown="ptz_pt(ptzchannel, 49, 49)" onMouseUp="ptz_pt(ptzchannel, 0, 0)" onMouseOut="ptz_pt(ptzchannel, 0, 0)"/>
- </td>
- </tr>
- </table>
- </div>
- </center>
- <ul class="btnWrap2" id="ptzbuttongroup_0">
- <li>
- <img src="/resources/img/btn11_N.gif" class="btn" onMouseDown="ptz_begin_local('zoom_in')" onMouseUp="ptz_end(0)" onMouseOut="ptz_end(0)"/>
- </li>
- <li>
- <img src="/resources/img/btn12_N.gif" class="btn" onMouseDown="ptz_begin_local('zoom_out')" onMouseUp="ptz_end(0)" onMouseOut="ptz_end(0)"/>
- </li>
- <li>
- <img src="/resources/img/btn13_N.gif" class="btn" onMouseDown="ptz_zoomhome()"/>
- </li>
- <li>
- <img src="/resources/img/btn15_N.gif" class="btn" onMouseDown="ptz_begin_local('focus_near')" onMouseUp="ptz_end(0)" onMouseOut="ptz_end(0)"/>
- </li>
- <li>
- <img src="/resources/img/btn16_N.gif" class="btn" onMouseDown="ptz_begin_local('focus_far')" onMouseUp="ptz_end(0)" onMouseOut="ptz_end(0)"/>
- </li>
- <li>
- <img src="/resources/img/btn17_N.gif" class="btn" onMouseDown="ptz_cmd_local('focus_auto')"/>
- </li>
- </ul>
- <ul class="btnWrap oneBtn" id="ptzbuttongroup_1">
- <li>
- <img src="/resources/img/btn60_N.gif" class="btn" onMouseDown="ptz_cmd_local('iris_close')"/>
- </li>
- <li>
- <img src="/resources/img/btn61_N.gif" class="btn" onMouseDown="ptz_cmd_local('iris_open')"/>
- </li>
- <li>
- <img src="/resources/img/btn62_N.gif" class="btn" onMouseDown="ptz_cmd_local('iris_auto')"/>
- </li>
- </ul>
- <ul class="btnWrap oneBtn" id="ptzbuttongroup_2">
- <li>
- <img src="/resources/img/btn63_N.gif" class="btn" onMouseDown="ptz_cmd_local('menu_on')"/>
- </li>
- <li>
- <img src="/resources/img/btn64_N.gif" class="btn" onMouseDown="ptz_cmd_local('menu_enter')"/>
- </li>
- <li>
- <img src="/resources/img/btn65_N.gif" class="btn" onMouseDown="ptz_cmd_local('menu_esc')"/>
- </li>
- </ul>
- <ul class="btnWrap oneBtn" id="ptzbuttongroup_3">
- <li>
- <img src="/resources/img/btn59_N.gif" class="btn" onMouseDown="ptz_cmd_local('home')"/>
- </li>
- <li>
- <img src="/resources/img/btn68_N.gif" class="btn" onMouseDown="ptz_cmd_local('none')"/>
- </li>
- <li>
- <img src="/resources/img/btn69_N.gif" class="btn" onMouseDown="ptz_cmd_local('none')"/>
- </li>
- </ul>
- <ul class="btnWrap oneBtn" id="ptzbuttongroup_4">
- <li>
- <img src="/resources/img/BTN_B_n.png"/>
- </li>
- <li>
- <img src="/resources/img/btn67_N.gif" class="btn" onMouseDown="ptz_cmd_local('onepushwb')"/>
- </li>
- <li>
- <img src="/resources/img/BTN_B_n.png"/>
- </li>
- </ul>
- <ul class="btnWrap oneBtn" id="ptzbuttongroup_5" style="display:none;">
- <li>
- <img src="/resources/img/btn69_N.gif" class="btn" onMouseDown="on_wiper()"/>
- </li>
- <li>
- <img src="/resources/img/btn72_N.png" class="btn" onMouseDown="on_defug()"/>
- </li>
- <li>
- <img src="/resources/img/btn71_N.png" class="btn" onMouseDown="on_irpower()"/>
- </li>
- </ul>
- <ul class="btnWrap oneBtn" id="ptzbuttongroup_6">
- <li>
- <img src="/resources/img/BTN_B_n.png"/>
- </li>
- <li>
- <img src="/resources/img/btn69_N.gif" class="btn" onMouseDown="ptz_general_command(0x1A)" onMouseUp="ptz_general_command(0x1B)" onMouseOut="ptz_general_command(0x1B)"/>
- </li>
- <li>
- <img src="/resources/img/BTN_B_n.png"/>
- </li>
- </ul>
- <ul class="btnWrap oneBtn" id="ptzbuttongroup_7">
- <li>
- <img src="/resources/img/btn69_N.gif" class="btn" onMouseDown="ptz_p7_wiper(1)" onMouseUp="ptz_p7_wiper(0)" onMouseOut="ptz_p7_wiper(0)"/>
- </li>
- <li>
- <div class="preset" style="padding: 0px 0px 3px 0px;">
- <select name="WiperTime" id="WiperTime" style="width:102px; height: 20px; font-size:12px; font-family: Arial, Helvetica, sans-serif;">
- <option value="0" selected="true">No duration</option>
- <option value="1">1h duration</option>
- <option value="2">2h duration</option>
- <option value="3">3h duration</option>
- </select>
- </div>
- </li>
- </ul>
- <ul class="btnWrap oneBtn" id="ptzbuttongroup_8" style="display:none;">
- <li>
- <img src="/resources/img/btn59_N.gif" class="btn" onMouseDown="ptz_preset_goto(1,1);"/>
- </li>
- <li>
- <img src="/resources/img/btn81_N.png" class="btn" onMouseDown="on_reboot();" />
- </li>
- <li name="li_reset_zoom_module">
- <img src="/resources/img/btn82_N.png" class="btn" onMouseDown="on_reset_zoom_module();" />
- </li>
- </ul>
-
- <center><img src="/resources/img/groupLine.gif"/></center>
-
- <ul class="btnWrap2" id="semocon_irmove_buttons" style="padding-top:7px; display:none;">
- <li>
- <img src="/resources/img/btn73_N.png" class="btn" onMouseDown="ptz_begin_semocon_ir_local('bright', '255')" onMouseUp="ptz_end_semocon_ir()" onMouseOut="ptz_end_semocon_ir()"/>
- </li>
- <li style="padding-left:1px;">
- <img src="/resources/img/btn74_N.png" class="btn" onMouseDown="ptz_begin_semocon_ir_local('dark', '255')" onMouseUp="ptz_end_semocon_ir()" onMouseOut="ptz_end_semocon_ir()"/>
- </li>
- <li>
- <img src="/resources/img/btn75_N.png" class="btn" onMouseDown="ptz_begin_semocon_ir_local('wide', '255')" onMouseUp="ptz_end_semocon_ir()" onMouseOut="ptz_end_semocon_ir()"/>
- </li>
- <li style="padding-left:1px;">
- <img src="/resources/img/btn76_N.png" class="btn" onMouseDown="ptz_begin_semocon_ir_local('narrow', '255')" onMouseUp="ptz_end_semocon_ir()" onMouseOut="ptz_end_semocon_ir()"/>
- </li>
- </ul>
- <div class="preset">
- <select name="preset_select" id="preset_select" style="width:140px; font-size:12px; font-family: Arial, Helvetica, sans-serif;">
- </select>
- </div>
- <div class="preset" id="after_action_group" style="padding: 0 0 7px 10px; display:none;">
- <select name="after_action_select" id="after_action_select" style="width:140px; font-size:12px; font-family: Arial, Helvetica, sans-serif;">
- <option value="0" selected="selected">Off</option>
- <option value="1">Track</option>
- <option value="2">Auto Run</option>
- <option value="3">IR</option>
- </select>
- </div>
- <ul class="btnWrap freesetBtn">
- <li>
- <img src="/resources/img/btn19_N.gif" class="btn" onMouseDown="on_preset_goto()"/>
- </li>
- <li>
- <img src="/resources/img/btn20_N.gif" class="btn" onMouseDown="on_preset_set()"/>
- </li>
- <li>
- <img src="/resources/img/btn21_N.gif" class="btn" onMouseDown="on_preset_clear()"/>
- </li>
- </ul>
- <center><img src="/resources/img/groupLine.gif"/></center>
-
- <div class="preset">
- <select name="list_select" id="list_select" style="width:140px; font-size:12px; font-family: Arial, Helvetica, sans-serif;">
- <option value="0" selected="true" class="LAN_326"></option>
- <option value="1">List-1</option>
- <option value="2">List-2</option>
- <option value="3">List-3</option>
- <option value="4">List-4</option>
- <option value="5">List-5</option>
- <option value="6">List-6</option>
- <option value="7">List-7</option>
- <option value="8">List-8</option>
- </select>
- </div>
-
- <ul class="btnWrap itemBtn" id="presetbuttongroup_1">
- <li>
- <img src="/resources/img/btn22_N.gif" class="btn" name="PatternButton" onMouseDown="on_pattern_goto()"/>
- </li>
- <li>
- <img src="/resources/img/btn23_N.gif" class="btn" name="SwingButton" onMouseDown="on_swing_goto()"/>
- </li>
- <li>
- <img src="/resources/img/btn24_N.gif" class="btn" name="GroupButton" onMouseDown="on_group_goto()"/>
- </li>
- </ul>
- <ul class="btnWrap itemBtn" id="presetbuttongroup_2" style="display:none;">
- <li>
- <img src="/resources/img/btn22_N.gif" class="btn" name="PatternButton" onMouseDown="on_pattern_goto()"/>
- </li>
- <li>
- <img src="/resources/img/btn24_N.gif" class="btn" name="GroupButton" onMouseDown="on_group_goto()"/>
- </li>
- <li>
- <img src="/resources/img/BTN_B_n.png"/>
- </li>
- </ul>
- <div style="height:5px;" id="trackingbuttonline">
- <center><img src="/resources/img/groupLine.gif"/></center>
- </div>
- <div class="btnWrap3" id="trackingbuttongroup">
- <img src="/resources/img/btn77_N.png" class="btn" id="TrackingButton" onMouseDown="ptz_preset_goto(1,660);"/>
- <img src="/resources/img/btn78_N.png" class="btn" id="ACWButton" onMouseDown="ptz_preset_goto(1,661);"/>
- </div>
- <div style="height:5px;" id="autopanline">
- <center><img src="/resources/img/groupLine.gif"/></center>
- </div>
- <div class="btnWrap3" id="autopanbuttongroup">
- <img src="/resources/img/btn79_N.png" class="btn" id="Autopan_Start" onMouseDown="ptz_general_command(0x13);"/>
- <img src="/resources/img/btn80_N.png" class="btn" id="Autopan_Stop" onMouseDown="ptz_general_command(0x14);"/>
- </div>
- </div>
- </li>
- <li class="group file" name="group_file">
- <p class="head">
- <span class="LAN_501"></span>
- <img src="/resources/img/btn02_N.gif" id="rec_accordion_button" onclick="change_Accordion(4, this);"/>
- </p>
- <div class="body">
- <center>
- <table border="0" cellpadding="0" cellspacing="0" style="font-size:12px;">
- <tr style="height:5px;"><td colspan="3"></td></tr>
- <tr>
- <td><span class="LAN_646"></span></td>
- <td><input name="Directory" type="text" value="" style="width:50px;" align="right" maxlength="60" readonly="true"/></td>
- <td align="right"><input style="width:42px;font-size:12px;" type="button" name="LocationSet" value="Set" onclick="file_location()" /></td>
- </tr>
- <tr style="height:5px;"><td colspan="3"></td></tr>
- <tr>
- <td><span class="LAN_647"></span></td>
- <td><input name="FileName" type="text" value="" style="width:50px;" align="right" maxlength="60" onChange="recordfileupdate()"/></td>
- <td align="right"><input style="width:42px;font-size:12px;" type="button" name="RecordButton" value="Start" onclick="file_recstart()" /></td>
- </tr>
- <tr style="height:5px;"><td colspan="3"></td></tr>
- </table>
- <table border="0" cellpadding="0" cellspacing="0" style="font-size:12px;">
- <tr id="recordtime_msg" style="display:none">
- <td><input type="text" name="RecordTime" id="RecordTime" class="no_outline" style="width:60px;" readonly="true" />
- <input type="hidden" name="RecordSizeData" id="RecordSizeData" class="no_outline" readonly="true" />
- <input type="text" name="RecordSize" id="RecordSize" class="no_outline" style="width:60px;" align="right" readonly="true" /></td>
- </tr>
- <tr style="height:5px;"></tr>
- </table>
- </center>
- </div>
- </li>
- <li class="group file" name="group_file2">
- <p class="head">
- <span class="LAN_501"></span>
- <img src="/resources/img/btn02_N.gif" id="rec2_accordion_button" onclick="change_Accordion(8, this);"/>
- </p>
- <div class="body">
- <center>
- <table border="0" cellpadding="0" cellspacing="0" style="font-size:12px;">
- <tr style="height:5px;"><td></td></tr>
- <tr>
- <td align="center"><input style="width:100px;font-size:12px;" type="button" name="CRecButton" value="Record Start" onclick="cfile_start()" /></td>
- </tr>
- <tr style="height:5px;"><td></td></tr>
- <tr id="recordinfo_msg" style="display:none">
- <td align="center"><input type="text" style="color:Red;width:150px;font-size:10px;" name="RecordInfo" id="RecordInfo" class="no_outline" readonly="true" /></td>
- </tr>
- <tr id="recordfname_msg" style="display:none">
- <td align="center"><input type="text" style="width:150px;font-size:10px;" name="RecordFname" id="RecordFname" class="no_outline" readonly="true" /></td>
- </tr>
- <tr style="height:5px;"><td></td></tr>
- <tr>
- <td align="center"><input style="width:100px;font-size:12px;" type="button" name="CDownButton" value="Download" onclick="cfile_download()" /></td>
- </tr>
- <tr style="height:5px;"><td></td></tr>
- <tr>
- <td align="center"><input style="width:100px;font-size:12px;" type="button" name="CBrowseButton" value="Browse" onclick="cfile_browse()" /></td>
- </tr>
- <tr style="height:5px;"></tr>
- </table>
- </center>
- </div>
- </li>
- <li class="group file" name="group_file3">
- <p class="head">
- <span class="LAN_501"></span>
- <img src="/resources/img/btn02_N.gif" id="wsrec_accordion_button" onclick="change_Accordion(64, this);"/>
- </p>
- <div class="body">
- <center>
- <table border="0" cellpadding="0" cellspacing="0" style="font-size:12px;">
- <tr style="height:5px;"><td colspan="3"></td></tr>
- <tr>
- <td><span class="LAN_647"></span></td>
- <td><input name="WSRecFileName" type="text" value="" style="width:50px;" align="right" maxlength="60" onChange="recordfileupdate()"/></td>
- <td align="right"><input style="width:42px;font-size:12px;" type="button" name="WSRecButton" value="Start" onclick="WSRec_Start();" /></td>
- </tr>
- <tr style="height:5px;"><td colspan="3"></td></tr>
- </table>
- <table border="0" cellpadding="0" cellspacing="0" style="font-size:12px;">
- <tr id="WSRecTimeMsg" style="display:none">
- <td>
- <input type="text" name="WSRecMsg" id="WSRecMsg" class="no_outline" style="width: 120px;" readonly="true"/>
- <input type="hidden" name="WSRecSizeData" id="WSRecSizeData" class="no_outline" readonly="true" />
- </td>
- </tr>
- <tr style="height:5px;"></tr>
- </table>
- </center>
- </div>
- </li>
- <li class="group" name="group_canon">
- <p class="head">
- <span class="Canon_control">Canon Control</span>
- <img src="/resources/img/btn02_N.gif" id="canon_accordion_button" onclick="change_Accordion(32, this);"/>
- </p>
- <div class="body">
- <ul id="canonbuttongroup1" style="padding:5px 0 10px 4px; height:17px;">
- <li style="float:left; padding:0 3px 3px 0;">
- <img src="/resources/img/btn98_N.png" class="btn" onMouseDown="ptz_general_command(0x1D)"/>
- </li>
- <li style="float:right; padding:0 3px 3px 0;">
- <img src="/resources/img/btn95_N.png" class="btn" onMouseDown="ptz_general_command(0x4B)"/>
- </li>
- </ul>
- <ul id="canonbuttongroup2" style="height:17px; padding:0 0 0 4px;">
- <center>
- <li style="padding:3px 3px 3px 0;">
- <img src="/resources/img/btn100_N.png" class="btn" onMouseDown="ptz_general_command(0x60)"/>
- </li>
- </center>
- </ul>
- <ul id="canonbottongroup3" style="height:10px; padding:10px 0 10px 4px;">
- <li style="float:left; padding-right:3px;">
- <img src="/resources/img/btn97_N.png" class="btn" onMouseDown="ptz_general_command(0x63)"/>
- </li>
- <li style="float:left; padding-right:3px;">
- <img src="/resources/img/btn20_N.gif" class="btn" onMouseDown="ptz_general_command(0x1F)"/>
- </li>
- <li style="float:left; padding-right:3px;">
- <img src="/resources/img/btn99_N.png" class="btn" onMouseDown="ptz_general_command(0x62)"/>
- </li>
- </ul>
- <ul id="canonbottongroup4" style="height:17px; padding:0 0 20px 4px;">
- <center>
- <li style="padding:3px 3px 3px 0;">
- <img src="/resources/img/btn96_N.png" class="btn" onMouseDown="ptz_general_command(0x61)"/>
- </li>
- </center>
- </ul>
- <ul id="canonbuttongroup5" style="height:20px; padding:0 0 4px 4px;">
- <li style="float:left; padding-right:3px;">
- <img src="/resources/img/btn92_N.png" class="btn" onMouseDown="ptz_general_command(0x4C)"/>
- </li>
- <li style="float:left; padding-right:3px;">
- <img src="/resources/img/btn93_N.png" class="btn" onMouseDown="ptz_general_command(0x4D)"/>
- </li>
- <li style="float:left; padding-right:3px;">
- <img src="/resources/img/btn94_N.png" class="btn" onMouseDown="ptz_general_command(0x4F)"/>
- </li>
- </ul>
- </div>
- </li>
- </ul>
- </div>
- <div class="viewWrap viewWidth">
- <div class="option viewWidth">
- <div class="viewSize" name="LAN_683" title="" >
- <span class="txt" id="viewSizeSlider">50</span>
- <img src="/resources/img/btn_r00_N.gif" class="btn down" onMouseUp="viewsizedown()" title="" id="id_view_smaller"/>
- <div class="slider">
- <div class="sliderBg">
- <div class="sliderFull">Slider Full</div>
- <img src="/resources/img/sliderBall_N.png" class="ball" title="" id="id_view_resize" />
- </div>
- </div>
- <img src="/resources/img/btn_r01_N.gif" class="btn up" onMouseUp="viewsizeup()" title="" id="id_view_larger"/>
- </div>
- <ul class="btnList">
- <li><img src="/resources/img/btn_r02_N.gif" title="" id="id_fullscreen" name="LAN_684" title="" class="btn" onMouseDown="on_fullscreen()"/></li>
- <li name="li_motionline"><img src="/resources/img/optionLine.gif"/></li>
- <li name="li_motion"><div name="LAN_039" title="" ><img name="img_motion" src="/resources/img/btn_r13_N.gif" title="" id="id_motion"/></div></li>
- <li name="li_sensorline"><img src="/resources/img/optionLine.gif"/></li>
- <li name="li_sensor1"><div name="LAN_154" title="" ><img name="img_sensor1" src="/resources/img/btn_r03_N.gif" title="" id="id_sensor1"/></div></li>
- <li name="li_sensor2"><div name="LAN_154" title="" ><img name="img_sensor2" src="/resources/img/btn_r04_N.gif" title="" id="id_sensor2"/></div></li>
- <li name="li_sensor3"><div name="LAN_154" title="" ><img name="img_sensor3" src="/resources/img/btn_r05_N.gif" title="" id="id_sensor3"/></div></li>
- <li name="li_sensor4"><div name="LAN_154" title="" ><img name="img_sensor4" src="/resources/img/btn_r06_N.gif" title="" id="id_sensor4"/></div></li>
- <li name="li_sensor5"><div name="LAN_154" title="" ><img name="img_sensor5" src="/resources/img/btn_r18_N.gif" title="" id="id_sensor5"/></div></li>
- <li name="li_alarmline"><img src="/resources/img/optionLine.gif"/></li>
- <li name="li_alarm1"><div name="LAN_162" title="" ><img name="img_alarm1" src="/resources/img/btn_r07_N.gif" title="" id="id_alarm1" onMouseOver="on_mouseover(1)" onMouseDown="on_mousedown(1)" onMouseUp="on_mouseover(1)" onMouseLeave="on_mouseleave(1)"/></div></li>
- <li name="li_alarm2"><div name="LAN_162" title="" ><img name="img_alarm2" src="/resources/img/btn_r08_N.gif" title="" id="id_alarm2" onMouseOver="on_mouseover(2)" onMouseDown="on_mousedown(2)" onMouseUp="on_mouseover(2)" onMouseLeave="on_mouseleave(2)"/></div></li>
- <li name="li_alarm3"><div name="LAN_162" title="" ><img name="img_alarm3" src="/resources/img/btn_r09_N.gif" title="" id="id_alarm3" onMouseOver="on_mouseover(3)" onMouseDown="on_mousedown(3)" onMouseUp="on_mouseover(3)" onMouseLeave="on_mouseleave(3)"/></div></li>
- <li name="li_alarm4"><div name="LAN_162" title="" ><img name="img_alarm4" src="/resources/img/btn_r10_N.gif" title="" id="id_alarm4" onMouseOver="on_mouseover(4)" onMouseDown="on_mousedown(4)" onMouseUp="on_mouseover(4)" onMouseLeave="on_mouseleave(4)"/></div></li>
- <li><img src="/resources/img/optionLine.gif"/></li>
- <li><div name="LAN_248" title="" ><img src="/resources/img/btn_r11_N.gif" id="id_snapshot" class="btn" onMouseDown="on_snapshot()" title=""/></div></li>
- <li name="li_talkline"><img src="/resources/img/optionLine.gif"/></li>
- <li name="li_talk"><div name="LAN_249" title="" ><img name="img_talk" src="/resources/img/btn_r12_N.gif" id="id_talk" class="btn" onMouseOver="on_mouseover(6)" onMouseDown="on_mousedown(6)" onMouseUp="on_mouseover(6)" onMouseLeave="on_mouseleave(6)" title=""/></div></li>
- <li name="li_speaker"><div title=""><img name="img_speaker" src="/resources/img/btn_r21_N.png" id="id_speaker" class="btn" onMouseOver="on_mouseover(7)" onMouseDown="on_mousedown(7)" onMouseUp="on_mouseover(7)" onMouseLeave="on_mouseleave(7)" title=""/></div></li>
- <li name="li_optionline"><img src="/resources/img/optionLine.gif"/></li>
- <li name="li_record"><div name="LAN_321" title="" ><img name="img_record" src="/resources/img/btn_r14_N.gif" title="" id="id_record"/></div></li>
- <li name="li_shock"><div name="LAN_321" title="" ><img name="img_shock" src="/resources/img/btn_r20_N.gif" title="" id="id_shock"/></div></li>
- <li name="li_wiper"><div name="LAN_321" title="" ><img name="img_wiper" src="/resources/img/btn_r19_N.gif" title="" id="id_wiper"/></div></li>
- </ul>
- <div class="buffering" name="LAN_685" id="id_buffering" title="">
- <span class="txt" id="bufferingSlider">50</span>
- <img src="/resources/img/btn_r16_N.gif" class="btn down" onMouseDown="bufferdown()" title="" id="id_buffer_down"/>
- <div class="slider">
- <div class="sliderBg">
- <div class="sliderFull">Slider Full</div>
- <img src="/resources/img/sliderBall_N.png" class="ball" title="" id="id_buffer_resize"/>
- </div>
- </div>
- <img src="/resources/img/btn_r17_N.gif" class="btn up" onMouseDown="bufferup()" title="" id="id_buffer_up"/>
- </div>
- </div>
- <center>
- <div style="position:relative" name="resizediv">
- <div style="position:absolute" class="view" id="viewobject">
- <!-- <object classid="CLSID:DD01C8CA-5DA0-4b01-9603-B7194E561D32" name="Tvs" width="720" height="405" codebase="/rel/webViewer.cab#Version=1,6,54,470"></object> //-->
- </div>
- <div style="position:relative; z-index: 1" id="canvasDiv" oncontextmenu="return false;"></div>
- </div> <!-- resizediv -->
- <div id="vxgwsplayer_audiocontroller" style="width: 960px; display: none;">
- <div class="vxgwsplayer-controls" style="position: relative">
- <div id="vxgwsplayer_vol" style="width: 21px; height: 21px; margin-top: 7px; margin-left: 10px; cursor: pointer; float: left; display: inline-block; background: url(/resources/img/vol_mute.png); background-size: contain;" onclick="vxgwsplayer_volume_mute();"></div>
- </div>
- </div>
- </center>
- <div class="viewWrap directionCam viewWidth" style="width:1400px; height:220px; margin-bottom:20px">
- <div class="view_detection_table" style="position:relative; " name="resizedivViewTable">
- <div id="detection_table">
- <table width="100%" border="0" cellspacing="0" cellpadding="0">
- <tbody><tr>
- <!-- <td id="detection_cam4_0" style="width:25%"><div style="position:relative" class="view" id="viewobjectArray4_0"></div></td>
- <td id="detection_cam4_1" style="width:25%"><div style="position:relative" class="view" id="viewobjectArray4_1"></div></td>
- <td id="detection_cam4_2" style="width:25%"><div style="position:relative" class="view" id="viewobjectArray4_2"></div></td>
- <td id="detection_cam4_3" style="width:25%"><div style="position:relative" class="view" id="viewobjectArray4_3"></div></td> -->
- <td id="detection_cam4_0" style="width:320px; height:180px;">
- <div style="position:absolute;left:0px;top:15px; z-index: 0" class="view" id="viewobjectArray4_0"></div>
- <div style="position:absolute;left:0px;top:15px; z-index: 1" id="canvasDiv_PTZPosCam0" oncontextmenu="return false;"></div>
- <div style="position:absolute;left:0px;top:15px; z-index: 2" id="canvasDiv_DetectionCam0" oncontextmenu="return false;"></div>
- </td>
- <td id="detection_cam4_1" style="width:320px; height:180px;">
- <div style="position:absolute;left:330px;top:15px; z-index: 0" class="view" id="viewobjectArray4_1"></div>
- <div style="position:absolute;left:330px;top:15px; z-index: 1" id="canvasDiv_PTZPosCam1" oncontextmenu="return false;"></div>
- <div style="position:absolute;left:330px;top:15px; z-index: 2" id="canvasDiv_DetectionCam1" oncontextmenu="return false;"></div>
- </td>
- <td id="detection_cam4_2" style="width:320px; height:180px;">
- <div style="position:absolute;left:660px;top:15px; z-index: 0" class="view" id="viewobjectArray4_2"></div>
- <div style="position:absolute;left:660px;top:15px; z-index: 1" id="canvasDiv_PTZPosCam2" oncontextmenu="return false;"></div>
- <div style="position:absolute;left:660px;top:15px; z-index: 2" id="canvasDiv_DetectionCam2" oncontextmenu="return false;"></div>
- </td>
- <td id="detection_cam4_3" style="width:320px; height:180px;">
- <div style="position:absolute;left:990px;top:15px; z-index: 0" class="view" id="viewobjectArray4_3"></div>
- <div style="position:absolute;left:990px;top:15px; z-index: 1" id="canvasDiv_PTZPosCam3" oncontextmenu="return false;"></div>
- <div style="position:absolute;left:990px;top:15px; z-index: 2" id="canvasDiv_DetectionCam3" oncontextmenu="return false;"></div>
- </td>
- </tr>
- </tbody></table>
- </div>
- </div>
- <div class="view_detection_table" style="position:relative; margin-top:20px" name="ShowHidBtns" id="ShowHidBtns">
- <span >
- <button type="button" name="ShowHideDirectionBtn" id="ShowHideDirectionBtn" class="btn_pos" style="width: 200px; right: 446px; display:none;" onclick="on_show_hide_directioncam()"><span class="LAN_1068"></span></button>
- <button type="button" name="LiveOrJPGBtn" id="LiveOrJPGBtn" class="btn_pos" style="width: 200px; right: 446px; display:none;" onclick="on_live_jpg_directioncam()"><span class="LAN_1070"></span></button>
- </span>
- </div>
- <div class="view_detection_table" style="position:relative; margin-top:20px; display:none " name="DetectionCamInit_Warning" id="DetectionCamInit_Warning">
- <span class="underLine1 LAN_1071" style="color:Red; "></span>
- <a id="GoDetectionCam" href="/manager/systemdirectioncamera.html">
- <button type="button" name="BtnGoDetectionCam" id="BtnGoDetectionCam" class="btn_pos" style="width: 200px; right: 446px; display:none;" ><span class="LAN_1060"></span></button>
- </a>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div style="display:none">
- <input type="text" name="SYS_MODE"></input>
- <input type="text" name="SYS_BOARDID"></input>
- <input type="text" name="SYS_ISIPCAM"></input>
- <input type="text" name="CAM_SONY_PALFLAG"></input>
- <input type="text" name="SYS_MODULE_DETAIL"></input>
- <input type="text" name="SYS_MODULE_TYPE"></input>
- <input type="text" name="SYS_PTZ_TYPE"></input>
- <input type="text" name="VID_INFODISPID"></input>
- <input type="text" name="VID_INFODISPTIME"></input>
- <input type="text" name="VID_INFODISPPOSITION"></input>
- <input type="text" name="SYS_SYSTEMID"></input>
-
- <input type="text" name="PTZ_ExtPTZUse"></input>
- <input type="text" name="PTZ_ExtPTZCentering"></input>
- <input type="text" name="PTZ_ExtPTZDragandZoom"></input>
-
- <input type="text" name="SYS_MIN_BRIGHTNESS"></input>
- <input type="text" name="SYS_MAX_BRIGHTNESS"></input>
- <input type="text" name="SYS_MIN_SHARPNESS"></input>
- <input type="text" name="SYS_MAX_SHARPNESS"></input>
- <input type="text" name="SYS_MIN_SATURATION"></input>
- <input type="text" name="SYS_MAX_SATURATION"></input>
- </div>
- <div id="presetlabel" style="display:none">
- </div>
-
- </form>
- </body>
- </html>
|