-
Notifications
You must be signed in to change notification settings - Fork 19
/
webcam.component.js.map
1 lines (1 loc) · 26.5 KB
/
webcam.component.js.map
1
{"version":3,"file":"webcam.component.js","sourceRoot":"","sources":["../src/webcam.component.ts"],"names":[],"mappings":";AAAA,kCAAkC;;;;;;;;;;;AAElC,sCAAkF;AAClF,8DAAwD;AACxD,yCAUoB;AAEpB,IAAM,QAAQ,GAAG,uIAA+H,CAAA;AAmB7I;IAmCD,yBACU,SAAuB,EACvB,OAAmB;QADnB,cAAS,GAAT,SAAS,CAAc;QACvB,YAAO,GAAP,OAAO,CAAY;QAxB7B,SAAI,GAAQ,EAAC,OAAO,EAAC,EAAC,KAAK,EAAC,CAAC,EAAC,MAAM,EAAC,CAAC,EAAC,EAAC,CAAA;QAQ/B,SAAI,GAAG,YAAY,CAAA;QACnB,yBAAoB,GAAW,KAAK,CAAA;QAGnC,YAAO,GAA6B,IAAI,mBAAY,EAAE,CAAA;QAOtD,gBAAW,GAAuB,IAAI,mBAAY,EAAE,CAAA;QAC7C,YAAO,GAAuB,IAAI,mBAAY,EAAE,CAAA;QAK/D,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;IACpB,CAAC;IAED,kCAAQ,GAAR;QACE,IAAI,CAAC,kBAAkB,GAAG,oBAAQ,EAAE,IAAE,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAA;QACzD,IAAI,CAAC,kBAAkB,GAAG,KAAK,CAAA;QAC/B,IAAI,CAAC,eAAe,GAAG,CAAC,CAAC,CAAC,mBAAO,CAAC,YAAY,IAAI,mBAAO,CAAC,YAAY,CAAC,YAAY,CAAC,CAAA;IACtF,CAAC;IAED,yCAAe,GAAf;QAAA,iBAGC;QAFC,IAAI,CAAC,aAAa,EAAE,CAAA;QACpB,UAAU,CAAC,cAAI,OAAA,KAAI,CAAC,eAAe,EAAE,EAAtB,CAAsB,EAAE,CAAC,CAAC,CAAA;IAC3C,CAAC;IAED,qCAAW,GAAX,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AO,6BAAiB,CAAC,MAAM,EAAE,EAAC,QAAQ,EAAC,OAAO,CAAC,QAAQ,EAAC,CAAC,CAAA;IAC/D,CAAC;IA/ZQ;QAAR,YAAK,EAAE;kCAAa,eAAe;wDAAA;IAC3B;QAAR,YAAK,EAAE;;0DAAqB;IAGpB;QAAR,YAAK,EAAE;;oDAAgB;IACf;QAAR,YAAK,EAAE;;uDAAsD;IACrD;QAAR,YAAK,EAAE;;iDAAoB;IACnB;QAAR,YAAK,EAAE;;iEAAqC;IAEpC;QAAR,YAAK,EAAE;;oDAAiB;IACf;QAAT,aAAM,EAAE;kCAAS,mBAAY;oDAAkC;IAMvD;QAAR,YAAK,EAAE;kCAAO,KAAK;kDAAA;IACV;QAAT,aAAM,EAAE;kCAAa,mBAAY;wDAA4B;IAC7C;QAAhB,aAAM,CAAC,OAAO,CAAC;kCAAS,mBAAY;oDAA4B;IAjCnD,eAAe;QAH9B,gBAAS,CAAC;YACT,QAAQ,EAAE,YAAY;YACtB,QAAQ,EAAE,QAAQ;SACnB,CAAC;yCAoCqB,+BAAY;YACd,iBAAU;OArCf,eAAe,CA+a9B;IAAD,sBAAC;CAAA,AA/aE,IA+aF;AA/ae,0CAAe;AAkb/B,SAAS,IAAI,CAAC,CAAC;IACb,OAAO,OAAM,CAAC,CAAC,CAAC,KAAG,QAAQ,CAAA;AAC7B,CAAC;AAED,SAAS,UAAU,CACjB,OAAa,EAAE,QAAe;IAE5B,IAAI,CAAC,GAAQ,OAAO,CAAC;IACrB,4FAA4F;IAC5F,CAAC,CAAC,gBAAgB,GAAG,IAAI,IAAI,EAAE,CAAC;IAChC,CAAC,CAAC,IAAI,GAAG,QAAQ,CAAC;IAElB,uBAAuB;IACvB,OAAa,OAAO,CAAC;AACzB,CAAC","sourcesContent":["//import * as a from './audioTest'\n\nimport { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core'\nimport { DomSanitizer } from '@angular/platform-browser'\nimport {\n browser,\n getMedia,\n Options,\n dataUriToFormData,\n videoInputsByDevices,\n Fallback,\n //MediaDevice,\n promiseDevices,\n promiseDeviceById\n} from \"./videoHelp\"\n\nconst template = `<video id=\"video\" *ngIf=\"(isSupportUserMedia||isSupportWebRTC)\" autoplay=\"\" playsinline=\"\">Video stream not available</video>`\n\nexport interface vidElmOptions{\n audio: boolean | MediaTrackConstraints\n video: boolean | MediaTrackConstraints\n}\n\nexport interface elementSets{\n width:number\n height:number\n}\n\nexport interface sets{\n element:elementSets\n}\n\n@Component({\n selector: 'ack-webcam',\n template: template\n}) export class WebCamComponent {\n /* platform support variables */\n flashPlayer:Fallback\n isSupportUserMedia: boolean\n isSupportWebRTC: boolean\n isFallback: boolean\n /* end: platform support variables */\n \n initComplete:boolean\n observer:MutationObserver\n onResize:()=>any\n stream:MediaStream\n\n sets:sets = {element:{width:0,height:0}}\n\n @Input() videoDevice:MediaDeviceInfo\n @Input() videoDeviceId:string\n //@Input() audioDeviceId:string\n \n @Input() reflect:boolean//mirror camera image\n @Input() facingMode:\"user\"|\"environment\"|\"left\"|\"right\"|string\n @Input() mime = 'image/jpeg'\n @Input() useParentWidthHeight:boolean = false\n \n @Input() options: Options\n @Output() success:EventEmitter<MediaStream> = new EventEmitter()\n\n //-Lazy @ViewChild() variable reference\n //@Input() ref:WebCamComponent\n //@Output() refChange:EventEmitter<WebCamComponent> = new EventEmitter()\n \n @Input() error:Error\n @Output() errorChange:EventEmitter<Error> = new EventEmitter()\n @Output('catch') catcher:EventEmitter<Error> = new EventEmitter()\n\n constructor(\n private sanitizer: DomSanitizer,\n private element: ElementRef){\n console.log(\"123\")\n }\n\n ngOnInit(){\n this.isSupportUserMedia = getMedia()!=null ? true : false\n this.isSupportUserMedia = false\n this.isSupportWebRTC = !!(browser.mediaDevices && browser.mediaDevices.getUserMedia)\n }\n\n ngAfterViewInit(){\n this.applyDefaults()\n setTimeout(()=>this.afterInitCycles(), 0)\n }\n\n ngOnChanges( changes ) {\n if( !this.initComplete )return\n\n if(\n changes.facingMode\n || changes.videoDevice\n || changes.videoDeviceId\n ){\n this.redraw()//restart\n }\n\n if( changes.reflect ){\n this.applyReflect()\n }\n }\n\n ngOnDestroy(){\n this.observer.disconnect()\n window.removeEventListener('resize', this.onResize)\n this.stop()\n }\n\n play(){\n return this.redraw()\n }\n\n stop(){\n const vid = this.getVideoElm()\n if(vid && vid.pause){\n vid.pause()\n }\n\n if( this.stream ){\n this.stream.getTracks().forEach(track=>track.stop())\n }\n }\n\n redraw(){\n this.stop()\n this.startCapturingVideo()\n }\n\n afterInitCycles(){\n const media = getMedia()\n\n // Older browsers might not implement mediaDevices at all, so we set an empty object first\n if ((browser.mediaDevices === undefined) && !!media) {\n browser.mediaDevices = {}\n }\n\n // Some browsers partially implement mediaDevices. We can't just assign an object\n // with getUserMedia as it would overwrite existing properties.\n // Here, we will just add the getUserMedia property if it's missing.\n const getUserMediaUndefined = (browser.mediaDevices && browser.mediaDevices.getUserMedia === undefined) && !!media\n if( getUserMediaUndefined ){\n browser.mediaDevices.getUserMedia = constraints=>{\n return new Promise((resolve, reject)=>{\n const userMedia = media.call(browser, constraints, resolve, reject)\n\n if( userMedia.then ){\n userMedia.then( stream=>this.applyStream(stream) )\n }\n })\n .catch( err=>this.catchError(err) )\n }\n }\n\n this.initComplete = true\n \n //deprecated. Use angular hash template referencing and @ViewChild\n //setTimeout(()=>this.refChange.emit(this), 0)\n\n this.createVideoResizer()\n \n this.startCapturingVideo()\n .then( ()=>setTimeout(()=>this.resize(), 10) )\n .catch( err=>this.catchError(err) )\n }\n\n applyReflect(){\n const videoElm = this.getVideoElm()\n\n if(!videoElm)return\n\n if( this.reflect ){\n videoElm.style.transform = \"scaleX(-1)\"\n }else{\n videoElm.style.transform = \"scaleX(1)\"\n }\n }\n\n applyStream( stream:MediaStream ){\n const videoElm = this.getVideoElm()\n videoElm.srcObject = stream\n this.applyReflect()\n }\n\n createVideoResizer(){\n this.observer = new MutationObserver( ()=>this.resize() )\n \n const config = {\n attributes: true,\n childList: true,\n characterData: true\n //,subtree: true\n }\n this.observer.observe(this.element.nativeElement, config)\n\n this.onResize = ()=>this.resize()\n window.addEventListener('resize', this.onResize)\n }\n\n applyDefaults(){\n this.options = this.options || <Options>{}\n this.options.fallbackSrc = this.options.fallbackSrc || 'jscam_canvas_only.swf'\n this.options.fallbackMode = this.options.fallbackMode || 'callback'\n this.options.fallbackQuality = this.options.fallbackQuality || 200\n this.isFallback = this.options.fallback || (!this.isSupportUserMedia && !this.isSupportWebRTC && this.options.fallbackSrc) ? true : false\n\n if(!this.options.video && !this.options.audio){\n this.options.video = true\n }\n }\n\n onWebRTC(): Promise<MediaStream> {\n let promise:Promise<MediaDeviceInfo> = Promise.resolve(null)\n\n return this.promiseVideoOptions()\n .then( options=>{\n this.options.video = options\n return this.setWebcam(this.options)\n })\n }\n\n promiseVideoOptions():Promise<MediaTrackConstraints>{\n let promise = Promise.resolve()\n\n const videoOptions:MediaTrackConstraints = {}\n \n if( this.options.video && isOb(this.options.video) ){\n Object.assign(videoOptions, this.options.video)\n\n /* attempt to prevent bad videoOptions */\n if( videoOptions.width && isOb(videoOptions.width) && !Object.keys(videoOptions.width).length ){\n delete videoOptions.width\n }\n\n if( videoOptions.height && isOb(videoOptions.height) && !Object.keys(videoOptions.height).length ){\n delete videoOptions.height\n }\n /* end: fix vid options */\n }\n\n if( this.facingMode ){\n videoOptions.facingMode = this.facingMode//{exact:this.facingMode}\n }\n\n if( this.videoDeviceId ){\n //videoOptions.deviceId = {exact:this.videoDeviceId}\n videoOptions.deviceId = this.videoDeviceId\n }else if( this.videoDevice ){\n //videoOptions.deviceId = {exact:this.videoDevice.deviceId}\n videoOptions.deviceId = this.videoDevice.deviceId\n }\n\n return promise.then( ()=>videoOptions )\n }\n\n //old method name (deprecated)\n resizeVideo(maxAttempts=4){\n return this.resize(maxAttempts)\n }\n\n resize(maxAttempts=4){\n const video = this.getVideoElm()\n \n if(!video)return\n\n video.style.position='absolute'\n \n const elm = this.useParentWidthHeight ? this.element.nativeElement.parentNode : this.element.nativeElement\n\n let width = this.options.width || parseInt(elm.offsetWidth, 10)\n let height = this.options.height || parseInt(elm.offsetHeight, 10)\n\n if(!width || !height){\n width = 320\n height = 240\n }\n\n setTimeout(()=>{\n video.width = width\n video.height = height\n \n this.sets.element.width = width\n this.sets.element.height = height\n \n video.style.position='static'\n \n //now that we set a width and height, it may need another adjustment if it pushed percent based items around\n const resizeAgain = (!this.options.width && width!=parseInt(elm.offsetWidth, 10)) || (!this.options.height && height!=parseInt(elm.offsetHeight, 10))\n \n if( resizeAgain && maxAttempts){\n this.resize( --maxAttempts )\n }\n }, 1)\n }\n\n getVideoDimensions(video){\n video = video || this.getVideoElm()\n const dim = {width:0, height:0}\n\n if( video.videoWidth ){\n dim.width = video.videoWidth\n dim.height = video.videoHeight\n }else{\n dim.width = this.options.width || parseInt(this.element.nativeElement.offsetWidth, 10)\n dim.height = this.options.height || parseInt(this.element.nativeElement.offsetHeight, 10)\n }\n\n if( !dim.width )dim.width = 320\n if( !dim.height )dim.height = 240\n\n return dim\n }\n\n getVideoElm(){\n const native = this.element.nativeElement\n const elmType = this.isFallback ? 'object' : 'video'\n return native.getElementsByTagName(elmType)[0]\n }\n\n setWebcam(options:Options): Promise<MediaStream> {\n return this.promiseStreamByVidOptions(options)\n .then(stream=>{\n this.applyStream(stream)\n this.processSuccess(stream)\n this.stream = stream\n return stream\n })\n .catch( err=>this.catchError(err) )\n }\n\n catchError(err:Error):Promise<any>{\n this.errorChange.emit(this.error=err)\n this.catcher.emit(err)\n\n if( !this.errorChange.observers.length && !this.catcher.observers.length ){\n return Promise.reject(err)//if no error subscriptions promise need to continue to be Uncaught\n }\n }\n\n promiseStreamByVidOptions(\n optionObject:vidElmOptions\n ):Promise<MediaStream>{\n return new Promise((resolve, reject) => {\n try {\n browser.mediaDevices.getUserMedia(optionObject)\n .then(stream=>resolve(stream))\n .catch((objErr:any)=>reject(objErr))\n } catch (e) {\n reject(e)\n }\n })\n }\n\n processSuccess(stream?){\n if (this.isFallback) {\n this.setupFallback()\n }else{\n this.success.emit(stream)\n }\n }\n\n /**\n * Start capturing video stream\n * @returns {void}\n */\n startCapturingVideo(): Promise<any> {\n if (!this.isFallback && this.isSupportWebRTC) {\n return this.onWebRTC()\n }\n\n return Promise.resolve( this.processSuccess() )\n }\n\n getCanvas(){\n const canvas = document.createElement('canvas')\n const video = this.getVideoElm()\n this.setCanvasWidth(canvas, video)\n const ctx = canvas.getContext('2d')\n\n if( this.reflect ){\n ctx.translate(canvas.width, 0);\n ctx.scale(-1, 1);\n }\n\n ctx.drawImage(video, 0, 0)\n return canvas\n }\n\n getBlob():Promise<Blob>{\n return new Promise((res,rej)=>{\n const canvas = this.getCanvas()\n canvas.toBlob(file=>{\n res(file)\n }, this.mime, 1)\n })\n }\n\n getFile( fileName:string ):Promise<File>{\n return this.getBlob().then(file=>blobToFile(file,fileName))\n }\n\n /** returns promise . @mime - null=png . Also accepts image/jpeg */\n getBase64(mime?):Promise<string>{\n if(this.isFallback){\n return this.flashPlayer.captureBase64(mime||this.mime)\n //return this.getFallbackBase64(mime)\n }else{\n const canvas = this.getCanvas()\n return Promise.resolve( canvas.toDataURL(mime) )\n }\n }\n\n setCanvasWidth(canvas, video){\n const di = this.getVideoDimensions(video)\n canvas.width = di.width\n canvas.height = di.height\n }\n\n /** older browsers (IE11) cannot dynamically apply most attribute changes to object elements. Use this method during fallback */\n createVidElmOb(){\n const rtnElm = document.createElement('object')\n rtnElm.innerHTML = 'Video stream not available'\n rtnElm.setAttribute('type','application/x-shockwave-flash')\n rtnElm.setAttribute('data',this.options.fallbackSrc)\n\n let paramVar = document.createElement('param')\n paramVar.setAttribute('name','FlashVars')\n paramVar.setAttribute('value','mode=callback&quality=200')\n rtnElm.appendChild( paramVar )\n\n paramVar = document.createElement('param')\n paramVar.setAttribute('name','allowScriptAccess')\n paramVar.setAttribute('value','always')\n rtnElm.appendChild( paramVar )\n\n paramVar = document.createElement('param')\n paramVar.setAttribute('name','movie')\n paramVar.setAttribute('value',this.options.fallbackSrc)\n rtnElm.appendChild( paramVar )\n\n const obs = this.element.nativeElement.getElementsByTagName('object')\n if(obs.length){\n this.element.nativeElement.removeChild( obs[0] )\n }\n\n this.element.nativeElement.appendChild( rtnElm )\n\n return rtnElm\n }\n\n setupFallback(): void {\n this.isFallback = true\n const vidElm = this.getVideoElm() || this.createVidElmOb()\n this.flashPlayer = new Fallback( vidElm )\n }\n\n /** single image to FormData */\n captureAsFormData(options?:{mime?:string, fileName?:string, form?:FormData}){\n options = options || {}\n return this.getBase64(options.mime)\n .then( base64=>dataUriToFormData(base64, {fileName:options.fileName}) )\n }\n\n dataUriToFormData(base64, options){\n return dataUriToFormData(base64, {fileName:options.fileName})\n }\n}\n\n\nfunction isOb(v){\n return typeof(v)==='object'\n}\n\nfunction blobToFile(\n theBlob: Blob, fileName:string\n ):File{\n var b: any = theBlob;\n //A Blob() is almost a File() - it's just missing the two properties below which we will add\n b.lastModifiedDate = new Date();\n b.name = fileName;\n\n //Cast to a File() type\n return <File>theBlob;\n}\n"]}