/******************************************************************************* * @copyright Copyright (c) 2018 Hanwha Techwin Co., Ltd. * @license Licensed to the Hanwha Techwin Software Foundation under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * Total Plugin-Free Web Browser Viewer Framework * http://www.hanwhatechwin.com * * Security Solution Development Division / Web Software Development Team * * @summary Summary: ump-player * @description Description: UMP Framework 3.2.0 * @file ump-player_20-04-2022 22.38.38.js * @version 3.2.0 * @since 20-04-2022 * @author by Youngho Kim (young.ho.kim@hanwha.com), * by Yongsoo Ko (yongsoo.ko@hanwha.com), * by Miju Park (miju462.park@hanwha.com), * by Sweungwon Cheung (sw.cheung@hanwha.com), * by Jongchan Park (jden.park@hanwha.com), * by Changehee Song (changh.song@hanwha.com), */ /******************************************************************************* * @copyright Copyright (c) 2018 Hanwha Techwin Co., Ltd. * @license Licensed to the Hanwha Techwin Software Foundation under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * Total Plugin-Free Web Browser Viewer Framework * http://www.hanwhatechwin.com * * Security Solution Development Division / Web Software Development Team * * @summary Summary: ump-player * @description Description: UMP Framework 3.2.0 * @file ump-player_20-04-2022.js * @version 3.2.0 * @since 20-04-2022 * @author by Youngho Kim (young.ho.kim@hanwha.com), * by Yongsoo Ko (yongsoo.ko@hanwha.com), * by Miju Park (miju462.park@hanwha.com), * by Sweungwon Cheung (sw.cheung@hanwha.com), * by Jongchan Park (jden.park@hanwha.com), * by Changehee Song (changh.song@hanwha.com), */ 'use strict';var _0x3ec3a3=_0x38b6;(function(_0x28f0a0,_0xe2c2de){var _0x940b91=_0x38b6,_0x33b2b7=_0x28f0a0();while(!![]){try{var _0x7970ad=parseInt(_0x940b91(0x205))/0x1*(parseInt(_0x940b91(0x23d))/0x2)+-parseInt(_0x940b91(0x20f))/0x3*(parseInt(_0x940b91(0x1f9))/0x4)+-parseInt(_0x940b91(0x21b))/0x5+parseInt(_0x940b91(0x227))/0x6*(-parseInt(_0x940b91(0x23b))/0x7)+parseInt(_0x940b91(0x247))/0x8*(-parseInt(_0x940b91(0x229))/0x9)+-parseInt(_0x940b91(0x1ee))/0xa+parseInt(_0x940b91(0x250))/0xb;if(_0x7970ad===_0xe2c2de)break;else _0x33b2b7['push'](_0x33b2b7['shift']());}catch(_0xec50fa){_0x33b2b7['push'](_0x33b2b7['shift']());}}}(_0x32de,0x45a7a));function fromHex(_0x4fafea){return parseInt(_0x4fafea,0x10);}function toDateFormat(_0x2fe8cb,_0x463218){var _0x4aef98=_0x38b6;return(void 0x0!==_0x463218[_0x4aef98(0x241)]&&null!==_0x463218['timezone']?new Date(new Date(0x3e8*_0x463218[_0x4aef98(0x21d)]+_0x463218[_0x4aef98(0x244)])[_0x4aef98(0x255)]()+0xea60*_0x463218['timezone']):new Date(new Date(0x3e8*_0x463218[_0x4aef98(0x21d)]+_0x463218[_0x4aef98(0x244)])[_0x4aef98(0x255)]()))[_0x4aef98(0x228)]();}function inheritObject(_0x18ba2b,_0x70e42b){var _0x270160=_0x38b6;for(var _0x234145=Object['keys'](_0x70e42b),_0x6d1f48=0x0;_0x6d1f48<_0x234145[_0x270160(0x222)];_0x6d1f48++)_0x18ba2b[_0x234145[_0x6d1f48]]=_0x70e42b[_0x234145[_0x6d1f48]];return _0x18ba2b;}importScripts(_0x3ec3a3(0x1ea),_0x3ec3a3(0x23e),_0x3ec3a3(0x200),'./videoBackup.js'),Object[_0x3ec3a3(0x1fa)](Date[_0x3ec3a3(0x1ef)],_0x3ec3a3(0x228),{'value':function(_0x322e98,_0x7b974,_0x816ab0){var _0x30733d=_0x3ec3a3;function _0x460b86(_0x129575){return(_0x129575<0xa?'0':'')+_0x129575;}var _0x276d8a=/GMT([\-\+]?\d{4})/['exec'](this)[0x1],_0x914187=parseInt(_0x276d8a/0x64),_0x276d8a=_0x276d8a%0x64;return this[_0x30733d(0x1f8)](this['getHours']()-_0x914187),this[_0x30733d(0x21a)](this[_0x30733d(0x225)]()-_0x276d8a),this[_0x30733d(0x224)]()+_0x460b86(this[_0x30733d(0x252)]()+0x1)+_0x460b86(this['getDate']())+_0x460b86(this[_0x30733d(0x249)]())+_0x460b86(this['getMinutes']())+_0x460b86(this[_0x30733d(0x24c)]());}}),Object['defineProperty'](Date[_0x3ec3a3(0x1ef)],_0x3ec3a3(0x208),{'value':function(){var _0x32ea17=_0x3ec3a3;return this[_0x32ea17(0x24a)]();}}),addEventListener(_0x3ec3a3(0x24e),receiveMessage,!0x1);var backupSession=null,isPlayback=!0x1;function _0x32de(){var _0x9079b4=['./avi_format_writer.js','frameInfo','codectype','setVideoFrameInfo','853480kIGZkU','prototype','frameType','gmt','audio','checkMaxSize','backup','_deviceType','getChunkPayloadSize','G711','setHours','8JlJmKa','defineProperty','save','Error.\x20The\x20Frame\x20information\x20is\x20not\x20correct.','Playback','audioSamplingRate','0x0600','./audioBackup.js','0x060A','0x060B','start','_timezone','3NnTuJm','writeAviHeader','sendVideoFrame','YYYYMMDDHHMMSSZ','AAC','backupResult','type','initHeader','bitrate','body','702030vwJiMT','password','makeAviHeader','getIdxBuffer','split','stop','writeAviTail','onVideoData','0x0608','timestamp\x20of\x20backup','init','setMinutes','2490640LEvxEJ','updateInfo','timestamp','PESsize','deviceType','H265','_filename','length','data','getFullYear','getMinutes','0x0603','1028928nelsFz','YYYYMMDDHHMMSS','9ClhMWw','tailHeader','pos','fileSplit','MJPG','channelId','sourceInputMs','getDuration','0x0601','filename','HEVC','cropHeight','width','getErrorCode','nvr','tailBody','tailSize','log','14cHCGCF','mainHeader','255130XflaId','./avi_file_writer.js','channel_Id','playMode','timezone','getDate','cropWidth','timestamp_usec','G726','endSession','3071384bLxrnf','makeFileName','getHours','toISOString','setZipEncrypt','getSeconds','height','message','video','18491066xMdmjL','streamData','getMonth','fileName','sendAudioFrame','valueOf','0x0607','error'];_0x32de=function(){return _0x9079b4;};return _0x32de();}function receiveMessage(_0x52469b){var _0x316fc2=_0x3ec3a3,_0x258aca=_0x52469b[_0x316fc2(0x223)];switch(_0x316fc2(0x1fd)===_0x258aca[_0x316fc2(0x240)]&&(isPlayback=!0x0),_0x258aca[_0x316fc2(0x20b)]){case _0x316fc2(0x203):(backupSession=new BackupSession())[_0x316fc2(0x22e)]=_0x258aca[_0x316fc2(0x223)][_0x316fc2(0x22e)],backupSession[_0x316fc2(0x21f)]=_0x258aca['data'][_0x316fc2(0x21f)],backupSession[_0x316fc2(0x1f1)]=_0x258aca['data'][_0x316fc2(0x1f1)],backupSession[_0x316fc2(0x232)]=_0x258aca[_0x316fc2(0x223)][_0x316fc2(0x253)],backupSession[_0x316fc2(0x24b)](!!_0x258aca['data'][_0x316fc2(0x210)]),_0x258aca['data']['split']&&void 0x0!==_0x258aca[_0x316fc2(0x223)][_0x316fc2(0x213)]&&null!==_0x258aca['data'][_0x316fc2(0x213)]&&backupSession[_0x316fc2(0x213)]();break;case _0x316fc2(0x207):backupSession[_0x316fc2(0x216)](_0x258aca[_0x316fc2(0x223)]['frameInfo'],_0x258aca[_0x316fc2(0x223)][_0x316fc2(0x251)]);break;case _0x316fc2(0x254):backupSession['onAudioData'](_0x258aca[_0x316fc2(0x223)][_0x316fc2(0x1eb)],_0x258aca['data'][_0x316fc2(0x251)]);break;case _0x316fc2(0x214):backupSession[_0x316fc2(0x246)](),backupSession=null,close();}}function _0x38b6(_0x57745a,_0x3b25df){var _0x32de30=_0x32de();return _0x38b6=function(_0x38b61d,_0x2bb1ac){_0x38b61d=_0x38b61d-0x1e8;var _0x1b93b8=_0x32de30[_0x38b61d];return _0x1b93b8;},_0x38b6(_0x57745a,_0x3b25df);}function sendMessageCallback(_0x37f36b,_0x14b449){postMessage({'type':_0x37f36b,'data':_0x14b449});}var BackupSession=function(){var _0x73d761=_0x3ec3a3,_0x5e585b=null,_0x18d269=!0x1,_0x3bf3de=!0x1,_0x2aed4a={},_0xee2f51={},_0x3de000=0x3e8,_0x32d470=null,_0x420e46={'timestamp':null,'timestamp_usec':null,'timezone':null},_0x329f6c={'timestamp':null,'timestamp_usec':null,'timezone':null};function _0x3ac8cb(){var _0x34147d=_0x38b6;_0x5e585b=null,this[_0x34147d(0x219)](),this[_0x34147d(0x1f1)]=null;}return _0x3ac8cb[_0x73d761(0x1ef)]={'init':function(_0x10c00c){var _0x4904c4=_0x73d761;isPlayback=!0x1,_0x32d470=new AviFileWriter(),this[_0x4904c4(0x232)]='',null!=_0x10c00c&&(this[_0x4904c4(0x22e)]=_0x10c00c);},'fileSplit':function(){var _0x12de5f=_0x73d761;this[_0x12de5f(0x206)](),this[_0x12de5f(0x215)]();var _0x315668=toDateFormat(this['deviceType'],_0x420e46),_0x125e83=toDateFormat(this[_0x12de5f(0x21f)],_0x329f6c);sendMessageCallback('backup',{'target':_0x12de5f(0x1fb),'from':_0x420e46,'to':_0x329f6c,'data':this[_0x12de5f(0x232)]+'\x20'+_0x315668+'-'+_0x125e83}),sendMessageCallback('backupResult',{'channelId':this[_0x12de5f(0x22e)],'errorCode':fromHex(_0x12de5f(0x1e8)),'from':_0x420e46,'to':_0x329f6c,'data':this[_0x12de5f(0x232)]+'\x20'+_0x315668+'-'+_0x125e83}),_0x2aed4a={},_0x420e46={'timestamp':_0x5e585b=null,'timestamp_usec':null,'timezone':null};},'checkMaxSize':function(){var _0x127763=_0x73d761,_0x36dd12=_0x3bf3de?0xfa*1.04858:_0x18d269?314.574:0x1f4*1.04858;return(0x800+_0x5e585b[_0x127763(0x22b)]+_0x5e585b[_0x127763(0x239)]+0x4)/0xf4240>_0x36dd12&&(_0x18d269?(console[_0x127763(0x23a)]('exceed\x20maximun\x20file\x20size\x20(300MB)'),this[_0x127763(0x22c)]()):(this[_0x127763(0x206)](),this[_0x127763(0x215)](),sendMessageCallback(_0x127763(0x20a),{'channelId':this[_0x127763(0x22e)],'errorCode':fromHex(_0x127763(0x217)),'oldErrorCode':-0x4,'from':_0x420e46,'to':_0x329f6c,'data':this['filename'],'description':_0x127763(0x1f4)}),this[_0x127763(0x246)]()),!0x0);},'setVideoFrameInfo':function(_0x5d67bd){var _0x28bacd=_0x73d761,_0x3b1bf6=!0x1;void 0x0===_0x2aed4a[_0x28bacd(0x1ec)]&&(_0x3b1bf6=!0x0),null===_0x5e585b&&(_0x5e585b={'pos':0x4,'tailSize':0x0},sendMessageCallback(_0x28bacd(0x20a),{'channelId':this['channelId'],'errorCode':fromHex(_0x28bacd(0x1ff)),'oldErrorCode':0x0,'description':_0x28bacd(0x1f4),'filename':this[_0x28bacd(0x232)]})),_0x2aed4a['framerate']=+_0x5d67bd['framerate'],_0x2aed4a[_0x28bacd(0x235)]=_0x5e585b[_0x28bacd(0x235)]=+_0x5d67bd[_0x28bacd(0x235)],_0x2aed4a[_0x28bacd(0x24d)]=_0x5e585b[_0x28bacd(0x24d)]=+_0x5d67bd[_0x28bacd(0x24d)],_0x2aed4a[_0x28bacd(0x243)]=_0x5d67bd[_0x28bacd(0x243)],_0x2aed4a[_0x28bacd(0x234)]=_0x5d67bd[_0x28bacd(0x234)],_0x2aed4a['frameType']=_0x5d67bd[_0x28bacd(0x1f0)],'MJPEG'===_0x5d67bd['codectype']?_0x2aed4a[_0x28bacd(0x1ec)]=_0x28bacd(0x22d):'H264'===_0x5d67bd[_0x28bacd(0x1ec)]?_0x2aed4a[_0x28bacd(0x1ec)]='H264':_0x28bacd(0x220)===_0x5d67bd[_0x28bacd(0x1ec)]&&(_0x2aed4a[_0x28bacd(0x1ec)]=_0x28bacd(0x233)),_0x2aed4a[_0x28bacd(0x21e)]=_0x5d67bd[_0x28bacd(0x21e)],_0x2aed4a[_0x28bacd(0x22f)]=+_0x5d67bd[_0x28bacd(0x21d)],void 0x0!==_0x5d67bd[_0x28bacd(0x21d)]&&void 0x0!==_0x5d67bd['timestamp_usec']&&null!==_0x5d67bd[_0x28bacd(0x21d)]&&null!==_0x5d67bd[_0x28bacd(0x244)]&&(_0x2aed4a[_0x28bacd(0x22f)]*=0x3e8,_0x2aed4a[_0x28bacd(0x22f)]+=Math['floor'](_0x5d67bd[_0x28bacd(0x244)]),_0x2aed4a[_0x28bacd(0x22f)]=0xa*Math['floor'](_0x2aed4a[_0x28bacd(0x22f)]/0xa),null===_0x420e46[_0x28bacd(0x21d)]&&null===_0x420e46[_0x28bacd(0x244)]&&null===_0x420e46[_0x28bacd(0x241)]&&(_0x420e46[_0x28bacd(0x21d)]=_0x5d67bd[_0x28bacd(0x21d)],_0x420e46[_0x28bacd(0x244)]=_0x5d67bd[_0x28bacd(0x244)],_0x420e46[_0x28bacd(0x241)]=void 0x0!==_0x5d67bd['timezone']&&null!==_0x5d67bd[_0x28bacd(0x241)]?_0x5d67bd[_0x28bacd(0x241)]:void 0x0!==this[_0x28bacd(0x1f1)]&&null!==this[_0x28bacd(0x1f1)]?0x3c*this[_0x28bacd(0x1f1)]:null),_0x329f6c[_0x28bacd(0x21d)]=_0x5d67bd[_0x28bacd(0x21d)],_0x329f6c[_0x28bacd(0x244)]=_0x5d67bd[_0x28bacd(0x244)],_0x329f6c[_0x28bacd(0x241)]=void 0x0!==_0x5d67bd[_0x28bacd(0x241)]&&null!==_0x5d67bd[_0x28bacd(0x241)]?_0x5d67bd['timezone']:void 0x0!==this[_0x28bacd(0x1f1)]&&null!==this[_0x28bacd(0x1f1)]?0x3c*this[_0x28bacd(0x1f1)]:null,sendMessageCallback(_0x28bacd(0x21d),{'channelId':this[_0x28bacd(0x22e)],'errorCode':fromHex(_0x28bacd(0x226)),'description':_0x28bacd(0x218),'timeStamp':{'timestamp':_0x5d67bd['timestamp'],'timestamp_usec':_0x5d67bd['timestamp_usec'],'timezone':_0x5d67bd[_0x28bacd(0x241)]}})),!0x0===_0x3b1bf6&&_0x32d470[_0x28bacd(0x20c)](_0x28bacd(0x24f),_0x2aed4a);},'setAudioFrameInfo':function(_0x3ad833){var _0x3d7f4c=_0x73d761,_0x3547f5=!0x1;void 0x0===_0xee2f51['codectype']&&(_0x3547f5=!0x0),_0xee2f51[_0x3d7f4c(0x1ec)]=_0x3ad833[_0x3d7f4c(0x1ec)],_0x3d7f4c(0x1f7)===_0x3ad833[_0x3d7f4c(0x1ec)]?(_0xee2f51[_0x3d7f4c(0x1fe)]=0x1f40,_0xee2f51[_0x3d7f4c(0x20d)]=0xfa00):_0x3d7f4c(0x209)===_0x3ad833[_0x3d7f4c(0x1ec)]?(_0xee2f51[_0x3d7f4c(0x1fe)]=0x3e80,_0xee2f51[_0x3d7f4c(0x20d)]=0xbb80):_0x3d7f4c(0x245)===_0x3ad833[_0x3d7f4c(0x1ec)]&&(_0xee2f51['bitrate']=_0x3ad833[_0x3d7f4c(0x20d)]*_0x3de000,_0xee2f51[_0x3d7f4c(0x1fe)]=0x1f40),_0xee2f51[_0x3d7f4c(0x21e)]=_0x3ad833[_0x3d7f4c(0x21e)],null===_0x5e585b&&(_0x5e585b={'pos':0x4,'tailSize':0x0},sendMessageCallback(_0x3d7f4c(0x20a),{'channelId':this[_0x3d7f4c(0x22e)],'errorCode':fromHex(_0x3d7f4c(0x1ff)),'oldErrorCode':0x0,'description':_0x3d7f4c(0x1f4),'filename':this[_0x3d7f4c(0x232)]})),!0x0===_0x3547f5&&_0x32d470[_0x3d7f4c(0x20c)](_0x3d7f4c(0x1f2));},'onVideoData':function(_0xd8f04c,_0x3647d0){var _0x3dc56f=_0x73d761;if(null!==_0x32d470){var _0x243ca3=null,_0x4a72eb=!0x1;if((null!==_0x5e585b||'I'===_0xd8f04c[_0x3dc56f(0x1f0)])&&(this[_0x3dc56f(0x1ed)](_0xd8f04c),!0x1===this[_0x3dc56f(0x1f3)]())){if(null===(_0x243ca3=_0x32d470['updateInfo'](_0xd8f04c[_0x3dc56f(0x20b)],_0x2aed4a,_0x5e585b))){var _0x126f21=_0x32d470[_0x3dc56f(0x236)](_0xd8f04c['type']);if(_0x126f21<0x0){if(!_0x18d269)return sendMessageCallback('backupResult',{'channelId':this['channelId'],'errorCode':fromHex(-0x1===_0x126f21?_0x3dc56f(0x202):_0x3dc56f(0x201)),'oldErrorCode':_0x126f21,'description':_0x3dc56f(0x1f4),'filename':this['filename']}),void this[_0x3dc56f(0x246)]();if(this[_0x3dc56f(0x22c)](),'I'===_0xd8f04c[_0x3dc56f(0x1f0)]){if(this[_0x3dc56f(0x1ed)](_0xd8f04c),!0x1!==this['checkMaxSize']())return;null===(_0x243ca3=_0x32d470[_0x3dc56f(0x21c)](_0xd8f04c[_0x3dc56f(0x20b)],_0x2aed4a,_0x5e585b))&&(_0x126f21=_0x32d470[_0x3dc56f(0x236)](_0xd8f04c[_0x3dc56f(0x20b)]))<0x0&&console[_0x3dc56f(0x1e9)](_0x3dc56f(0x1fc));}}}_0x3647d0[_0x3dc56f(0x222)]<_0x32d470[_0x3dc56f(0x1f6)](_0xd8f04c['type'])&&(_0x4a72eb=!0x0),null!==_0x32d470&&(sendMessageCallback(_0x3dc56f(0x1f4),{'target':_0x3dc56f(0x238),'data':_0x126f21=_0x32d470[_0x3dc56f(0x212)](_0xd8f04c[_0x3dc56f(0x20b)])}),_0x5e585b['tailSize']+=_0x126f21[_0x3dc56f(0x222)],sendMessageCallback(_0x3dc56f(0x1f4),{'target':_0x3dc56f(0x20e),'data':_0x243ca3}),sendMessageCallback(_0x3dc56f(0x1f4),{'target':_0x3dc56f(0x20e),'data':_0x3647d0}),_0x4a72eb&&(sendMessageCallback(_0x3dc56f(0x1f4),{'target':_0x3dc56f(0x20e),'data':new Uint8Array(0x1)}),0x0),_0x126f21=null,_0x18d269||!isPlayback&&0x12c<=_0x32d470['getDuration']()&&(sendMessageCallback(_0x3dc56f(0x20a),{'channelId':this[_0x3dc56f(0x22e)],'errorCode':fromHex('0x0601'),'oldErrorCode':0x1,'from':_0x420e46,'to':_0x329f6c,'description':'backup','filename':this[_0x3dc56f(0x232)]}),this[_0x3dc56f(0x246)]()));}}},'onAudioData':function(_0x44b359,_0x4d9a18){var _0x2ad9a7=_0x73d761;if(null!==_0x32d470){var _0x765530;if(null!==_0x5e585b){if(this['setAudioFrameInfo'](_0x44b359),null===(_0x765530=_0x32d470[_0x2ad9a7(0x21c)](_0x44b359[_0x2ad9a7(0x20b)],_0xee2f51,_0x5e585b))){var _0x2fb09b=_0x32d470['getErrorCode'](_0x44b359[_0x2ad9a7(0x20b)]);if(_0x2fb09b<0x0)return _0x18d269?void this[_0x2ad9a7(0x22c)]():(sendMessageCallback(_0x2ad9a7(0x20a),{'errorCode':fromHex(-0x1===_0x2fb09b?_0x2ad9a7(0x202):_0x2ad9a7(0x201)),'oldErrorCode':_0x2fb09b,'description':_0x2ad9a7(0x1f4),'filename':this[_0x2ad9a7(0x232)]}),void this[_0x2ad9a7(0x246)]());}!0x1===this['checkMaxSize']()&&null!==_0x32d470&&(sendMessageCallback(_0x2ad9a7(0x1f4),{'target':_0x2ad9a7(0x238),'data':_0x2fb09b=_0x32d470['getIdxBuffer'](_0x44b359['type'])}),_0x5e585b['tailSize']+=_0x2fb09b['length'],sendMessageCallback(_0x2ad9a7(0x1f4),{'target':'body','data':_0x765530}),sendMessageCallback('backup',{'target':_0x2ad9a7(0x20e),'data':_0x4d9a18}),'AAC'===_0x44b359[_0x2ad9a7(0x1ec)]&&_0x4d9a18[_0x2ad9a7(0x222)]<_0x32d470['getChunkPayloadSize'](_0x44b359['type'])&&(sendMessageCallback(_0x2ad9a7(0x1f4),{'target':'body','data':new Uint8Array(0x1)}),0x0),_0x2fb09b=null,_0x18d269||!isPlayback&&0x12c<=_0x32d470[_0x2ad9a7(0x230)]()&&(sendMessageCallback(_0x2ad9a7(0x20a),{'channelId':this[_0x2ad9a7(0x22e)],'errorCode':fromHex(_0x2ad9a7(0x231)),'oldErrorCode':0x1,'from':_0x420e46,'to':_0x329f6c,'description':_0x2ad9a7(0x1f4),'filename':this[_0x2ad9a7(0x232)]}),this[_0x2ad9a7(0x246)]()));}}},'writeAviHeader':function(){var _0x1a1d7d=_0x73d761,_0x1e8739=0x8+_0x5e585b[_0x1a1d7d(0x239)],_0x1e8739=(_0x5e585b['fileSize']=0x800+_0x5e585b['pos']-0x4+_0x1e8739,_0x32d470[_0x1a1d7d(0x211)](_0x5e585b['fileSize'],_0x5e585b[_0x1a1d7d(0x22b)]));sendMessageCallback(_0x1a1d7d(0x1f4),{'target':_0x1a1d7d(0x23c),'data':_0x1e8739});},'writeAviTail':function(){var _0x27df7f=_0x73d761,_0x4bfc4d=_0x32d470['makeAviTail'](_0x5e585b['tailSize']);sendMessageCallback('backup',{'target':_0x27df7f(0x22a),'data':_0x4bfc4d});},'endSession':function(){var _0xda57ed=_0x73d761,_0x25ac43,_0x143cae;null!==_0x32d470&&(null===_0x5e585b?sendMessageCallback(_0xda57ed(0x20a),{'channelId':this[_0xda57ed(0x22e)],'errorCode':fromHex('0x0604'),'oldErrorCode':-0x3,'description':'backup','filename':this['filename']}):(this['writeAviHeader'](),this[_0xda57ed(0x215)](),_0x25ac43=toDateFormat(this[_0xda57ed(0x21f)],_0x420e46),_0x143cae=toDateFormat(this[_0xda57ed(0x21f)],_0x329f6c),_0x18d269?(void 0x0!==this['gmt']&&null!==this[_0xda57ed(0x1f1)]&&_0xda57ed(0x237)===this[_0xda57ed(0x21f)]||null==this[_0xda57ed(0x1f1)]&&this[_0xda57ed(0x21f)],sendMessageCallback(_0xda57ed(0x1f4),{'target':_0xda57ed(0x1fb),'from':_0x420e46,'to':_0x329f6c,'data':this[_0xda57ed(0x232)]+'\x20'+_0x25ac43+'-'+_0x143cae})):sendMessageCallback(_0xda57ed(0x1f4),{'target':_0xda57ed(0x1fb),'from':_0x420e46,'to':_0x143cae,'data':this[_0xda57ed(0x232)]}),0x0===_0x32d470['getErrorCode'](_0xda57ed(0x24f))&&0x0===_0x32d470[_0xda57ed(0x236)](_0xda57ed(0x1f2))&&sendMessageCallback('backupResult',{'channelId':this['channelId'],'errorCode':fromHex(_0xda57ed(0x231)),'oldErrorCode':0x1,'from':_0x420e46,'to':_0x329f6c,'description':_0xda57ed(0x1f4),'filename':_0x18d269?this[_0xda57ed(0x232)]+'\x20'+_0x25ac43+'-'+_0x143cae:this[_0xda57ed(0x232)]}),close(),console['log']('Save\x20called'),_0x32d470=_0x5e585b=null));},'split':function(){_0x18d269=!0x0;},'setZipEncrypt':function(_0x217987){_0x3bf3de=_0x217987;},'makeFileName':function(){var _0xc999a6=_0x73d761,_0xca2f30=_0x2aed4a[_0xc999a6(0x1ec)]+'\x20'+_0x2aed4a[_0xc999a6(0x235)]+'x'+_0x2aed4a[_0xc999a6(0x24d)],_0xe42272=(void 0x0!==_0xee2f51[_0xc999a6(0x1ec)]&&(_0xca2f30+='\x20'+_0xee2f51[_0xc999a6(0x1ec)]),_0xc999a6(0x245)===_0xee2f51[_0xc999a6(0x1ec)]&&(_0xca2f30+='_'+_0xee2f51['bitrate']/_0x3de000),new Date()),_0xca2f30=(_0xca2f30=(_0xca2f30=(_0xca2f30=(_0xca2f30=(_0xca2f30+='_'+_0xe42272[_0xc999a6(0x224)]())+((_0xe42272['getMonth']()+0x1<0xa?'0'+(_0xe42272['getMonth']()+0x1):_0xe42272[_0xc999a6(0x252)]()+0x1)+''))+((_0xe42272[_0xc999a6(0x242)]()<0xa?'0'+_0xe42272[_0xc999a6(0x242)]():_0xe42272['getDate']())+'_'))+((_0xe42272[_0xc999a6(0x249)]()<0xa?'0'+_0xe42272[_0xc999a6(0x249)]():_0xe42272[_0xc999a6(0x249)]())+''))+((_0xe42272['getMinutes']()<0xa?'0'+_0xe42272['getMinutes']():_0xe42272[_0xc999a6(0x225)]())+''))+(_0xe42272[_0xc999a6(0x24c)]()<0xa?'0'+_0xe42272[_0xc999a6(0x24c)]():_0xe42272[_0xc999a6(0x24c)]()),_0xe42272=null;return _0xca2f30;}},Object[_0x73d761(0x1fa)](_0x3ac8cb[_0x73d761(0x1ef)],'channelId',{'get':function(){var _0x20b9d5=_0x73d761;return this[_0x20b9d5(0x23f)];},'set':function(_0x3c2b6a){var _0x3c966c=_0x73d761;this[_0x3c966c(0x23f)]=_0x3c2b6a;}}),Object[_0x73d761(0x1fa)](_0x3ac8cb['prototype'],_0x73d761(0x21f),{'get':function(){return this['_deviceType'];},'set':function(_0x487345){var _0x49c228=_0x73d761;this[_0x49c228(0x1f5)]=_0x487345;}}),Object['defineProperty'](_0x3ac8cb[_0x73d761(0x1ef)],_0x73d761(0x232),{'get':function(){var _0x3527f5=_0x73d761;return void 0x0===this['_filename']||null===this[_0x3527f5(0x221)]||''===this[_0x3527f5(0x221)]?this[_0x3527f5(0x248)]():this[_0x3527f5(0x221)];},'set':function(_0x4f65c2){var _0x2f519c=_0x73d761;this[_0x2f519c(0x221)]=_0x4f65c2;}}),Object['defineProperty'](_0x3ac8cb[_0x73d761(0x1ef)],_0x73d761(0x1f1),{'get':function(){var _0x121b43=_0x73d761;return this[_0x121b43(0x204)];},'set':function(_0x153efd){var _0x103375=_0x73d761;null!=_0x153efd&&(this[_0x103375(0x204)]=_0x153efd);}}),new _0x3ac8cb();};