{"_id":"@eduardosmarcal/webcam-easy","_rev":"4-1f8b0b3f56286c6a9e462dd591b1fe91","name":"@eduardosmarcal/webcam-easy","dist-tags":{"latest":"2.0.3"},"versions":{"1.1.0":{"name":"@eduardosmarcal/webcam-easy","version":"1.1.0","description":"HTML5 webcam streaming javascript library, with front and back camera switch, also have take photo function.","main":"src/webcam-easy.js","repository":{"type":"git","url":"git+https://github.com/eduardosmarcal/webcam-easy.git"},"homepage":"https://bensonruan.com/how-to-access-webcam-and-take-photo-with-javascript","keywords":["webcam","camera","getusermedia","streaming","frontcamera","backcamera"],"author":{"name":"Eduardo S. Marçal"},"contributors":[{"name":"Benson Ruan"}],"license":"MIT","gitHead":"c5e86b5c70ff72ffd284a6ad1344234ab8e651af","bugs":{"url":"https://github.com/eduardosmarcal/webcam-easy/issues"},"_id":"@eduardosmarcal/webcam-easy@1.1.0","_nodeVersion":"14.19.1","_npmVersion":"6.14.16","dist":{"integrity":"sha512-9a/21TsfHFu1rLCTNLMnkTgbU+n19pD0scW0cfFSlPCcwJx5+eBXEo6MdjeMxwa+wv35ODWR4OdwGKhT3YpcPA==","shasum":"19968b7f1cfd44b874be6e357270b93b241620ee","tarball":"https://registry.npmjs.org/@eduardosmarcal/webcam-easy/-/webcam-easy-1.1.0.tgz","fileCount":7,"unpackedSize":17460,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD766gJe/J5Fdm3/k0QPPfmoabcDv77r4xN+D0AMEGQ6gIhAP73fAjegrQRVGIO3CKBF/7BLfj/Iw9p7wSg1k1+xcH5"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJig7rrACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp4BA/9H69VFIBbVXMowsnH7XtfgrwFfvjYxDet8KduaqulEdUyHOst\r\ndYUnB9HiULdjvOBwVcG5PbHQ4XFd2vZVnUSPPJ5ebxHCcQUPjT61XKspriyP\r\n/IeUz/S+ZHU7nZT9xT2ArdIrZVZIdmJGHFBQ2/iHLqUZC+kQtJRqKePBsXV0\r\nSqRbltsY5kmAigboKEa53y0rU1uasrLitSCuc9FruCKryplhna1I6BYf1RvH\r\nXOu44kk/DYtbk4g6UfTAgr+4AqetByClBS3XC8t7UGpHLZmH8lwfu/oaGD+b\r\nnuPNk+txpDQKVT/Ot2KxTuunPP/iDglVoBmtEvPSaDg/W/HigvaMRNJO0hF7\r\nsY+r34bobs4f0KtV3cntCsyPpt2bsCI4wl/vGT32Pexiz7nBTfVE2u/DxuHz\r\nZDB1IgL6l0xmwZuDbInutk3R5r/3phaalMhhz9NvgkQLY/9IW3vPl+9y13ZG\r\nfUy+IS+gflo8bxe3c3gdzErhH7oZFLWTbaj0B5mdvbjEeXbJ4t+eLTg9Rnmv\r\ntyo1q/IObnQ94u1GvUXNbqwoNzGjTaAxtmhe2oA+nBG6xqAp2bNSyh0ElU3l\r\nBu5xZqxZj7l0AgdX4+LvADrV36MooBsn9qA2mB2OHaRt1Lru1cxypXX4XeR4\r\nMTA1hGVZTLu8JEb1cwqZfBf2+sBCQPSTP9o=\r\n=DYEK\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"eduardosmarcal","email":"eduardosorokin@gmail.com"},"directories":{},"maintainers":[{"name":"eduardosmarcal","email":"eduardosorokin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/webcam-easy_1.1.0_1652800235151_0.5397285978368489"},"_hasShrinkwrap":false},"2.0.0":{"name":"@eduardosmarcal/webcam-easy","version":"2.0.0","description":"HTML5 webcam streaming TypeScript/JavaScript library, with front and back camera switch, also have take photo function.","main":"dist/index.js","types":"dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/eduardosmarcal/webcam-easy.git"},"homepage":"https://bensonruan.com/how-to-access-webcam-and-take-photo-with-javascript","keywords":["webcam","camera","getUserMedia","streaming","frontCamera","backCamera"],"author":{"name":"Eduardo S. Marçal"},"contributors":[{"name":"Benson Ruan"}],"license":"MIT","gitHead":"443cee991412e77a699c8700e229f6ab0e95c187","bugs":{"url":"https://github.com/eduardosmarcal/webcam-easy/issues"},"_id":"@eduardosmarcal/webcam-easy@2.0.0","_nodeVersion":"16.14.2","_npmVersion":"8.7.0","dist":{"integrity":"sha512-O5eIzNIFKSrpj6FLTM3mkjK/iFDsUv5vf+hF5mqbyAVVsXw5J2XJg4QGft2r95cxLLSetG5xd/XDxs8RlQsH1w==","shasum":"c0e6f06944389388733a1b2066f5bf27dfe55679","tarball":"https://registry.npmjs.org/@eduardosmarcal/webcam-easy/-/webcam-easy-2.0.0.tgz","fileCount":13,"unpackedSize":35723,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICyohjvlcUJ5o0FdNtbxOmYLAdOPspgxPL3g2SBxqiTDAiEA9L0MTxxbXhrNQNYwsAr+PAIGy+3WvCiE5/8TzUWlSE0="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjA9lcACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmopog//T4c/cLGFL6bvszhYPws0IlWRr6nNGlIzr4sPay3lBRsafvR4\r\nY3ORVqp6Ck1mydHeg2Glqteu8If+emmATLMtnR+EbljffIMscuZeIK334KPf\r\nf8HE1QRVdwSxxExb5H19qZgA5kAh5O/cJ+2HcIi0hND1h3rLIW3i4kwU5Dhs\r\nQw6vrG67aGLzNHqArqpRvL2WTak+D03XTLny0HJfX1aAwrUQbfIhUZScyZKY\r\nP27kGtNgGRUD39CYzwfJ92p3OZxgpOcpHeNS3+bcQH0ckhSmSlkb3mpz5Iim\r\nRsg7NOYbOITNlmsEmRQtl32QSgdZ7Aex49rOQkWKUwZOcKhW515SGxzJuusM\r\nR6jKJDrTVAy3WYNnT/wu4rDMYMFhSQpln+VIfIcpkPxMSabpcDt3GW8y2X+p\r\nKj+HafFIPxQwF/XQnEA7mrMJG5cBtQdLEmWOIGIsZ4eTFqcSXEjeEda7ZdUT\r\n9gAhSPjFEIpGHjAv4LAERbk+4WAuilQb8DAGTe/TMOIAVCfWMtd48djmRDgP\r\nr2gbuvYj6bvaGpIshYqteQ6IozG+yEGawSSqoyqqjsRmc66+zlm1seIoskOK\r\n2od7U8qhCm4buD1w/kggcvO1WPmIAlnTV61XOTHEID/SwbjbQ7WNjg0SQVpd\r\nxLDDegp6ayjI8fd9AnT/+QoBAHHPzjHKaC8=\r\n=GAS2\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"eduardosmarcal","email":"eduardosorokin@gmail.com"},"directories":{},"maintainers":[{"name":"eduardosmarcal","email":"eduardosorokin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/webcam-easy_2.0.0_1661196636779_0.6441750046476766"},"_hasShrinkwrap":false},"2.0.1":{"name":"@eduardosmarcal/webcam-easy","version":"2.0.1","description":"HTML5 webcam streaming TypeScript/JavaScript library, with front and back camera switch, also have take photo function.","main":"dist/index.js","types":"dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/eduardosmarcal/webcam-easy.git"},"homepage":"https://bensonruan.com/how-to-access-webcam-and-take-photo-with-javascript","keywords":["webcam","camera","getUserMedia","streaming","frontCamera","backCamera"],"author":{"name":"Eduardo S. Marçal"},"contributors":[{"name":"Benson Ruan"}],"license":"MIT","gitHead":"4c5c41d08f9629f2ecbcedb4c63ac213a44319f7","bugs":{"url":"https://github.com/eduardosmarcal/webcam-easy/issues"},"_id":"@eduardosmarcal/webcam-easy@2.0.1","_nodeVersion":"16.14.2","_npmVersion":"8.7.0","dist":{"integrity":"sha512-jI4aJQ255gD/Jbkh/ZkSB8bpymvSD4+nsPsLmYuJZ27BPS1pvy50yO0/Gc69gxkigLkSnxaRkGgC0lUjDtX0Cg==","shasum":"119318f92abce0601dbbfd87451cb8feb768a9e7","tarball":"https://registry.npmjs.org/@eduardosmarcal/webcam-easy/-/webcam-easy-2.0.1.tgz","fileCount":14,"unpackedSize":35774,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDVUIN4Q2QDsFFDSldzbrIM3q6v/fGwLaXnWWUEMFtPCwIgVQ/8kp8CsgKrnWQLDCGKfDzflZpi+s3U63UxqfI32t0="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjOyY8ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrc4Q/8C3VT3NFVj9iHDzWO22slGtUFd6D1OpjDA5HZ/Uph5GqwtPfq\r\nZzMkU2PZOySd4c/5HK+1yr2Wpvh0c4vJC8knTZEyRSVwqy88+kvxONXtl+kG\r\nsnjes1OELQ7f5bWvMkY+tleQSGQEckaevRabIdQI5eInl3AXN7jFbAHUdTDY\r\n2w1wQJJdFzlLeBHjkHEV5vXQTVZEr6/zCUdeFv+VAaifqaRXroopVXH4iXDj\r\nMvbmzcVLi3lgx7CvpbblCLFd48c1Z7NjAZZ4x3BP/9kpn2ARfD4GZfT0KAYs\r\n7ZTL/IOoByUTgdHpPQ8NdpgDfr0y33LCSRne6iNnoiSvD7HoafpwrThqK3IZ\r\nSAusP6Eo+Wo4qHNRYOtN/eTpEurwFyDxBGmiXpV2FEtwWrc5uuNUsvbxPkwn\r\nfwoVilLLexaOdAq8mrwBoD/Ma7MjoduOp2ekRxx41lrE5OYBw2HC+WtmoeJ2\r\nq8RT7pFIZSTnSrCbS3ItUUjFPZqpSK//df8NzD3LQ+BJDYZO96Zu0lAEJCnQ\r\n/lOGBjIvQWxCDx/qpmB56KiFO2gWBAUd8h9W33zufBhyM0ZF+gHH0HWEzLjT\r\nmyKa4xMKg3p6Bh0TW5nKDOX+qJdF7to6sIewKgd0EO0mQlkZVldOf/91ZZZx\r\nzNrX5U4EsH3f8f9OUscjZAqGXE2iGFC5Z8Q=\r\n=7J4m\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"eduardosmarcal","email":"eduardosorokin@gmail.com"},"directories":{},"maintainers":[{"name":"eduardosmarcal","email":"eduardosorokin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/webcam-easy_2.0.1_1664820795999_0.7099693310299313"},"_hasShrinkwrap":false},"2.0.2":{"name":"@eduardosmarcal/webcam-easy","version":"2.0.2","description":"HTML5 webcam streaming TypeScript/JavaScript library, with front and back camera switch, also have take photo function.","main":"dist/index.js","types":"dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/eduardosmarcal/webcam-easy.git"},"homepage":"https://bensonruan.com/how-to-access-webcam-and-take-photo-with-javascript","keywords":["webcam","camera","getUserMedia","streaming","frontCamera","backCamera"],"author":{"name":"Eduardo S. Marçal"},"contributors":[{"name":"Benson Ruan"}],"license":"MIT","gitHead":"55eee9f377ea088d1230c3367fdc58df6f28e591","bugs":{"url":"https://github.com/eduardosmarcal/webcam-easy/issues"},"_id":"@eduardosmarcal/webcam-easy@2.0.2","_nodeVersion":"16.14.2","_npmVersion":"8.7.0","dist":{"integrity":"sha512-V7kie5omr3LCQOWudoEiMovgWygaqDFtyeubdtgkl+xZ4dK0vtpAivSDnL+hOq7ne031wJ/T70ztKkGN59Ar0g==","shasum":"1cffda803e8fb6cc8d2b5c446ed3584d1ca18716","tarball":"https://registry.npmjs.org/@eduardosmarcal/webcam-easy/-/webcam-easy-2.0.2.tgz","fileCount":17,"unpackedSize":36851,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAKhnYm1JHO9aamFQKCPCxv3n+073a663Tl3zMJc7k4xAiEAliwLQ89Qlqlc/5ex3UZQJwbULKqLQuNRFL2kS3FCd58="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjOyg7ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmryTw//W+8IZR6bIFW86S609hC3jEPfR1eXUoYkmekaFIAS2pdTqA06\r\nFPxxF/xOcnq4euw1exJD5UBLc72ftFTJbkoP3FRifpHyPGi/dorOA70a65wN\r\nRC9ou79UlTJmoOLMHZJWlAbpG77fZjVeUOxxqkKmaG06N1vcMu6Y4VoRqdr8\r\nuCj9FtNPXwJbzZ3EqUOCZwRpZf0rqRj7eXWsz7qsGpU1i81U0tKRO8Yv9vv+\r\nmwRXeVgzx6k15Xh/AsUtG2hgTmRgqA5rNtiPujy4mqgWWhXRAegZaUJFo65k\r\nWEG/AYbM6tFTq5TcAwmY/wf0cpJvnJhvv+hzJLLoJlFSQ5EEiyNqr3MAvANs\r\nQL8h5DfucRq+Qk57L2RVo0KczeWk2s7mM8u/mTcju9Q0X7FSoT4gwNxW6qqn\r\nJjY2lcBhPtKOnKYWWJCaBC4ezXkmGgBg/H7MG4bNH1yuf+t9TlYBb6gCBEfp\r\nb4UbGYlFtdvUQ8DyqLvVg6DTl9t9mzhSdAyDYQpWM5i8kdtx7EmV+OXp4yMD\r\ny0b5mSzj998Q3jkZaP3hHW0sHHFwY7MDLZlrLWPIa3kjzjiNVsCdeTOw0I1c\r\nYM6WLA+LJAFY2G1proHo/uOak3WkJjF8f3aPWHmfjpOv1uP4POfJ3zbZbRd4\r\nnZlB2Fc9OWhxmwrcH+C0phOGPjtJhFRWKZs=\r\n=IwG9\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"eduardosmarcal","email":"eduardosorokin@gmail.com"},"directories":{},"maintainers":[{"name":"eduardosmarcal","email":"eduardosorokin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/webcam-easy_2.0.2_1664821307663_0.008829352987783423"},"_hasShrinkwrap":false},"2.0.3":{"name":"@eduardosmarcal/webcam-easy","version":"2.0.3","description":"HTML5 webcam streaming TypeScript/JavaScript library, with front and back camera switch, also have take photo function.","main":"dist/index.js","types":"dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/eduardosmarcal/webcam-easy.git"},"homepage":"https://bensonruan.com/how-to-access-webcam-and-take-photo-with-javascript","keywords":["webcam","camera","getUserMedia","streaming","frontCamera","backCamera"],"author":{"name":"Eduardo S. Marçal"},"contributors":[{"name":"Benson Ruan"}],"license":"MIT","gitHead":"698df03af34752b1c8057b26eb19e2955e403b31","bugs":{"url":"https://github.com/eduardosmarcal/webcam-easy/issues"},"_id":"@eduardosmarcal/webcam-easy@2.0.3","_nodeVersion":"16.14.2","_npmVersion":"8.7.0","dist":{"integrity":"sha512-2RpV6xFvjXIgEKUffb3ydZZ023p5Au6q4vkewDy7MEwhgGNzd04ZwK7JsuUJSlq0kbyLMGgXXHiJKlX6EEX5Lg==","shasum":"e1b140e3f91be726ee55e01e099ba9f0e0019c33","tarball":"https://registry.npmjs.org/@eduardosmarcal/webcam-easy/-/webcam-easy-2.0.3.tgz","fileCount":17,"unpackedSize":37124,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBHMOQvDxty/Hv0tMaw0Hd1XF7i56wcmt5fNOa0ZtlMMAiBhaiFNGU1km+Is6W9PLZgqyJxtTCchZkFPEBokqKfrRg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjOysPACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqDRA//Th4+ehPoj6Wbz1UCRkfj+aERzRlMBAoKeSXOPZa+o76VLG8I\r\npmenTnwpHPkphrkGHBtIB2pmKenW7Ad6APmeu756JXNcvm/LwnSUu5s4NwOt\r\nWjrNZHno3qj6oKkp6sTgfeP4IHNYlRAv0BA5gPANvL4+uKxaZHHV6SbM9MWF\r\nOwngGvqoCDYizPFfqXdyaBqIbUWnNQjXgKdcfFTAnEjMDBlmbZ3hovRUdL1x\r\n8mhdQtUwjeHmO6Ywi/jLMttSapdj6+DKDUCo2EQv5XFajzXEihw8OoVuyEeB\r\nXGQNrERvgwsbFcm/98yWhpqWS/6jRokZbQpPT0BM2CCL3dsOLYX9rKIzgyl0\r\ncV6bk/+y97JQ29X+Dly2QzYZEbF0f07B9ZL+zQi4FdwlpEf76+BvuhDdZZm1\r\n5PTx7xOioVSQFTWGkbNvM9FFOiBeyzMbZkEGkPzlD9nZU+onvuD1jE2xvQEz\r\nlKpuwwVs/vkuuf9SkkGblTh8rPKXu/koXXpuVnm5Z9YbTVxBr+6q9TZy9Rib\r\n2xJlKfXDjG2a5p1JpCniNctxZgtzCAxNv3/wSQ7fi5QAiR6LFsMT+4GIYybc\r\neKa7EHWxwcRPNN1D9W3olG0wlg8lm+ongUfF3cyMdAYP8WD5mglqBP2NMrBi\r\nSqpGwrbzSQ1pw+wbkYns9DqlqkVySKhwOf4=\r\n=gXim\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"eduardosmarcal","email":"eduardosorokin@gmail.com"},"directories":{},"maintainers":[{"name":"eduardosmarcal","email":"eduardosorokin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/webcam-easy_2.0.3_1664822030911_0.7655486802042764"},"_hasShrinkwrap":false}},"time":{"created":"2022-05-17T15:10:35.066Z","1.1.0":"2022-05-17T15:10:35.295Z","modified":"2022-10-03T18:33:51.167Z","2.0.0":"2022-08-22T19:30:36.930Z","2.0.1":"2022-10-03T18:13:16.260Z","2.0.2":"2022-10-03T18:21:47.860Z","2.0.3":"2022-10-03T18:33:51.097Z"},"maintainers":[{"name":"eduardosmarcal","email":"eduardosorokin@gmail.com"}],"description":"HTML5 webcam streaming TypeScript/JavaScript library, with front and back camera switch, also have take photo function.","homepage":"https://bensonruan.com/how-to-access-webcam-and-take-photo-with-javascript","keywords":["webcam","camera","getUserMedia","streaming","frontCamera","backCamera"],"repository":{"type":"git","url":"git+https://github.com/eduardosmarcal/webcam-easy.git"},"contributors":[{"name":"Benson Ruan"}],"author":{"name":"Eduardo S. Marçal"},"bugs":{"url":"https://github.com/eduardosmarcal/webcam-easy/issues"},"license":"MIT","readme":"# Webcam Easy TS/JS\nThis is a TypeScript/JavaScript library for accessing webcam stream and taking photos.\n\nYou can easily add it as a module to your own app.\n\n- Streaming webcam on desktop computer or mobile\n- Switch back or front cameras on mobile\n- Take pictures and be able to download.\n\n## Live Demo\n**[https://bensonruan.com/how-to-access-webcam-and-take-photo-with-javascript/](https://bensonruan.com/how-to-access-webcam-and-take-photo-with-javascript/)**\n\n![webcam-easy-demo](https://bensonruan.com/wp-content/uploads/2020/04/webcam-easy-demo-ok.gif)\n\n## Installation\n\n#### Use Git Clone\n``` shell\ngit clone https://github.com/eduardosmarcal/webcam-easy.git\n```\n\n#### OR Use NPM\n``` shell\nnpm install @eduardosmarcal/webcam-easy\n```\n\n## Usage\n\n#### 1. Include script tag in html <head>\n```html\n<script type=\"text/javascript\" src=\"https://unpkg.com/@eduardosmarcal/webcam-easy/dist/webcam-easy.min.js\"></script>\n```\n    or import into typescript/javascript\n``` js\nimport Webcam from '@eduardosmarcal/webcam-easy';\n```\n\n\n#### 2. Place elements in HTML\n```html\n<video id=\"webcam\" autoplay playsinline width=\"640\" height=\"480\"></video>\n<canvas id=\"canvas\" style=\"display: none;\"></canvas>\n<audio id=\"snapSound\" src=\"audio/snap.wav\" preload=\"auto\"></audio>\n```\n\n#### 3. Call constructor in javascript\n``` js\nconst webcamElement = document.getElementById('webcam');\nconst canvasElement = document.getElementById('canvas');\nconst snapSoundElement = document.getElementById('snapSound');\nconst webcam = new Webcam(webcamElement, 'user', canvasElement, snapSoundElement);\n```\n\n#### 4. Start Webcam \n``` js\nwebcam.start()\n   .then(result =>{\n      console.log(\"webcam started\");\n   })\n   .catch(err => {\n       console.log(err);\n   });\n```\n\n#### 5. Take Photo\n``` js\nlet picture = webcam.snap();\n``` \n\n#### 6. Stop Webcam \n``` js\nwebcam.stop();\n```\n\n## Functions\n- start(startStream) : start streaming webcam \n  - get permission from user\n  - get all video input devices info\n  - select camera based on facingMode \n  - start stream\n  \n  startStream is optional parameter, default value is true\n      \n- stop() : stop streaming webcam\n  \n- stream() : start streaming webcam to video element\n  \n- snap() : take photo from webcam\n  \n- flip() : change Facing mode and selected camera\n\n## Properties\n\n- facingMode : 'user' or 'environment'\n- webcamList : all available camera device\n- webcamCount : number of available camera device\n","readmeFilename":"README.md"}