Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ember-webrtc-devices

Package Overview
Dependencies
Maintainers
4
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-webrtc-devices - npm Package Compare versions

Comparing version 5.0.0 to 5.1.0

5

addon/mixins/device-enumeration.js

@@ -96,3 +96,6 @@ /* global _, $ */

updateDefaultDevices (/* devices */) {
throw new Error('updateDefaultDevices should be overridden - do you need to save preferences or change video stream?');
const extended = !!this._super(...arguments);
if (!extended) {
throw new Error('updateDefaultDevices should be overridden - do you need to save preferences or change video stream?');
}
},

@@ -99,0 +102,0 @@

2

coverage/coverage-final.json
{
"addon/mixins/device-enumeration.js":{"path":"addon/mixins/device-enumeration.js","s":{"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1,"8":1,"9":1,"10":0,"11":1,"12":0,"13":3,"14":3,"15":3,"16":3,"17":3,"18":3,"19":3,"20":1,"21":1,"22":0,"23":1,"24":1,"25":1,"26":1,"27":0,"28":10,"29":10,"30":10,"31":7,"32":7,"33":10,"34":10,"35":30,"36":10,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":1,"45":8,"46":8,"47":8,"48":8,"49":8,"50":8,"51":2,"52":8,"53":10,"54":10,"55":6,"56":4,"57":4,"58":4,"59":4,"60":4,"61":4,"62":4,"63":4,"64":2,"65":2,"66":2,"67":2,"68":4,"69":4,"70":4,"71":4,"72":4,"73":4,"74":0,"75":0,"76":0,"77":0,"78":0,"79":4,"80":2,"81":4,"82":4,"83":0,"84":0,"85":4,"86":4,"87":4,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0,"97":4,"98":4,"99":4,"100":4,"101":2,"102":0,"103":2,"104":2,"105":1,"106":1,"107":0,"108":0,"109":0,"110":0,"111":0,"112":0,"113":0,"114":0,"115":1,"116":1,"117":1,"118":1,"119":1,"120":0},"b":{"1":[1,1,0],"2":[1,1],"3":[0,1],"4":[0,0],"5":[0,1],"6":[3,3,3],"7":[3,1],"8":[3,1,1],"9":[0,1],"10":[1,1,0],"11":[1,0],"12":[10,10],"13":[0,10],"14":[10,10,4],"15":[0,0],"16":[2,6],"17":[6,4],"18":[10,6],"19":[2,0],"20":[2,0],"21":[2,2],"22":[4,0],"23":[4,0],"24":[4,4],"25":[0,0],"26":[0,0],"27":[2,2],"28":[0,4],"29":[4,0],"30":[0,0],"31":[0,0],"32":[0,0],"33":[4,0],"34":[4,4],"35":[0,2],"36":[2,2,2],"37":[1,1],"38":[0,1],"39":[0,0],"40":[1,0]},"f":{"1":3,"2":3,"3":3,"4":1,"5":10,"6":7,"7":30,"8":0,"9":0,"10":1,"11":8,"12":10,"13":2,"14":4,"15":0,"16":4,"17":0,"18":4,"19":2,"20":0,"21":0,"22":0,"23":0,"24":0,"25":1},"fnMap":{"1":{"name":"(anonymous_1)","line":31,"loc":{"start":{"line":26,"column":39},"end":{"line":26,"column":51}}},"2":{"name":"(anonymous_2)","line":32,"loc":{"start":{"line":27,"column":44},"end":{"line":27,"column":51}}},"3":{"name":"(anonymous_3)","line":44,"loc":{"start":{"line":37,"column":29},"end":{"line":37,"column":41}}},"4":{"name":"(anonymous_4)","line":53,"loc":{"start":{"line":46,"column":49},"end":{"line":46,"column":61}}},"5":{"name":"init","line":74,"loc":{"start":{"line":67,"column":7},"end":{"line":67,"column":10}}},"6":{"name":"(anonymous_6)","line":78,"loc":{"start":{"line":69,"column":33},"end":{"line":69,"column":45}}},"7":{"name":"(anonymous_7)","line":84,"loc":{"start":{"line":75,"column":34},"end":{"line":75,"column":38}}},"8":{"name":"(anonymous_8)","line":89,"loc":{"start":{"line":79,"column":58},"end":{"line":79,"column":64}}},"9":{"name":"willDestroy","line":96,"loc":{"start":{"line":86,"column":14},"end":{"line":86,"column":17}}},"10":{"name":"updateDefaultDevices","line":105,"loc":{"start":{"line":95,"column":23},"end":{"line":95,"column":39}}},"11":{"name":"enumerateResolutions","line":109,"loc":{"start":{"line":99,"column":23},"end":{"line":99,"column":26}}},"12":{"name":"enumerateDevices","line":170,"loc":{"start":{"line":160,"column":19},"end":{"line":160,"column":22}}},"13":{"name":"addCamera","line":187,"loc":{"start":{"line":175,"column":22},"end":{"line":175,"column":51}}},"14":{"name":"addMicrophone","line":194,"loc":{"start":{"line":182,"column":26},"end":{"line":182,"column":55}}},"15":{"name":"addOutputDevice","line":201,"loc":{"start":{"line":189,"column":28},"end":{"line":189,"column":50}}},"16":{"name":"(anonymous_16)","line":215,"loc":{"start":{"line":203,"column":65},"end":{"line":203,"column":78}}},"17":{"name":"(anonymous_17)","line":226,"loc":{"start":{"line":214,"column":24},"end":{"line":214,"column":36}}},"18":{"name":"(anonymous_18)","line":248,"loc":{"start":{"line":236,"column":13},"end":{"line":236,"column":20}}},"19":{"name":"setOutputDevice","line":257,"loc":{"start":{"line":245,"column":18},"end":{"line":245,"column":31}}},"20":{"name":"(anonymous_20)","line":268,"loc":{"start":{"line":256,"column":30},"end":{"line":256,"column":49}}},"21":{"name":"(anonymous_21)","line":270,"loc":{"start":{"line":258,"column":22},"end":{"line":258,"column":22}}},"22":{"name":"(anonymous_22)","line":276,"loc":{"start":{"line":262,"column":14},"end":{"line":262,"column":26}}},"23":{"name":"(anonymous_23)","line":278,"loc":{"start":{"line":264,"column":14},"end":{"line":264,"column":20}}},"24":{"name":"(anonymous_24)","line":280,"loc":{"start":{"line":266,"column":15},"end":{"line":266,"column":24}}},"25":{"name":"setDefaultOutputDevice","line":289,"loc":{"start":{"line":275,"column":25},"end":{"line":275,"column":30}}}},"statementMap":{"1":{"end":{"column":0,"line":0},"skip":true,"start":{"column":0,"line":0}},"2":{"end":{"column":0,"line":0},"skip":true,"start":{"column":0,"line":0}},"3":{"end":{"column":0,"line":0},"skip":true,"start":{"column":0,"line":0}},"4":{"end":{"column":0,"line":0},"skip":true,"start":{"column":0,"line":0}},"5":{"start":{"line":7,"column":0},"end":{"line":7,"column":52}},"6":{"start":{"line":8,"column":0},"end":{"line":8,"column":74}},"7":{"start":{"line":9,"column":0},"end":{"line":9,"column":67}},"8":{"start":{"line":10,"column":0},"end":{"line":10,"column":20}},"9":{"start":{"line":11,"column":0},"end":{"line":15,"column":1}},"10":{"start":{"line":12,"column":2},"end":{"line":12,"column":102}},"11":{"start":{"line":13,"column":7},"end":{"line":15,"column":1}},"12":{"start":{"line":14,"column":2},"end":{"line":14,"column":69}},"13":{"start":{"line":27,"column":4},"end":{"line":27,"column":87}},"14":{"end":{"column":0,"line":0},"skip":true,"start":{"column":0,"line":0}},"15":{"start":{"line":38,"column":4},"end":{"line":38,"column":40}},"16":{"start":{"line":39,"column":4},"end":{"line":39,"column":112}},"17":{"start":{"line":40,"column":4},"end":{"line":40,"column":105}},"18":{"start":{"line":41,"column":4},"end":{"line":41,"column":53}},"19":{"start":{"line":43,"column":4},"end":{"line":43,"column":19}},"20":{"start":{"line":47,"column":4},"end":{"line":47,"column":58}},"21":{"start":{"line":48,"column":4},"end":{"line":50,"column":5}},"22":{"start":{"line":49,"column":6},"end":{"line":49,"column":19}},"23":{"start":{"line":52,"column":4},"end":{"line":52,"column":52}},"24":{"start":{"line":53,"column":4},"end":{"line":53,"column":128}},"25":{"start":{"line":54,"column":4},"end":{"line":56,"column":5}},"26":{"start":{"line":55,"column":6},"end":{"line":55,"column":19}},"27":{"start":{"line":57,"column":4},"end":{"line":57,"column":16}},"28":{"end":{"column":0,"line":0},"skip":true,"start":{"column":0,"line":0}},"29":{"start":{"line":68,"column":4},"end":{"line":68,"column":30}},"30":{"start":{"line":69,"column":4},"end":{"line":72,"column":7}},"31":{"start":{"line":70,"column":6},"end":{"line":70,"column":30}},"32":{"start":{"line":71,"column":6},"end":{"line":71,"column":34}},"33":{"start":{"line":73,"column":4},"end":{"line":73,"column":40}},"34":{"start":{"line":75,"column":4},"end":{"line":75,"column":48}},"35":{"end":{"column":0,"line":0},"skip":true,"start":{"column":0,"line":0}},"36":{"start":{"line":77,"column":4},"end":{"line":83,"column":5}},"37":{"start":{"line":79,"column":6},"end":{"line":82,"column":9}},"38":{"start":{"line":80,"column":8},"end":{"line":80,"column":51}},"39":{"start":{"line":81,"column":8},"end":{"line":81,"column":61}},"40":{"start":{"line":87,"column":4},"end":{"line":87,"column":47}},"41":{"start":{"line":88,"column":4},"end":{"line":90,"column":5}},"42":{"start":{"line":89,"column":6},"end":{"line":89,"column":24}},"43":{"start":{"line":92,"column":4},"end":{"line":92,"column":30}},"44":{"start":{"line":96,"column":4},"end":{"line":96,"column":123}},"45":{"start":{"line":100,"column":4},"end":{"line":100,"column":51}},"46":{"start":{"line":101,"column":4},"end":{"line":110,"column":8}},"47":{"start":{"line":112,"column":4},"end":{"line":121,"column":8}},"48":{"start":{"line":123,"column":4},"end":{"line":140,"column":7}},"49":{"start":{"line":141,"column":4},"end":{"line":141,"column":31}},"50":{"start":{"line":144,"column":4},"end":{"line":155,"column":5}},"51":{"start":{"line":145,"column":6},"end":{"line":154,"column":10}},"52":{"start":{"line":156,"column":4},"end":{"line":156,"column":23}},"53":{"end":{"column":0,"line":0},"skip":true,"start":{"column":0,"line":0}},"54":{"start":{"line":161,"column":4},"end":{"line":163,"column":5}},"55":{"start":{"line":162,"column":6},"end":{"line":162,"column":33}},"56":{"start":{"line":164,"column":4},"end":{"line":164,"column":24}},"57":{"start":{"line":165,"column":4},"end":{"line":165,"column":28}},"58":{"start":{"line":166,"column":4},"end":{"line":166,"column":30}},"59":{"start":{"line":167,"column":4},"end":{"line":167,"column":23}},"60":{"start":{"line":168,"column":4},"end":{"line":168,"column":27}},"61":{"start":{"line":169,"column":4},"end":{"line":169,"column":29}},"62":{"start":{"line":170,"column":4},"end":{"line":173,"column":6}},"63":{"start":{"line":175,"column":4},"end":{"line":181,"column":6}},"64":{"start":{"line":176,"column":6},"end":{"line":178,"column":7}},"65":{"start":{"line":177,"column":8},"end":{"line":177,"column":116}},"66":{"start":{"line":179,"column":6},"end":{"line":179,"column":90}},"67":{"start":{"line":180,"column":6},"end":{"line":180,"column":48}},"68":{"start":{"line":182,"column":4},"end":{"line":188,"column":6}},"69":{"start":{"line":183,"column":6},"end":{"line":185,"column":7}},"70":{"start":{"line":184,"column":8},"end":{"line":184,"column":124}},"71":{"start":{"line":186,"column":6},"end":{"line":186,"column":84}},"72":{"start":{"line":187,"column":6},"end":{"line":187,"column":52}},"73":{"start":{"line":189,"column":4},"end":{"line":197,"column":6}},"74":{"start":{"line":190,"column":6},"end":{"line":192,"column":7}},"75":{"start":{"line":191,"column":8},"end":{"line":191,"column":15}},"76":{"start":{"line":193,"column":6},"end":{"line":195,"column":7}},"77":{"start":{"line":194,"column":8},"end":{"line":194,"column":112}},"78":{"start":{"line":196,"column":6},"end":{"line":196,"column":54}},"79":{"start":{"line":200,"column":4},"end":{"line":202,"column":5}},"80":{"start":{"line":201,"column":6},"end":{"line":201,"column":38}},"81":{"start":{"line":203,"column":4},"end":{"line":242,"column":7}},"82":{"start":{"line":204,"column":6},"end":{"line":229,"column":7}},"83":{"start":{"line":205,"column":8},"end":{"line":205,"column":42}},"84":{"start":{"line":206,"column":8},"end":{"line":206,"column":37}},"85":{"start":{"line":208,"column":8},"end":{"line":208,"column":41}},"86":{"start":{"line":209,"column":8},"end":{"line":212,"column":11}},"87":{"start":{"line":214,"column":8},"end":{"line":228,"column":11}},"88":{"start":{"line":215,"column":10},"end":{"line":218,"column":12}},"89":{"start":{"line":219,"column":10},"end":{"line":219,"column":52}},"90":{"start":{"line":221,"column":10},"end":{"line":227,"column":11}},"91":{"start":{"line":222,"column":12},"end":{"line":222,"column":48}},"92":{"start":{"line":223,"column":17},"end":{"line":227,"column":11}},"93":{"start":{"line":224,"column":12},"end":{"line":224,"column":50}},"94":{"start":{"line":225,"column":17},"end":{"line":227,"column":11}},"95":{"start":{"line":226,"column":12},"end":{"line":226,"column":44}},"96":{"start":{"line":231,"column":6},"end":{"line":235,"column":9}},"97":{"start":{"line":237,"column":6},"end":{"line":240,"column":7}},"98":{"start":{"line":238,"column":8},"end":{"line":238,"column":32}},"99":{"start":{"line":239,"column":8},"end":{"line":239,"column":42}},"100":{"start":{"line":241,"column":6},"end":{"line":241,"column":35}},"101":{"start":{"line":246,"column":4},"end":{"line":248,"column":5}},"102":{"start":{"line":247,"column":6},"end":{"line":247,"column":59}},"103":{"start":{"line":250,"column":4},"end":{"line":250,"column":90}},"104":{"start":{"line":251,"column":4},"end":{"line":253,"column":5}},"105":{"start":{"line":252,"column":6},"end":{"line":252,"column":79}},"106":{"start":{"line":255,"column":4},"end":{"line":272,"column":5}},"107":{"start":{"line":256,"column":6},"end":{"line":268,"column":9}},"108":{"start":{"line":257,"column":8},"end":{"line":261,"column":9}},"109":{"start":{"line":258,"column":10},"end":{"line":258,"column":38}},"110":{"end":{"column":0,"line":0},"skip":true,"start":{"column":0,"line":0}},"111":{"start":{"line":260,"column":10},"end":{"line":260,"column":20}},"112":{"start":{"line":263,"column":8},"end":{"line":263,"column":38}},"113":{"start":{"line":265,"column":8},"end":{"line":265,"column":65}},"114":{"start":{"line":267,"column":8},"end":{"line":267,"column":69}},"115":{"start":{"line":270,"column":6},"end":{"line":270,"column":76}},"116":{"start":{"line":271,"column":6},"end":{"line":271,"column":50}},"117":{"start":{"line":276,"column":4},"end":{"line":276,"column":51}},"118":{"start":{"line":277,"column":4},"end":{"line":279,"column":5}},"119":{"start":{"line":278,"column":6},"end":{"line":278,"column":71}},"120":{"start":{"line":280,"column":4},"end":{"line":280,"column":34}}},"branchMap":{"1":{"line":13,"type":"binary-expr","locations":[{"start":{"line":8,"column":18},"end":{"line":8,"column":26}},{"start":{"line":8,"column":30},"end":{"line":8,"column":45}},{"start":{"line":8,"column":49},"end":{"line":8,"column":73}}]},"2":{"line":14,"type":"binary-expr","locations":[{"start":{"line":9,"column":19},"end":{"line":9,"column":25}},{"start":{"line":9,"column":29},"end":{"line":9,"column":66}}]},"3":{"line":16,"type":"if","locations":[{"start":{"line":11,"column":0},"end":{"line":11,"column":0}},{"start":{"line":11,"column":0},"end":{"line":11,"column":0}}]},"4":{"line":17,"type":"binary-expr","locations":[{"start":{"line":12,"column":20},"end":{"line":12,"column":44}},{"start":{"line":12,"column":48},"end":{"line":12,"column":101}}]},"5":{"line":18,"type":"if","locations":[{"start":{"line":13,"column":7},"end":{"line":13,"column":7}},{"start":{"line":13,"column":7},"end":{"line":13,"column":7}}]},"6":{"line":46,"type":"binary-expr","locations":[{"start":{"line":39,"column":16},"end":{"line":39,"column":32}},{"start":{"line":39,"column":36},"end":{"line":39,"column":65}},{"start":{"line":39,"column":69},"end":{"line":39,"column":111}}]},"7":{"line":47,"type":"binary-expr","locations":[{"start":{"line":40,"column":28},"end":{"line":40,"column":47}},{"start":{"line":40,"column":51},"end":{"line":40,"column":104}}]},"8":{"line":48,"type":"binary-expr","locations":[{"start":{"line":41,"column":23},"end":{"line":41,"column":25}},{"start":{"line":41,"column":29},"end":{"line":41,"column":32}},{"start":{"line":41,"column":36},"end":{"line":41,"column":51}}]},"9":{"line":55,"type":"if","locations":[{"start":{"line":48,"column":4},"end":{"line":48,"column":4}},{"start":{"line":48,"column":4},"end":{"line":48,"column":4}}]},"10":{"line":60,"type":"binary-expr","locations":[{"start":{"line":53,"column":23},"end":{"line":53,"column":30}},{"start":{"line":53,"column":34},"end":{"line":53,"column":53}},{"start":{"line":53,"column":57},"end":{"line":53,"column":127}}]},"11":{"line":61,"type":"if","locations":[{"start":{"line":54,"column":4},"end":{"line":54,"column":4}},{"start":{"line":54,"column":4},"end":{"line":54,"column":4}}]},"12":{"line":84,"type":"binary-expr","locations":[{"start":{"line":75,"column":18},"end":{"line":75,"column":29}},{"start":{"line":75,"column":34},"end":{"line":75,"column":46}}]},"13":{"line":88,"type":"if","locations":[{"start":{"line":77,"column":4},"end":{"line":77,"column":4}},{"start":{"line":77,"column":4},"end":{"line":77,"column":4}}]},"14":{"line":88,"type":"binary-expr","locations":[{"start":{"line":77,"column":8},"end":{"line":77,"column":24}},{"start":{"line":77,"column":28},"end":{"line":77,"column":57}},{"start":{"line":78,"column":8},"end":{"line":78,"column":92}}]},"15":{"line":98,"type":"if","locations":[{"start":{"line":88,"column":4},"end":{"line":88,"column":4}},{"start":{"line":88,"column":4},"end":{"line":88,"column":4}}]},"16":{"line":154,"type":"if","locations":[{"start":{"line":144,"column":4},"end":{"line":144,"column":4}},{"start":{"line":144,"column":4},"end":{"line":144,"column":4}}]},"17":{"line":173,"type":"if","locations":[{"start":{"line":161,"column":4},"end":{"line":161,"column":4}},{"start":{"line":161,"column":4},"end":{"line":161,"column":4}}]},"18":{"line":173,"type":"binary-expr","locations":[{"start":{"line":161,"column":8},"end":{"line":161,"column":38}},{"start":{"line":161,"column":42},"end":{"line":161,"column":89}}]},"19":{"line":188,"type":"if","locations":[{"start":{"line":176,"column":6},"end":{"line":176,"column":6}},{"start":{"line":176,"column":6},"end":{"line":176,"column":6}}]},"20":{"line":189,"type":"binary-expr","locations":[{"start":{"line":177,"column":23},"end":{"line":177,"column":35}},{"start":{"line":177,"column":39},"end":{"line":177,"column":115}}]},"21":{"line":191,"type":"binary-expr","locations":[{"start":{"line":179,"column":38},"end":{"line":179,"column":69}},{"start":{"line":179,"column":73},"end":{"line":179,"column":88}}]},"22":{"line":195,"type":"if","locations":[{"start":{"line":183,"column":6},"end":{"line":183,"column":6}},{"start":{"line":183,"column":6},"end":{"line":183,"column":6}}]},"23":{"line":196,"type":"binary-expr","locations":[{"start":{"line":184,"column":23},"end":{"line":184,"column":35}},{"start":{"line":184,"column":39},"end":{"line":184,"column":123}}]},"24":{"line":198,"type":"binary-expr","locations":[{"start":{"line":186,"column":35},"end":{"line":186,"column":63}},{"start":{"line":186,"column":67},"end":{"line":186,"column":82}}]},"25":{"line":202,"type":"if","locations":[{"start":{"line":190,"column":6},"end":{"line":190,"column":6}},{"start":{"line":190,"column":6},"end":{"line":190,"column":6}}]},"26":{"line":205,"type":"if","locations":[{"start":{"line":193,"column":6},"end":{"line":193,"column":6}},{"start":{"line":193,"column":6},"end":{"line":193,"column":6}}]},"27":{"line":212,"type":"if","locations":[{"start":{"line":200,"column":4},"end":{"line":200,"column":4}},{"start":{"line":200,"column":4},"end":{"line":200,"column":4}}]},"28":{"line":216,"type":"if","locations":[{"start":{"line":204,"column":6},"end":{"line":204,"column":6}},{"start":{"line":204,"column":6},"end":{"line":204,"column":6}}]},"29":{"line":216,"type":"binary-expr","locations":[{"start":{"line":204,"column":10},"end":{"line":204,"column":20}},{"start":{"line":204,"column":24},"end":{"line":204,"column":44}}]},"30":{"line":233,"type":"if","locations":[{"start":{"line":221,"column":10},"end":{"line":221,"column":10}},{"start":{"line":221,"column":10},"end":{"line":221,"column":10}}]},"31":{"line":235,"type":"if","locations":[{"start":{"line":223,"column":17},"end":{"line":223,"column":17}},{"start":{"line":223,"column":17},"end":{"line":223,"column":17}}]},"32":{"line":237,"type":"if","locations":[{"start":{"line":225,"column":17},"end":{"line":225,"column":17}},{"start":{"line":225,"column":17},"end":{"line":225,"column":17}}]},"33":{"line":249,"type":"if","locations":[{"start":{"line":237,"column":6},"end":{"line":237,"column":6}},{"start":{"line":237,"column":6},"end":{"line":237,"column":6}}]},"34":{"line":249,"type":"binary-expr","locations":[{"start":{"line":237,"column":10},"end":{"line":237,"column":34}},{"start":{"line":237,"column":38},"end":{"line":237,"column":63}}]},"35":{"line":258,"type":"if","locations":[{"start":{"line":246,"column":4},"end":{"line":246,"column":4}},{"start":{"line":246,"column":4},"end":{"line":246,"column":4}}]},"36":{"line":258,"type":"binary-expr","locations":[{"start":{"line":246,"column":8},"end":{"line":246,"column":34}},{"start":{"line":246,"column":38},"end":{"line":246,"column":76}},{"start":{"line":246,"column":80},"end":{"line":246,"column":104}}]},"37":{"line":263,"type":"if","locations":[{"start":{"line":251,"column":4},"end":{"line":251,"column":4}},{"start":{"line":251,"column":4},"end":{"line":251,"column":4}}]},"38":{"line":267,"type":"if","locations":[{"start":{"line":255,"column":4},"end":{"line":255,"column":4}},{"start":{"line":255,"column":4},"end":{"line":255,"column":4}}]},"39":{"line":269,"type":"if","locations":[{"start":{"line":257,"column":8},"end":{"line":257,"column":8}},{"start":{"line":257,"column":8},"end":{"line":257,"column":8}}]},"40":{"line":291,"type":"if","locations":[{"start":{"line":277,"column":4},"end":{"line":277,"column":4}},{"start":{"line":277,"column":4},"end":{"line":277,"column":4}}]}},"code":["/* global _, $ */","","import Ember from 'ember';","","const { Mixin, RSVP, computed, run } = Ember;","","const UA = window.navigator.userAgent.toLowerCase();","const IS_CHROME = !!window && !!window.chrome && !!window.chrome.webstore;","const IS_FIREFOX = window && typeof InstallTrigger !== 'undefined';","let BROWSER_VERSION;","if (IS_CHROME) {"," BROWSER_VERSION = UA.match(/chrom(e|ium)/) && parseInt(UA.match(/chrom(e|ium)\\/([0-9]+)\\./)[2], 10);","} else if (IS_FIREFOX) {"," BROWSER_VERSION = parseInt(UA.match(/firefox\\/([0-9]+)\\./)[1], 10);","}","","export default Mixin.create({"," // options"," fullHd: false,",""," canListDevices: false,",""," // camera and video stuff"," hasCameraPermission: false,"," cameraList: Ember.A(),"," hasCamera: computed('cameraList.[]', function () {"," return !!_.find(this.get('cameraList'), (camera) => camera.deviceId !== 'default');"," }),",""," // mic and audio stuff"," hasMicPermission: false,"," microphoneList: Ember.A(),"," hasMicrophone: computed.notEmpty('microphoneList'),",""," callCapable: computed.and('audioCallCapable', 'videoCallCapable'),",""," audioCallCapable: computed(function () {"," const PC = window.RTCPeerConnection;"," const gUM = window.navigator && window.navigator.mediaDevices && window.navigator.mediaDevices.getUserMedia;"," const supportWebAudio = window.AudioContext && window.AudioContext.prototype.createMediaStreamSource;"," const support = !!(PC && gUM && supportWebAudio);",""," return support;"," }),",""," videoCallCapable: computed('audioCallCapable', function () {"," const audioCallCapable = this.get('audioCallCapable');"," if (!audioCallCapable) {"," return false;"," }",""," const videoEl = document.createElement('video');"," const supportVp8 = videoEl && videoEl.canPlayType && videoEl.canPlayType('video/webm; codecs=\"vp8\", vorbis') === 'probably';"," if (!supportVp8) {"," return false;"," }"," return true;"," }),",""," outputDeviceList: Ember.A(),"," resolutionList: Ember.A(),",""," canShareScreen: computed.reads('callCapable'),",""," enumerationTimer: null,",""," init () {"," this._super(...arguments);"," const timer = run.next(this, function () {"," this.enumerateDevices();"," this.enumerateResolutions();"," });"," this.set('enumerationTimer', timer);",""," this.lookup = this.lookup || ((key) => key);",""," if (window.navigator && window.navigator.mediaDevices &&"," window.navigator.mediaDevices.constructor.prototype.hasOwnProperty('ondevicechange')) {"," $(window.navigator.mediaDevices).on('devicechange', () => {"," Ember.Logger.debug('onDeviceChange fired');"," Ember.run.debounce(this, this.enumerateDevices, 400);"," });"," }"," },",""," willDestroy () {"," const timer = this.get('enumerationTimer');"," if (timer) {"," run.cancel(timer);"," }",""," this._super(...arguments);"," },",""," updateDefaultDevices (/* devices */) {"," throw new Error('updateDefaultDevices should be overridden - do you need to save preferences or change video stream?');"," },",""," enumerateResolutions () {"," const resolutions = this.get('resolutionList');"," resolutions.pushObject(Ember.Object.create({"," label: this.lookup('webrtcDevices.resolutions.low').toString(),"," presetId: 1,"," constraints: {"," video: {"," width: { max: 320 },"," height: { max: 240 }"," }"," }"," }));",""," resolutions.pushObject(Ember.Object.create({"," label: this.lookup('webrtcDevices.resolutions.medium').toString(),"," presetId: 2,"," constraints: {"," video: {"," width: { max: 640 },"," height: { max: 480 }"," }"," }"," }));",""," const hd = Ember.Object.create({"," label: this.lookup('webrtcDevices.resolutions.high').toString(),"," presetId: 3,"," constraints: {"," video: {"," width: {"," min: 640,"," ideal: 1280,"," max: 1920"," },"," height: {"," min: 480,"," ideal: 720,"," max: 1080"," }"," }"," }"," });"," resolutions.pushObject(hd);",""," // full hd is disabled by default because very few computers actually support this"," if (this.get('fullHd')) {"," resolutions.pushObject(Ember.Object.create({"," label: this.lookup('webrtcDevices.resolutions.fullHd').toString(),"," presetId: 4,"," constraints: {"," video: {"," width: { exact: 1920 },"," height: { exact: 1080 }"," }"," }"," }));"," }"," return resolutions;"," },",""," // Returns a promise which resolves when all devices have been enumerated and loaded"," enumerateDevices () {"," if (!window.navigator.mediaDevices || !window.navigator.mediaDevices.enumerateDevices) {"," return Ember.RSVP.reject();"," }"," let cameraCount = 0;"," let microphoneCount = 0;"," let outputDeviceCount = 0;"," const cameras = [];"," const microphones = [];"," const outputDevices = [];"," const defaultDevice = {"," deviceId: 'default',"," label: this.lookup('webrtcDevices.default').toString()"," };",""," const addCamera = (device, hasBrowserLabel) => {"," if (!hasBrowserLabel) {"," device.label = device.label || this.lookup('webrtcDevices.cameraLabel', {number: ++cameraCount}).toString();"," }"," this.set('hasCameraPermission', this.get('hasCameraPermission') || hasBrowserLabel);"," cameras.push(Ember.Object.create(device));"," };"," const addMicrophone = (device, hasBrowserLabel) => {"," if (!hasBrowserLabel) {"," device.label = device.label || this.lookup('webrtcDevices.microphoneLabel', {number: ++microphoneCount}).toString();"," }"," this.set('hasMicPermission', this.get('hasMicPermission') || hasBrowserLabel);"," microphones.push(Ember.Object.create(device));"," };"," const addOutputDevice = (device, hasLabel) => {"," if (!window.HTMLMediaElement.prototype.hasOwnProperty('setSinkId')) {"," return;"," }"," if (!hasLabel) {"," device.label = this.lookup('webrtcDevices.outputDeviceLabel', {number: ++outputDeviceCount}).toString();"," }"," outputDevices.push(Ember.Object.create(device));"," };",""," // always add a dummy default for video, since the browser doesn't give us one like microphone"," if (this.get('callCapable')) {"," addCamera(defaultDevice, false);"," }"," return window.navigator.mediaDevices.enumerateDevices().then((devices) => {"," if (IS_FIREFOX && BROWSER_VERSION < 42) {"," this.set('canListDevices', false);"," addMicrophone(defaultDevice);"," } else {"," this.set('canListDevices', true);"," this.setProperties({"," hasCameraPermission: false,"," hasMicPermission: false"," });",""," devices.forEach((device) => {"," const deviceInfo = {"," deviceId: device.deviceId,"," label: device.label"," };"," const hasLabel = !_.isEmpty(device.label);",""," if (device.kind === 'audioinput') {"," addMicrophone(deviceInfo, hasLabel);"," } else if (device.kind === 'audiooutput') {"," addOutputDevice(deviceInfo, hasLabel);"," } else if (device.kind === 'videoinput') {"," addCamera(deviceInfo, hasLabel);"," }"," });"," }",""," this.setProperties({"," cameraList: Ember.A(cameras),"," microphoneList: Ember.A(microphones),"," outputDeviceList: Ember.A(outputDevices)"," });"," }).catch(err => {"," if (!this.get('isDestroyed') && !this.get('isDestroying')) {"," Ember.Logger.error(err);"," this.set('canListDevices', false);"," }"," addMicrophone(defaultDevice);"," });"," },",""," setOutputDevice (el, device) {"," if (typeof device !== 'object' || typeof device.deviceId === 'undefined' || device.deviceId === null) {"," return RSVP.Promise.reject('Cannot set null device');"," }",""," const outputDevice = this.get('outputDeviceList').findBy('deviceId', device.deviceId);"," if (!outputDevice) {"," return RSVP.Promise.reject('Cannot set output device: device not found');"," }",""," if (typeof el.setSinkId !== 'undefined') {"," return new RSVP.Promise(function (resolve) {"," if (el.paused) {"," el.onplay = () => resolve();"," } else {"," resolve();"," }"," }).then(function () {"," el.setSinkId(device.deviceId);"," }).then(() => {"," Ember.Logger.log('successfully set audio output device');"," }).catch((err) => {"," Ember.Logger.error('failed to set audio output device', err);"," });"," } else {"," Ember.Logger.error('attempted to set sink id in unsupported browser');"," return RSVP.Promise.reject('Not supported');"," }"," },",""," setDefaultOutputDevice (el) {"," const device = this.get('defaultOutputDevice');"," if (device) {"," return this.setOutputDevice(el, this.get('defaultOutputDevice'));"," }"," return RSVP.Promise.resolve();"," }","});",""],"l":{"0":30,"7":1,"8":1,"9":1,"10":1,"11":1,"12":0,"13":1,"14":0,"27":3,"38":3,"39":3,"40":3,"41":3,"43":3,"47":1,"48":1,"49":0,"52":1,"53":1,"54":1,"55":1,"57":0,"68":10,"69":10,"70":7,"71":7,"73":10,"75":10,"77":10,"79":0,"80":0,"81":0,"87":0,"88":0,"89":0,"92":0,"96":1,"100":8,"101":8,"112":8,"123":8,"141":8,"144":8,"145":2,"156":8,"161":10,"162":6,"164":4,"165":4,"166":4,"167":4,"168":4,"169":4,"170":4,"175":4,"176":2,"177":2,"179":2,"180":2,"182":4,"183":4,"184":4,"186":4,"187":4,"189":4,"190":0,"191":0,"193":0,"194":0,"196":0,"200":4,"201":2,"203":4,"204":4,"205":0,"206":0,"208":4,"209":4,"214":4,"215":0,"219":0,"221":0,"222":0,"223":0,"224":0,"225":0,"226":0,"231":0,"237":4,"238":4,"239":4,"241":4,"246":2,"247":0,"250":2,"251":2,"252":1,"255":1,"256":0,"257":0,"258":0,"260":0,"263":0,"265":0,"267":0,"270":1,"271":1,"276":1,"277":1,"278":1,"280":0}},
"addon/mixins/device-enumeration.js":{"path":"addon/mixins/device-enumeration.js","s":{"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1,"8":1,"9":1,"10":0,"11":1,"12":0,"13":3,"14":3,"15":3,"16":3,"17":3,"18":3,"19":3,"20":1,"21":1,"22":0,"23":1,"24":1,"25":1,"26":1,"27":0,"28":14,"29":14,"30":14,"31":7,"32":7,"33":14,"34":14,"35":30,"36":14,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":2,"45":2,"46":1,"47":8,"48":8,"49":8,"50":8,"51":8,"52":8,"53":2,"54":8,"55":10,"56":10,"57":6,"58":4,"59":4,"60":4,"61":4,"62":4,"63":4,"64":4,"65":4,"66":2,"67":2,"68":2,"69":2,"70":4,"71":4,"72":4,"73":4,"74":4,"75":4,"76":0,"77":0,"78":0,"79":0,"80":0,"81":4,"82":2,"83":4,"84":4,"85":0,"86":0,"87":4,"88":4,"89":4,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":4,"100":4,"101":4,"102":4,"103":2,"104":0,"105":2,"106":2,"107":1,"108":1,"109":0,"110":0,"111":0,"112":0,"113":0,"114":0,"115":0,"116":0,"117":1,"118":1,"119":1,"120":1,"121":1,"122":0},"b":{"1":[1,1,0],"2":[1,1],"3":[0,1],"4":[0,0],"5":[0,1],"6":[3,3,3],"7":[3,1],"8":[3,1,1],"9":[0,1],"10":[1,1,0],"11":[1,0],"12":[14,14],"13":[0,14],"14":[14,14,8],"15":[0,0],"16":[1,1],"17":[2,6],"18":[6,4],"19":[10,6],"20":[2,0],"21":[2,0],"22":[2,2],"23":[4,0],"24":[4,0],"25":[4,4],"26":[0,0],"27":[0,0],"28":[2,2],"29":[0,4],"30":[4,0],"31":[0,0],"32":[0,0],"33":[0,0],"34":[4,0],"35":[4,4],"36":[0,2],"37":[2,2,2],"38":[1,1],"39":[0,1],"40":[0,0],"41":[1,0]},"f":{"1":3,"2":3,"3":3,"4":1,"5":14,"6":7,"7":30,"8":0,"9":0,"10":2,"11":8,"12":10,"13":2,"14":4,"15":0,"16":4,"17":0,"18":4,"19":2,"20":0,"21":0,"22":0,"23":0,"24":0,"25":1},"fnMap":{"1":{"name":"(anonymous_1)","line":31,"loc":{"start":{"line":26,"column":39},"end":{"line":26,"column":51}}},"2":{"name":"(anonymous_2)","line":32,"loc":{"start":{"line":27,"column":44},"end":{"line":27,"column":51}}},"3":{"name":"(anonymous_3)","line":44,"loc":{"start":{"line":37,"column":29},"end":{"line":37,"column":41}}},"4":{"name":"(anonymous_4)","line":53,"loc":{"start":{"line":46,"column":49},"end":{"line":46,"column":61}}},"5":{"name":"init","line":74,"loc":{"start":{"line":67,"column":7},"end":{"line":67,"column":10}}},"6":{"name":"(anonymous_6)","line":78,"loc":{"start":{"line":69,"column":33},"end":{"line":69,"column":45}}},"7":{"name":"(anonymous_7)","line":84,"loc":{"start":{"line":75,"column":34},"end":{"line":75,"column":38}}},"8":{"name":"(anonymous_8)","line":89,"loc":{"start":{"line":79,"column":58},"end":{"line":79,"column":64}}},"9":{"name":"willDestroy","line":96,"loc":{"start":{"line":86,"column":14},"end":{"line":86,"column":17}}},"10":{"name":"updateDefaultDevices","line":105,"loc":{"start":{"line":95,"column":23},"end":{"line":95,"column":39}}},"11":{"name":"enumerateResolutions","line":112,"loc":{"start":{"line":102,"column":23},"end":{"line":102,"column":26}}},"12":{"name":"enumerateDevices","line":173,"loc":{"start":{"line":163,"column":19},"end":{"line":163,"column":22}}},"13":{"name":"addCamera","line":190,"loc":{"start":{"line":178,"column":22},"end":{"line":178,"column":51}}},"14":{"name":"addMicrophone","line":197,"loc":{"start":{"line":185,"column":26},"end":{"line":185,"column":55}}},"15":{"name":"addOutputDevice","line":204,"loc":{"start":{"line":192,"column":28},"end":{"line":192,"column":50}}},"16":{"name":"(anonymous_16)","line":218,"loc":{"start":{"line":206,"column":65},"end":{"line":206,"column":78}}},"17":{"name":"(anonymous_17)","line":229,"loc":{"start":{"line":217,"column":24},"end":{"line":217,"column":36}}},"18":{"name":"(anonymous_18)","line":251,"loc":{"start":{"line":239,"column":13},"end":{"line":239,"column":20}}},"19":{"name":"setOutputDevice","line":260,"loc":{"start":{"line":248,"column":18},"end":{"line":248,"column":31}}},"20":{"name":"(anonymous_20)","line":271,"loc":{"start":{"line":259,"column":30},"end":{"line":259,"column":49}}},"21":{"name":"(anonymous_21)","line":273,"loc":{"start":{"line":261,"column":22},"end":{"line":261,"column":22}}},"22":{"name":"(anonymous_22)","line":279,"loc":{"start":{"line":265,"column":14},"end":{"line":265,"column":26}}},"23":{"name":"(anonymous_23)","line":281,"loc":{"start":{"line":267,"column":14},"end":{"line":267,"column":20}}},"24":{"name":"(anonymous_24)","line":283,"loc":{"start":{"line":269,"column":15},"end":{"line":269,"column":24}}},"25":{"name":"setDefaultOutputDevice","line":292,"loc":{"start":{"line":278,"column":25},"end":{"line":278,"column":30}}}},"statementMap":{"1":{"end":{"column":0,"line":0},"skip":true,"start":{"column":0,"line":0}},"2":{"end":{"column":0,"line":0},"skip":true,"start":{"column":0,"line":0}},"3":{"end":{"column":0,"line":0},"skip":true,"start":{"column":0,"line":0}},"4":{"end":{"column":0,"line":0},"skip":true,"start":{"column":0,"line":0}},"5":{"start":{"line":7,"column":0},"end":{"line":7,"column":52}},"6":{"start":{"line":8,"column":0},"end":{"line":8,"column":74}},"7":{"start":{"line":9,"column":0},"end":{"line":9,"column":67}},"8":{"start":{"line":10,"column":0},"end":{"line":10,"column":20}},"9":{"start":{"line":11,"column":0},"end":{"line":15,"column":1}},"10":{"start":{"line":12,"column":2},"end":{"line":12,"column":102}},"11":{"start":{"line":13,"column":7},"end":{"line":15,"column":1}},"12":{"start":{"line":14,"column":2},"end":{"line":14,"column":69}},"13":{"start":{"line":27,"column":4},"end":{"line":27,"column":87}},"14":{"end":{"column":0,"line":0},"skip":true,"start":{"column":0,"line":0}},"15":{"start":{"line":38,"column":4},"end":{"line":38,"column":40}},"16":{"start":{"line":39,"column":4},"end":{"line":39,"column":112}},"17":{"start":{"line":40,"column":4},"end":{"line":40,"column":105}},"18":{"start":{"line":41,"column":4},"end":{"line":41,"column":53}},"19":{"start":{"line":43,"column":4},"end":{"line":43,"column":19}},"20":{"start":{"line":47,"column":4},"end":{"line":47,"column":58}},"21":{"start":{"line":48,"column":4},"end":{"line":50,"column":5}},"22":{"start":{"line":49,"column":6},"end":{"line":49,"column":19}},"23":{"start":{"line":52,"column":4},"end":{"line":52,"column":52}},"24":{"start":{"line":53,"column":4},"end":{"line":53,"column":128}},"25":{"start":{"line":54,"column":4},"end":{"line":56,"column":5}},"26":{"start":{"line":55,"column":6},"end":{"line":55,"column":19}},"27":{"start":{"line":57,"column":4},"end":{"line":57,"column":16}},"28":{"end":{"column":0,"line":0},"skip":true,"start":{"column":0,"line":0}},"29":{"start":{"line":68,"column":4},"end":{"line":68,"column":30}},"30":{"start":{"line":69,"column":4},"end":{"line":72,"column":7}},"31":{"start":{"line":70,"column":6},"end":{"line":70,"column":30}},"32":{"start":{"line":71,"column":6},"end":{"line":71,"column":34}},"33":{"start":{"line":73,"column":4},"end":{"line":73,"column":40}},"34":{"start":{"line":75,"column":4},"end":{"line":75,"column":48}},"35":{"end":{"column":0,"line":0},"skip":true,"start":{"column":0,"line":0}},"36":{"start":{"line":77,"column":4},"end":{"line":83,"column":5}},"37":{"start":{"line":79,"column":6},"end":{"line":82,"column":9}},"38":{"start":{"line":80,"column":8},"end":{"line":80,"column":51}},"39":{"start":{"line":81,"column":8},"end":{"line":81,"column":61}},"40":{"start":{"line":87,"column":4},"end":{"line":87,"column":47}},"41":{"start":{"line":88,"column":4},"end":{"line":90,"column":5}},"42":{"start":{"line":89,"column":6},"end":{"line":89,"column":24}},"43":{"start":{"line":92,"column":4},"end":{"line":92,"column":30}},"44":{"start":{"line":96,"column":4},"end":{"line":96,"column":49}},"45":{"start":{"line":97,"column":4},"end":{"line":99,"column":5}},"46":{"start":{"line":98,"column":6},"end":{"line":98,"column":125}},"47":{"start":{"line":103,"column":4},"end":{"line":103,"column":51}},"48":{"start":{"line":104,"column":4},"end":{"line":113,"column":8}},"49":{"start":{"line":115,"column":4},"end":{"line":124,"column":8}},"50":{"start":{"line":126,"column":4},"end":{"line":143,"column":7}},"51":{"start":{"line":144,"column":4},"end":{"line":144,"column":31}},"52":{"start":{"line":147,"column":4},"end":{"line":158,"column":5}},"53":{"start":{"line":148,"column":6},"end":{"line":157,"column":10}},"54":{"start":{"line":159,"column":4},"end":{"line":159,"column":23}},"55":{"end":{"column":0,"line":0},"skip":true,"start":{"column":0,"line":0}},"56":{"start":{"line":164,"column":4},"end":{"line":166,"column":5}},"57":{"start":{"line":165,"column":6},"end":{"line":165,"column":33}},"58":{"start":{"line":167,"column":4},"end":{"line":167,"column":24}},"59":{"start":{"line":168,"column":4},"end":{"line":168,"column":28}},"60":{"start":{"line":169,"column":4},"end":{"line":169,"column":30}},"61":{"start":{"line":170,"column":4},"end":{"line":170,"column":23}},"62":{"start":{"line":171,"column":4},"end":{"line":171,"column":27}},"63":{"start":{"line":172,"column":4},"end":{"line":172,"column":29}},"64":{"start":{"line":173,"column":4},"end":{"line":176,"column":6}},"65":{"start":{"line":178,"column":4},"end":{"line":184,"column":6}},"66":{"start":{"line":179,"column":6},"end":{"line":181,"column":7}},"67":{"start":{"line":180,"column":8},"end":{"line":180,"column":116}},"68":{"start":{"line":182,"column":6},"end":{"line":182,"column":90}},"69":{"start":{"line":183,"column":6},"end":{"line":183,"column":48}},"70":{"start":{"line":185,"column":4},"end":{"line":191,"column":6}},"71":{"start":{"line":186,"column":6},"end":{"line":188,"column":7}},"72":{"start":{"line":187,"column":8},"end":{"line":187,"column":124}},"73":{"start":{"line":189,"column":6},"end":{"line":189,"column":84}},"74":{"start":{"line":190,"column":6},"end":{"line":190,"column":52}},"75":{"start":{"line":192,"column":4},"end":{"line":200,"column":6}},"76":{"start":{"line":193,"column":6},"end":{"line":195,"column":7}},"77":{"start":{"line":194,"column":8},"end":{"line":194,"column":15}},"78":{"start":{"line":196,"column":6},"end":{"line":198,"column":7}},"79":{"start":{"line":197,"column":8},"end":{"line":197,"column":112}},"80":{"start":{"line":199,"column":6},"end":{"line":199,"column":54}},"81":{"start":{"line":203,"column":4},"end":{"line":205,"column":5}},"82":{"start":{"line":204,"column":6},"end":{"line":204,"column":38}},"83":{"start":{"line":206,"column":4},"end":{"line":245,"column":7}},"84":{"start":{"line":207,"column":6},"end":{"line":232,"column":7}},"85":{"start":{"line":208,"column":8},"end":{"line":208,"column":42}},"86":{"start":{"line":209,"column":8},"end":{"line":209,"column":37}},"87":{"start":{"line":211,"column":8},"end":{"line":211,"column":41}},"88":{"start":{"line":212,"column":8},"end":{"line":215,"column":11}},"89":{"start":{"line":217,"column":8},"end":{"line":231,"column":11}},"90":{"start":{"line":218,"column":10},"end":{"line":221,"column":12}},"91":{"start":{"line":222,"column":10},"end":{"line":222,"column":52}},"92":{"start":{"line":224,"column":10},"end":{"line":230,"column":11}},"93":{"start":{"line":225,"column":12},"end":{"line":225,"column":48}},"94":{"start":{"line":226,"column":17},"end":{"line":230,"column":11}},"95":{"start":{"line":227,"column":12},"end":{"line":227,"column":50}},"96":{"start":{"line":228,"column":17},"end":{"line":230,"column":11}},"97":{"start":{"line":229,"column":12},"end":{"line":229,"column":44}},"98":{"start":{"line":234,"column":6},"end":{"line":238,"column":9}},"99":{"start":{"line":240,"column":6},"end":{"line":243,"column":7}},"100":{"start":{"line":241,"column":8},"end":{"line":241,"column":32}},"101":{"start":{"line":242,"column":8},"end":{"line":242,"column":42}},"102":{"start":{"line":244,"column":6},"end":{"line":244,"column":35}},"103":{"start":{"line":249,"column":4},"end":{"line":251,"column":5}},"104":{"start":{"line":250,"column":6},"end":{"line":250,"column":59}},"105":{"start":{"line":253,"column":4},"end":{"line":253,"column":90}},"106":{"start":{"line":254,"column":4},"end":{"line":256,"column":5}},"107":{"start":{"line":255,"column":6},"end":{"line":255,"column":79}},"108":{"start":{"line":258,"column":4},"end":{"line":275,"column":5}},"109":{"start":{"line":259,"column":6},"end":{"line":271,"column":9}},"110":{"start":{"line":260,"column":8},"end":{"line":264,"column":9}},"111":{"start":{"line":261,"column":10},"end":{"line":261,"column":38}},"112":{"end":{"column":0,"line":0},"skip":true,"start":{"column":0,"line":0}},"113":{"start":{"line":263,"column":10},"end":{"line":263,"column":20}},"114":{"start":{"line":266,"column":8},"end":{"line":266,"column":38}},"115":{"start":{"line":268,"column":8},"end":{"line":268,"column":65}},"116":{"start":{"line":270,"column":8},"end":{"line":270,"column":69}},"117":{"start":{"line":273,"column":6},"end":{"line":273,"column":76}},"118":{"start":{"line":274,"column":6},"end":{"line":274,"column":50}},"119":{"start":{"line":279,"column":4},"end":{"line":279,"column":51}},"120":{"start":{"line":280,"column":4},"end":{"line":282,"column":5}},"121":{"start":{"line":281,"column":6},"end":{"line":281,"column":71}},"122":{"start":{"line":283,"column":4},"end":{"line":283,"column":34}}},"branchMap":{"1":{"line":13,"type":"binary-expr","locations":[{"start":{"line":8,"column":18},"end":{"line":8,"column":26}},{"start":{"line":8,"column":30},"end":{"line":8,"column":45}},{"start":{"line":8,"column":49},"end":{"line":8,"column":73}}]},"2":{"line":14,"type":"binary-expr","locations":[{"start":{"line":9,"column":19},"end":{"line":9,"column":25}},{"start":{"line":9,"column":29},"end":{"line":9,"column":66}}]},"3":{"line":16,"type":"if","locations":[{"start":{"line":11,"column":0},"end":{"line":11,"column":0}},{"start":{"line":11,"column":0},"end":{"line":11,"column":0}}]},"4":{"line":17,"type":"binary-expr","locations":[{"start":{"line":12,"column":20},"end":{"line":12,"column":44}},{"start":{"line":12,"column":48},"end":{"line":12,"column":101}}]},"5":{"line":18,"type":"if","locations":[{"start":{"line":13,"column":7},"end":{"line":13,"column":7}},{"start":{"line":13,"column":7},"end":{"line":13,"column":7}}]},"6":{"line":46,"type":"binary-expr","locations":[{"start":{"line":39,"column":16},"end":{"line":39,"column":32}},{"start":{"line":39,"column":36},"end":{"line":39,"column":65}},{"start":{"line":39,"column":69},"end":{"line":39,"column":111}}]},"7":{"line":47,"type":"binary-expr","locations":[{"start":{"line":40,"column":28},"end":{"line":40,"column":47}},{"start":{"line":40,"column":51},"end":{"line":40,"column":104}}]},"8":{"line":48,"type":"binary-expr","locations":[{"start":{"line":41,"column":23},"end":{"line":41,"column":25}},{"start":{"line":41,"column":29},"end":{"line":41,"column":32}},{"start":{"line":41,"column":36},"end":{"line":41,"column":51}}]},"9":{"line":55,"type":"if","locations":[{"start":{"line":48,"column":4},"end":{"line":48,"column":4}},{"start":{"line":48,"column":4},"end":{"line":48,"column":4}}]},"10":{"line":60,"type":"binary-expr","locations":[{"start":{"line":53,"column":23},"end":{"line":53,"column":30}},{"start":{"line":53,"column":34},"end":{"line":53,"column":53}},{"start":{"line":53,"column":57},"end":{"line":53,"column":127}}]},"11":{"line":61,"type":"if","locations":[{"start":{"line":54,"column":4},"end":{"line":54,"column":4}},{"start":{"line":54,"column":4},"end":{"line":54,"column":4}}]},"12":{"line":84,"type":"binary-expr","locations":[{"start":{"line":75,"column":18},"end":{"line":75,"column":29}},{"start":{"line":75,"column":34},"end":{"line":75,"column":46}}]},"13":{"line":88,"type":"if","locations":[{"start":{"line":77,"column":4},"end":{"line":77,"column":4}},{"start":{"line":77,"column":4},"end":{"line":77,"column":4}}]},"14":{"line":88,"type":"binary-expr","locations":[{"start":{"line":77,"column":8},"end":{"line":77,"column":24}},{"start":{"line":77,"column":28},"end":{"line":77,"column":57}},{"start":{"line":78,"column":8},"end":{"line":78,"column":92}}]},"15":{"line":98,"type":"if","locations":[{"start":{"line":88,"column":4},"end":{"line":88,"column":4}},{"start":{"line":88,"column":4},"end":{"line":88,"column":4}}]},"16":{"line":107,"type":"if","locations":[{"start":{"line":97,"column":4},"end":{"line":97,"column":4}},{"start":{"line":97,"column":4},"end":{"line":97,"column":4}}]},"17":{"line":157,"type":"if","locations":[{"start":{"line":147,"column":4},"end":{"line":147,"column":4}},{"start":{"line":147,"column":4},"end":{"line":147,"column":4}}]},"18":{"line":176,"type":"if","locations":[{"start":{"line":164,"column":4},"end":{"line":164,"column":4}},{"start":{"line":164,"column":4},"end":{"line":164,"column":4}}]},"19":{"line":176,"type":"binary-expr","locations":[{"start":{"line":164,"column":8},"end":{"line":164,"column":38}},{"start":{"line":164,"column":42},"end":{"line":164,"column":89}}]},"20":{"line":191,"type":"if","locations":[{"start":{"line":179,"column":6},"end":{"line":179,"column":6}},{"start":{"line":179,"column":6},"end":{"line":179,"column":6}}]},"21":{"line":192,"type":"binary-expr","locations":[{"start":{"line":180,"column":23},"end":{"line":180,"column":35}},{"start":{"line":180,"column":39},"end":{"line":180,"column":115}}]},"22":{"line":194,"type":"binary-expr","locations":[{"start":{"line":182,"column":38},"end":{"line":182,"column":69}},{"start":{"line":182,"column":73},"end":{"line":182,"column":88}}]},"23":{"line":198,"type":"if","locations":[{"start":{"line":186,"column":6},"end":{"line":186,"column":6}},{"start":{"line":186,"column":6},"end":{"line":186,"column":6}}]},"24":{"line":199,"type":"binary-expr","locations":[{"start":{"line":187,"column":23},"end":{"line":187,"column":35}},{"start":{"line":187,"column":39},"end":{"line":187,"column":123}}]},"25":{"line":201,"type":"binary-expr","locations":[{"start":{"line":189,"column":35},"end":{"line":189,"column":63}},{"start":{"line":189,"column":67},"end":{"line":189,"column":82}}]},"26":{"line":205,"type":"if","locations":[{"start":{"line":193,"column":6},"end":{"line":193,"column":6}},{"start":{"line":193,"column":6},"end":{"line":193,"column":6}}]},"27":{"line":208,"type":"if","locations":[{"start":{"line":196,"column":6},"end":{"line":196,"column":6}},{"start":{"line":196,"column":6},"end":{"line":196,"column":6}}]},"28":{"line":215,"type":"if","locations":[{"start":{"line":203,"column":4},"end":{"line":203,"column":4}},{"start":{"line":203,"column":4},"end":{"line":203,"column":4}}]},"29":{"line":219,"type":"if","locations":[{"start":{"line":207,"column":6},"end":{"line":207,"column":6}},{"start":{"line":207,"column":6},"end":{"line":207,"column":6}}]},"30":{"line":219,"type":"binary-expr","locations":[{"start":{"line":207,"column":10},"end":{"line":207,"column":20}},{"start":{"line":207,"column":24},"end":{"line":207,"column":44}}]},"31":{"line":236,"type":"if","locations":[{"start":{"line":224,"column":10},"end":{"line":224,"column":10}},{"start":{"line":224,"column":10},"end":{"line":224,"column":10}}]},"32":{"line":238,"type":"if","locations":[{"start":{"line":226,"column":17},"end":{"line":226,"column":17}},{"start":{"line":226,"column":17},"end":{"line":226,"column":17}}]},"33":{"line":240,"type":"if","locations":[{"start":{"line":228,"column":17},"end":{"line":228,"column":17}},{"start":{"line":228,"column":17},"end":{"line":228,"column":17}}]},"34":{"line":252,"type":"if","locations":[{"start":{"line":240,"column":6},"end":{"line":240,"column":6}},{"start":{"line":240,"column":6},"end":{"line":240,"column":6}}]},"35":{"line":252,"type":"binary-expr","locations":[{"start":{"line":240,"column":10},"end":{"line":240,"column":34}},{"start":{"line":240,"column":38},"end":{"line":240,"column":63}}]},"36":{"line":261,"type":"if","locations":[{"start":{"line":249,"column":4},"end":{"line":249,"column":4}},{"start":{"line":249,"column":4},"end":{"line":249,"column":4}}]},"37":{"line":261,"type":"binary-expr","locations":[{"start":{"line":249,"column":8},"end":{"line":249,"column":34}},{"start":{"line":249,"column":38},"end":{"line":249,"column":76}},{"start":{"line":249,"column":80},"end":{"line":249,"column":104}}]},"38":{"line":266,"type":"if","locations":[{"start":{"line":254,"column":4},"end":{"line":254,"column":4}},{"start":{"line":254,"column":4},"end":{"line":254,"column":4}}]},"39":{"line":270,"type":"if","locations":[{"start":{"line":258,"column":4},"end":{"line":258,"column":4}},{"start":{"line":258,"column":4},"end":{"line":258,"column":4}}]},"40":{"line":272,"type":"if","locations":[{"start":{"line":260,"column":8},"end":{"line":260,"column":8}},{"start":{"line":260,"column":8},"end":{"line":260,"column":8}}]},"41":{"line":294,"type":"if","locations":[{"start":{"line":280,"column":4},"end":{"line":280,"column":4}},{"start":{"line":280,"column":4},"end":{"line":280,"column":4}}]}},"code":["/* global _, $ */","","import Ember from 'ember';","","const { Mixin, RSVP, computed, run } = Ember;","","const UA = window.navigator.userAgent.toLowerCase();","const IS_CHROME = !!window && !!window.chrome && !!window.chrome.webstore;","const IS_FIREFOX = window && typeof InstallTrigger !== 'undefined';","let BROWSER_VERSION;","if (IS_CHROME) {"," BROWSER_VERSION = UA.match(/chrom(e|ium)/) && parseInt(UA.match(/chrom(e|ium)\\/([0-9]+)\\./)[2], 10);","} else if (IS_FIREFOX) {"," BROWSER_VERSION = parseInt(UA.match(/firefox\\/([0-9]+)\\./)[1], 10);","}","","export default Mixin.create({"," // options"," fullHd: false,",""," canListDevices: false,",""," // camera and video stuff"," hasCameraPermission: false,"," cameraList: Ember.A(),"," hasCamera: computed('cameraList.[]', function () {"," return !!_.find(this.get('cameraList'), (camera) => camera.deviceId !== 'default');"," }),",""," // mic and audio stuff"," hasMicPermission: false,"," microphoneList: Ember.A(),"," hasMicrophone: computed.notEmpty('microphoneList'),",""," callCapable: computed.and('audioCallCapable', 'videoCallCapable'),",""," audioCallCapable: computed(function () {"," const PC = window.RTCPeerConnection;"," const gUM = window.navigator && window.navigator.mediaDevices && window.navigator.mediaDevices.getUserMedia;"," const supportWebAudio = window.AudioContext && window.AudioContext.prototype.createMediaStreamSource;"," const support = !!(PC && gUM && supportWebAudio);",""," return support;"," }),",""," videoCallCapable: computed('audioCallCapable', function () {"," const audioCallCapable = this.get('audioCallCapable');"," if (!audioCallCapable) {"," return false;"," }",""," const videoEl = document.createElement('video');"," const supportVp8 = videoEl && videoEl.canPlayType && videoEl.canPlayType('video/webm; codecs=\"vp8\", vorbis') === 'probably';"," if (!supportVp8) {"," return false;"," }"," return true;"," }),",""," outputDeviceList: Ember.A(),"," resolutionList: Ember.A(),",""," canShareScreen: computed.reads('callCapable'),",""," enumerationTimer: null,",""," init () {"," this._super(...arguments);"," const timer = run.next(this, function () {"," this.enumerateDevices();"," this.enumerateResolutions();"," });"," this.set('enumerationTimer', timer);",""," this.lookup = this.lookup || ((key) => key);",""," if (window.navigator && window.navigator.mediaDevices &&"," window.navigator.mediaDevices.constructor.prototype.hasOwnProperty('ondevicechange')) {"," $(window.navigator.mediaDevices).on('devicechange', () => {"," Ember.Logger.debug('onDeviceChange fired');"," Ember.run.debounce(this, this.enumerateDevices, 400);"," });"," }"," },",""," willDestroy () {"," const timer = this.get('enumerationTimer');"," if (timer) {"," run.cancel(timer);"," }",""," this._super(...arguments);"," },",""," updateDefaultDevices (/* devices */) {"," const extended = !!this._super(...arguments);"," if (!extended) {"," throw new Error('updateDefaultDevices should be overridden - do you need to save preferences or change video stream?');"," }"," },",""," enumerateResolutions () {"," const resolutions = this.get('resolutionList');"," resolutions.pushObject(Ember.Object.create({"," label: this.lookup('webrtcDevices.resolutions.low').toString(),"," presetId: 1,"," constraints: {"," video: {"," width: { max: 320 },"," height: { max: 240 }"," }"," }"," }));",""," resolutions.pushObject(Ember.Object.create({"," label: this.lookup('webrtcDevices.resolutions.medium').toString(),"," presetId: 2,"," constraints: {"," video: {"," width: { max: 640 },"," height: { max: 480 }"," }"," }"," }));",""," const hd = Ember.Object.create({"," label: this.lookup('webrtcDevices.resolutions.high').toString(),"," presetId: 3,"," constraints: {"," video: {"," width: {"," min: 640,"," ideal: 1280,"," max: 1920"," },"," height: {"," min: 480,"," ideal: 720,"," max: 1080"," }"," }"," }"," });"," resolutions.pushObject(hd);",""," // full hd is disabled by default because very few computers actually support this"," if (this.get('fullHd')) {"," resolutions.pushObject(Ember.Object.create({"," label: this.lookup('webrtcDevices.resolutions.fullHd').toString(),"," presetId: 4,"," constraints: {"," video: {"," width: { exact: 1920 },"," height: { exact: 1080 }"," }"," }"," }));"," }"," return resolutions;"," },",""," // Returns a promise which resolves when all devices have been enumerated and loaded"," enumerateDevices () {"," if (!window.navigator.mediaDevices || !window.navigator.mediaDevices.enumerateDevices) {"," return Ember.RSVP.reject();"," }"," let cameraCount = 0;"," let microphoneCount = 0;"," let outputDeviceCount = 0;"," const cameras = [];"," const microphones = [];"," const outputDevices = [];"," const defaultDevice = {"," deviceId: 'default',"," label: this.lookup('webrtcDevices.default').toString()"," };",""," const addCamera = (device, hasBrowserLabel) => {"," if (!hasBrowserLabel) {"," device.label = device.label || this.lookup('webrtcDevices.cameraLabel', {number: ++cameraCount}).toString();"," }"," this.set('hasCameraPermission', this.get('hasCameraPermission') || hasBrowserLabel);"," cameras.push(Ember.Object.create(device));"," };"," const addMicrophone = (device, hasBrowserLabel) => {"," if (!hasBrowserLabel) {"," device.label = device.label || this.lookup('webrtcDevices.microphoneLabel', {number: ++microphoneCount}).toString();"," }"," this.set('hasMicPermission', this.get('hasMicPermission') || hasBrowserLabel);"," microphones.push(Ember.Object.create(device));"," };"," const addOutputDevice = (device, hasLabel) => {"," if (!window.HTMLMediaElement.prototype.hasOwnProperty('setSinkId')) {"," return;"," }"," if (!hasLabel) {"," device.label = this.lookup('webrtcDevices.outputDeviceLabel', {number: ++outputDeviceCount}).toString();"," }"," outputDevices.push(Ember.Object.create(device));"," };",""," // always add a dummy default for video, since the browser doesn't give us one like microphone"," if (this.get('callCapable')) {"," addCamera(defaultDevice, false);"," }"," return window.navigator.mediaDevices.enumerateDevices().then((devices) => {"," if (IS_FIREFOX && BROWSER_VERSION < 42) {"," this.set('canListDevices', false);"," addMicrophone(defaultDevice);"," } else {"," this.set('canListDevices', true);"," this.setProperties({"," hasCameraPermission: false,"," hasMicPermission: false"," });",""," devices.forEach((device) => {"," const deviceInfo = {"," deviceId: device.deviceId,"," label: device.label"," };"," const hasLabel = !_.isEmpty(device.label);",""," if (device.kind === 'audioinput') {"," addMicrophone(deviceInfo, hasLabel);"," } else if (device.kind === 'audiooutput') {"," addOutputDevice(deviceInfo, hasLabel);"," } else if (device.kind === 'videoinput') {"," addCamera(deviceInfo, hasLabel);"," }"," });"," }",""," this.setProperties({"," cameraList: Ember.A(cameras),"," microphoneList: Ember.A(microphones),"," outputDeviceList: Ember.A(outputDevices)"," });"," }).catch(err => {"," if (!this.get('isDestroyed') && !this.get('isDestroying')) {"," Ember.Logger.error(err);"," this.set('canListDevices', false);"," }"," addMicrophone(defaultDevice);"," });"," },",""," setOutputDevice (el, device) {"," if (typeof device !== 'object' || typeof device.deviceId === 'undefined' || device.deviceId === null) {"," return RSVP.Promise.reject('Cannot set null device');"," }",""," const outputDevice = this.get('outputDeviceList').findBy('deviceId', device.deviceId);"," if (!outputDevice) {"," return RSVP.Promise.reject('Cannot set output device: device not found');"," }",""," if (typeof el.setSinkId !== 'undefined') {"," return new RSVP.Promise(function (resolve) {"," if (el.paused) {"," el.onplay = () => resolve();"," } else {"," resolve();"," }"," }).then(function () {"," el.setSinkId(device.deviceId);"," }).then(() => {"," Ember.Logger.log('successfully set audio output device');"," }).catch((err) => {"," Ember.Logger.error('failed to set audio output device', err);"," });"," } else {"," Ember.Logger.error('attempted to set sink id in unsupported browser');"," return RSVP.Promise.reject('Not supported');"," }"," },",""," setDefaultOutputDevice (el) {"," const device = this.get('defaultOutputDevice');"," if (device) {"," return this.setOutputDevice(el, this.get('defaultOutputDevice'));"," }"," return RSVP.Promise.resolve();"," }","});",""],"l":{"0":30,"7":1,"8":1,"9":1,"10":1,"11":1,"12":0,"13":1,"14":0,"27":3,"38":3,"39":3,"40":3,"41":3,"43":3,"47":1,"48":1,"49":0,"52":1,"53":1,"54":1,"55":1,"57":0,"68":14,"69":14,"70":7,"71":7,"73":14,"75":14,"77":14,"79":0,"80":0,"81":0,"87":0,"88":0,"89":0,"92":0,"96":2,"97":2,"98":1,"103":8,"104":8,"115":8,"126":8,"144":8,"147":8,"148":2,"159":8,"164":10,"165":6,"167":4,"168":4,"169":4,"170":4,"171":4,"172":4,"173":4,"178":4,"179":2,"180":2,"182":2,"183":2,"185":4,"186":4,"187":4,"189":4,"190":4,"192":4,"193":0,"194":0,"196":0,"197":0,"199":0,"203":4,"204":2,"206":4,"207":4,"208":0,"209":0,"211":4,"212":4,"217":4,"218":0,"222":0,"224":0,"225":0,"226":0,"227":0,"228":0,"229":0,"234":0,"240":4,"241":4,"242":4,"244":4,"249":2,"250":0,"253":2,"254":2,"255":1,"258":1,"259":0,"260":0,"261":0,"263":0,"266":0,"268":0,"270":0,"273":1,"274":1,"279":1,"280":1,"281":1,"283":0}},
"addon/components/device-selection/component.js":{"path":"addon/components/device-selection/component.js","s":{"1":1,"2":1,"3":1,"4":1,"5":1,"6":20,"7":20,"8":20,"9":20,"10":19,"11":0,"12":29,"13":29,"14":29,"15":29,"16":29,"17":20,"18":20,"19":19,"20":19,"21":20,"22":1,"23":1,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":31,"41":2,"42":31,"43":2,"44":29,"45":0,"46":32,"47":3,"48":0},"b":{"1":[19,1],"2":[19,1],"3":[20,19],"4":[1,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[0,0],"9":[0,0],"10":[2,29],"11":[2,29],"12":[0,29],"13":[3,29]},"f":{"1":20,"2":20,"3":0,"4":29,"5":20,"6":20,"7":1,"8":0,"9":0,"10":0,"11":0,"12":31,"13":31,"14":29,"15":32,"16":0},"fnMap":{"1":{"name":"didInsertElement","line":34,"loc":{"start":{"line":28,"column":19},"end":{"line":28,"column":22}}},"2":{"name":"(anonymous_2)","line":39,"loc":{"start":{"line":31,"column":36},"end":{"line":31,"column":42}}},"3":{"name":"(anonymous_3)","line":41,"loc":{"start":{"line":33,"column":27},"end":{"line":33,"column":33}}},"4":{"name":"didReceiveAttrs","line":48,"loc":{"start":{"line":40,"column":18},"end":{"line":40,"column":21}}},"5":{"name":"willDestroyElement","line":57,"loc":{"start":{"line":49,"column":21},"end":{"line":49,"column":24}}},"6":{"name":"(anonymous_6)","line":71,"loc":{"start":{"line":63,"column":45},"end":{"line":63,"column":57}}},"7":{"name":"openTroubleshoot","line":76,"loc":{"start":{"line":68,"column":21},"end":{"line":68,"column":24}}},"8":{"name":"playTestSound","line":82,"loc":{"start":{"line":74,"column":18},"end":{"line":74,"column":21}}},"9":{"name":"(anonymous_9)","line":100,"loc":{"start":{"line":90,"column":23},"end":{"line":90,"column":29}}},"10":{"name":"(anonymous_10)","line":102,"loc":{"start":{"line":92,"column":14},"end":{"line":92,"column":20}}},"11":{"name":"(anonymous_11)","line":104,"loc":{"start":{"line":94,"column":14},"end":{"line":94,"column":20}}},"12":{"name":"changeCamera","line":111,"loc":{"start":{"line":101,"column":17},"end":{"line":101,"column":22}}},"13":{"name":"changeMicrophone","line":117,"loc":{"start":{"line":107,"column":21},"end":{"line":107,"column":26}}},"14":{"name":"changeOutputDevice","line":123,"loc":{"start":{"line":113,"column":23},"end":{"line":113,"column":28}}},"15":{"name":"changeResolution","line":129,"loc":{"start":{"line":119,"column":21},"end":{"line":119,"column":26}}},"16":{"name":"changeFilter","line":135,"loc":{"start":{"line":125,"column":17},"end":{"line":125,"column":26}}}},"statementMap":{"1":{"end":{"column":0,"line":0},"skip":true,"start":{"column":0,"line":0}},"2":{"end":{"column":0,"line":0},"skip":true,"start":{"column":0,"line":0}},"3":{"end":{"column":0,"line":0},"skip":true,"start":{"column":0,"line":0}},"4":{"end":{"column":0,"line":0},"skip":true,"start":{"column":0,"line":0}},"5":{"end":{"column":0,"line":0},"skip":true,"start":{"column":0,"line":0}},"6":{"end":{"column":0,"line":0},"skip":true,"start":{"column":0,"line":0}},"7":{"start":{"line":29,"column":4},"end":{"line":29,"column":30}},"8":{"start":{"line":31,"column":4},"end":{"line":37,"column":7}},"9":{"start":{"line":32,"column":6},"end":{"line":36,"column":7}},"10":{"start":{"line":33,"column":8},"end":{"line":35,"column":11}},"11":{"start":{"line":34,"column":10},"end":{"line":34,"column":113}},"12":{"start":{"line":41,"column":4},"end":{"line":41,"column":30}},"13":{"start":{"line":43,"column":4},"end":{"line":43,"column":67}},"14":{"start":{"line":44,"column":4},"end":{"line":44,"column":75}},"15":{"start":{"line":45,"column":4},"end":{"line":45,"column":75}},"16":{"start":{"line":46,"column":4},"end":{"line":46,"column":79}},"17":{"start":{"line":50,"column":4},"end":{"line":50,"column":30}},"18":{"start":{"line":52,"column":4},"end":{"line":55,"column":5}},"19":{"start":{"line":53,"column":6},"end":{"line":53,"column":33}},"20":{"start":{"line":54,"column":6},"end":{"line":54,"column":40}},"21":{"start":{"line":64,"column":4},"end":{"line":64,"column":89}},"22":{"start":{"line":69,"column":6},"end":{"line":71,"column":7}},"23":{"start":{"line":70,"column":8},"end":{"line":70,"column":38}},"24":{"end":{"column":0,"line":0},"skip":true,"start":{"column":0,"line":0}},"25":{"start":{"line":75,"column":6},"end":{"line":75,"column":48}},"26":{"start":{"line":77,"column":6},"end":{"line":77,"column":60}},"27":{"start":{"line":79,"column":6},"end":{"line":81,"column":7}},"28":{"start":{"line":80,"column":8},"end":{"line":80,"column":15}},"29":{"start":{"line":83,"column":6},"end":{"line":85,"column":7}},"30":{"start":{"line":84,"column":8},"end":{"line":84,"column":60}},"31":{"start":{"line":87,"column":6},"end":{"line":87,"column":25}},"32":{"start":{"line":88,"column":6},"end":{"line":88,"column":28}},"33":{"start":{"line":89,"column":6},"end":{"line":89,"column":57}},"34":{"start":{"line":90,"column":6},"end":{"line":98,"column":9}},"35":{"start":{"line":91,"column":8},"end":{"line":91,"column":71}},"36":{"start":{"line":93,"column":8},"end":{"line":93,"column":47}},"37":{"start":{"line":95,"column":8},"end":{"line":95,"column":28}},"38":{"start":{"line":96,"column":8},"end":{"line":96,"column":30}},"39":{"start":{"line":97,"column":8},"end":{"line":97,"column":21}},"40":{"start":{"line":102,"column":6},"end":{"line":104,"column":7}},"41":{"start":{"line":103,"column":8},"end":{"line":103,"column":89}},"42":{"start":{"line":108,"column":6},"end":{"line":110,"column":7}},"43":{"start":{"line":109,"column":8},"end":{"line":109,"column":97}},"44":{"start":{"line":114,"column":6},"end":{"line":116,"column":7}},"45":{"start":{"line":115,"column":8},"end":{"line":115,"column":101}},"46":{"start":{"line":120,"column":6},"end":{"line":122,"column":7}},"47":{"start":{"line":121,"column":8},"end":{"line":121,"column":97}},"48":{"start":{"line":126,"column":6},"end":{"line":126,"column":41}}},"branchMap":{"1":{"line":40,"type":"if","locations":[{"start":{"line":32,"column":6},"end":{"line":32,"column":6}},{"start":{"line":32,"column":6},"end":{"line":32,"column":6}}]},"2":{"line":60,"type":"if","locations":[{"start":{"line":52,"column":4},"end":{"line":52,"column":4}},{"start":{"line":52,"column":4},"end":{"line":52,"column":4}}]},"3":{"line":72,"type":"binary-expr","locations":[{"start":{"line":64,"column":11},"end":{"line":64,"column":35}},{"start":{"line":64,"column":39},"end":{"line":64,"column":88}}]},"4":{"line":77,"type":"if","locations":[{"start":{"line":69,"column":6},"end":{"line":69,"column":6}},{"start":{"line":69,"column":6},"end":{"line":69,"column":6}}]},"5":{"line":89,"type":"if","locations":[{"start":{"line":79,"column":6},"end":{"line":79,"column":6}},{"start":{"line":79,"column":6},"end":{"line":79,"column":6}}]},"6":{"line":89,"type":"binary-expr","locations":[{"start":{"line":79,"column":10},"end":{"line":79,"column":16}},{"start":{"line":79,"column":20},"end":{"line":79,"column":33}}]},"7":{"line":93,"type":"if","locations":[{"start":{"line":83,"column":6},"end":{"line":83,"column":6}},{"start":{"line":83,"column":6},"end":{"line":83,"column":6}}]},"8":{"line":99,"type":"binary-expr","locations":[{"start":{"line":89,"column":26},"end":{"line":89,"column":38}},{"start":{"line":89,"column":42},"end":{"line":89,"column":56}}]},"9":{"line":103,"type":"binary-expr","locations":[{"start":{"line":93,"column":15},"end":{"line":93,"column":28}},{"start":{"line":93,"column":32},"end":{"line":93,"column":46}}]},"10":{"line":112,"type":"if","locations":[{"start":{"line":102,"column":6},"end":{"line":102,"column":6}},{"start":{"line":102,"column":6},"end":{"line":102,"column":6}}]},"11":{"line":118,"type":"if","locations":[{"start":{"line":108,"column":6},"end":{"line":108,"column":6}},{"start":{"line":108,"column":6},"end":{"line":108,"column":6}}]},"12":{"line":124,"type":"if","locations":[{"start":{"line":114,"column":6},"end":{"line":114,"column":6}},{"start":{"line":114,"column":6},"end":{"line":114,"column":6}}]},"13":{"line":130,"type":"if","locations":[{"start":{"line":120,"column":6},"end":{"line":120,"column":6}},{"start":{"line":120,"column":6},"end":{"line":120,"column":6}}]}},"code":["/* global cheet */","","// import LoggerMixin from 'web-directory/mixins/logger'","import Ember from 'ember';","import layout from './template';","","const {computed, RSVP, Component, inject, run} = Ember;","","export default Component.extend(/* LoggerMixin, */{"," layout: layout,"," classNameBindings: [':device-selection'],",""," selectedCamera: null,"," selectedMicrophone: null,"," selectedResolution: null,"," selectedOutputDevice: null,"," selectedFilter: null,",""," audio: true,"," video: true,"," troubleshoot: true,",""," webrtc: inject.service(),",""," audioCallCapable: computed.reads('webrtc.audioCallCapable'),"," videoCallCapable: computed.reads('webrtc.videoCallCapable'),",""," didInsertElement () {"," this._super(...arguments);",""," run.scheduleOnce('afterRender', () => {"," if (this.get('video')) {"," cheet('i n s t a', () => {"," this.set('advancedOptions', ['willow', 'sutro', 'lofi', 'kelvin', 'inkwell', 'sepia', 'tint', 'none']);"," });"," }"," });"," },",""," didReceiveAttrs () {"," this._super(...arguments);",""," this.send('changeCamera', this.get('selectedCamera.deviceId'));"," this.send('changeMicrophone', this.get('selectedMicrophone.deviceId'));"," this.send('changeResolution', this.get('selectedResolution.presetId'));"," this.send('changeOutputDevice', this.get('selectedOutputDevice.deviceId'));"," },",""," willDestroyElement () {"," this._super(...arguments);",""," if (this.get('video')) {"," cheet.disable('i n s t a');"," this.set('advancedOptions', null);"," }"," },",""," selectedCameraId: computed.reads('selectedCamera.deviceId'),"," selectedResolutionId: computed.reads('selectedResolution.presetId'),"," selectedMicrophoneId: computed.reads('selectedMicrophone.deviceId'),"," selectedOutputDeviceId: computed.reads('selectedOutputDevice.deviceId'),",""," showTroubleshoot: computed('troubleshoot', function () {"," return this.get('troubleshoot') && typeof this.attrs.openTroubleshoot === 'function';"," }),",""," actions: {"," openTroubleshoot () {"," if (typeof this.attrs.openTroubleshoot === 'function') {"," this.attrs.openTroubleshoot();"," }"," },",""," playTestSound () {"," const audio = this.$('.preview-audio')[0];",""," const outputDevice = this.get('selectedOutputDevice');",""," if (!audio || !outputDevice) {"," return;"," }",""," if (!audio.play) {"," return console.warn('Audio playback not supported');"," }",""," audio.muted = true;"," audio.currentTime = 0;"," const playPromise = audio.play() || RSVP.resolve();"," playPromise.then(() => {"," return this.get('webrtc').setOutputDevice(audio, outputDevice);"," }).then(() => {"," return audio.pause() || RSVP.resolve();"," }).then(() => {"," audio.muted = false;"," audio.currentTime = 0;"," audio.play();"," });"," },",""," changeCamera (id) {"," if (this.get('selectedCamera.deviceId') !== id) {"," this.set('selectedCamera', this.get('webrtc.cameraList').findBy('deviceId', id));"," }"," },",""," changeMicrophone (id) {"," if (this.get('selectedMicrophone.deviceId') !== id) {"," this.set('selectedMicrophone', this.get('webrtc.microphoneList').findBy('deviceId', id));"," }"," },",""," changeOutputDevice (id) {"," if (this.get('selectedOutputDevice.deviceId') !== id) {"," this.set('selectedOutputDevice', this.get('webrtc.outputDeviceList').findBy('deviceId', id));"," }"," },",""," changeResolution (id) {"," if (this.get('selectedResolution.presetId') !== id) {"," this.set('selectedResolution', this.get('webrtc.resolutionList').findBy('presetId', id));"," }"," },",""," changeFilter (filter) {"," this.set('selectedFilter', filter);"," }"," }","});",""],"l":{"0":20,"29":20,"31":20,"32":20,"33":19,"34":0,"41":29,"43":29,"44":29,"45":29,"46":29,"50":20,"52":20,"53":19,"54":19,"64":20,"69":1,"70":1,"75":0,"77":0,"79":0,"80":0,"83":0,"84":0,"87":0,"88":0,"89":0,"90":0,"91":0,"93":0,"95":0,"96":0,"97":0,"102":31,"103":2,"108":31,"109":2,"114":29,"115":0,"120":32,"121":3,"126":0}}}
{
"total":{"lines":{"total":154,"covered":100,"skipped":0,"pct":64.94},"statements":{"total":168,"covered":114,"skipped":2,"pct":67.86},"functions":{"total":41,"covered":26,"skipped":0,"pct":63.41},"branches":{"total":112,"covered":67,"skipped":0,"pct":59.82},"linesCovered":{"0":50,"7":1,"8":1,"9":1,"10":1,"11":1,"12":0,"13":1,"14":0,"27":3,"29":20,"31":20,"32":20,"33":19,"34":0,"38":3,"39":3,"40":3,"41":32,"43":32,"44":29,"45":29,"46":29,"47":1,"48":1,"49":0,"50":20,"52":21,"53":20,"54":20,"55":1,"57":0,"64":20,"68":10,"69":11,"70":8,"71":7,"73":10,"75":10,"77":10,"79":0,"80":0,"81":0,"83":0,"84":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"95":0,"96":1,"97":0,"100":8,"101":8,"102":31,"103":2,"108":31,"109":2,"112":8,"114":29,"115":0,"120":32,"121":3,"123":8,"126":0,"141":8,"144":8,"145":2,"156":8,"161":10,"162":6,"164":4,"165":4,"166":4,"167":4,"168":4,"169":4,"170":4,"175":4,"176":2,"177":2,"179":2,"180":2,"182":4,"183":4,"184":4,"186":4,"187":4,"189":4,"190":0,"191":0,"193":0,"194":0,"196":0,"200":4,"201":2,"203":4,"204":4,"205":0,"206":0,"208":4,"209":4,"214":4,"215":0,"219":0,"221":0,"222":0,"223":0,"224":0,"225":0,"226":0,"231":0,"237":4,"238":4,"239":4,"241":4,"246":2,"247":0,"250":2,"251":2,"252":1,"255":1,"256":0,"257":0,"258":0,"260":0,"263":0,"265":0,"267":0,"270":1,"271":1,"276":1,"277":1,"278":1,"280":0}},
"addon/mixins/device-enumeration.js":{"lines":{"total":112,"covered":76,"skipped":0,"pct":67.86},"statements":{"total":120,"covered":84,"skipped":1,"pct":70},"functions":{"total":25,"covered":16,"skipped":0,"pct":64},"branches":{"total":86,"covered":53,"skipped":0,"pct":61.63},"linesCovered":{"0":30,"7":1,"8":1,"9":1,"10":1,"11":1,"12":0,"13":1,"14":0,"27":3,"38":3,"39":3,"40":3,"41":3,"43":3,"47":1,"48":1,"49":0,"52":1,"53":1,"54":1,"55":1,"57":0,"68":10,"69":10,"70":7,"71":7,"73":10,"75":10,"77":10,"79":0,"80":0,"81":0,"87":0,"88":0,"89":0,"92":0,"96":1,"100":8,"101":8,"112":8,"123":8,"141":8,"144":8,"145":2,"156":8,"161":10,"162":6,"164":4,"165":4,"166":4,"167":4,"168":4,"169":4,"170":4,"175":4,"176":2,"177":2,"179":2,"180":2,"182":4,"183":4,"184":4,"186":4,"187":4,"189":4,"190":0,"191":0,"193":0,"194":0,"196":0,"200":4,"201":2,"203":4,"204":4,"205":0,"206":0,"208":4,"209":4,"214":4,"215":0,"219":0,"221":0,"222":0,"223":0,"224":0,"225":0,"226":0,"231":0,"237":4,"238":4,"239":4,"241":4,"246":2,"247":0,"250":2,"251":2,"252":1,"255":1,"256":0,"257":0,"258":0,"260":0,"263":0,"265":0,"267":0,"270":1,"271":1,"276":1,"277":1,"278":1,"280":0}},
"total":{"lines":{"total":156,"covered":102,"skipped":0,"pct":65.38},"statements":{"total":170,"covered":116,"skipped":2,"pct":68.24},"functions":{"total":41,"covered":26,"skipped":0,"pct":63.41},"branches":{"total":114,"covered":69,"skipped":0,"pct":60.53},"linesCovered":{"0":50,"7":1,"8":1,"9":1,"10":1,"11":1,"12":0,"13":1,"14":0,"27":3,"29":20,"31":20,"32":20,"33":19,"34":0,"38":3,"39":3,"40":3,"41":32,"43":32,"44":29,"45":29,"46":29,"47":1,"48":1,"49":0,"50":20,"52":21,"53":20,"54":20,"55":1,"57":0,"64":20,"68":14,"69":15,"70":8,"71":7,"73":14,"75":14,"77":14,"79":0,"80":0,"81":0,"83":0,"84":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"95":0,"96":2,"97":2,"98":1,"102":31,"103":10,"104":8,"108":31,"109":2,"114":29,"115":8,"120":32,"121":3,"126":8,"144":8,"147":8,"148":2,"159":8,"164":10,"165":6,"167":4,"168":4,"169":4,"170":4,"171":4,"172":4,"173":4,"178":4,"179":2,"180":2,"182":2,"183":2,"185":4,"186":4,"187":4,"189":4,"190":4,"192":4,"193":0,"194":0,"196":0,"197":0,"199":0,"203":4,"204":2,"206":4,"207":4,"208":0,"209":0,"211":4,"212":4,"217":4,"218":0,"222":0,"224":0,"225":0,"226":0,"227":0,"228":0,"229":0,"234":0,"240":4,"241":4,"242":4,"244":4,"249":2,"250":0,"253":2,"254":2,"255":1,"258":1,"259":0,"260":0,"261":0,"263":0,"266":0,"268":0,"270":0,"273":1,"274":1,"279":1,"280":1,"281":1,"283":0}},
"addon/mixins/device-enumeration.js":{"lines":{"total":114,"covered":78,"skipped":0,"pct":68.42},"statements":{"total":122,"covered":86,"skipped":1,"pct":70.49},"functions":{"total":25,"covered":16,"skipped":0,"pct":64},"branches":{"total":88,"covered":55,"skipped":0,"pct":62.5},"linesCovered":{"0":30,"7":1,"8":1,"9":1,"10":1,"11":1,"12":0,"13":1,"14":0,"27":3,"38":3,"39":3,"40":3,"41":3,"43":3,"47":1,"48":1,"49":0,"52":1,"53":1,"54":1,"55":1,"57":0,"68":14,"69":14,"70":7,"71":7,"73":14,"75":14,"77":14,"79":0,"80":0,"81":0,"87":0,"88":0,"89":0,"92":0,"96":2,"97":2,"98":1,"103":8,"104":8,"115":8,"126":8,"144":8,"147":8,"148":2,"159":8,"164":10,"165":6,"167":4,"168":4,"169":4,"170":4,"171":4,"172":4,"173":4,"178":4,"179":2,"180":2,"182":2,"183":2,"185":4,"186":4,"187":4,"189":4,"190":4,"192":4,"193":0,"194":0,"196":0,"197":0,"199":0,"203":4,"204":2,"206":4,"207":4,"208":0,"209":0,"211":4,"212":4,"217":4,"218":0,"222":0,"224":0,"225":0,"226":0,"227":0,"228":0,"229":0,"234":0,"240":4,"241":4,"242":4,"244":4,"249":2,"250":0,"253":2,"254":2,"255":1,"258":1,"259":0,"260":0,"261":0,"263":0,"266":0,"268":0,"270":0,"273":1,"274":1,"279":1,"280":1,"281":1,"283":0}},
"addon/components/device-selection/component.js":{"lines":{"total":42,"covered":24,"skipped":0,"pct":57.14},"statements":{"total":48,"covered":30,"skipped":1,"pct":62.5},"functions":{"total":16,"covered":10,"skipped":0,"pct":62.5},"branches":{"total":26,"covered":14,"skipped":0,"pct":53.85},"linesCovered":{"0":20,"29":20,"31":20,"32":20,"33":19,"34":0,"41":29,"43":29,"44":29,"45":29,"46":29,"50":20,"52":20,"53":19,"54":19,"64":20,"69":1,"70":1,"75":0,"77":0,"79":0,"80":0,"83":0,"84":0,"87":0,"88":0,"89":0,"90":0,"91":0,"93":0,"95":0,"96":0,"97":0,"102":31,"103":2,"108":31,"109":2,"114":29,"115":0,"120":32,"121":3,"126":0}}}
{
"name": "ember-webrtc-devices",
"version": "5.0.0",
"version": "5.1.0",
"description": "Enumerating and selecting media devices from the browser as an ember addon",

@@ -5,0 +5,0 @@ "directories": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc