ember-webrtc-devices
Advanced tools
Comparing version 0.3.12 to 1.0.0
@@ -25,2 +25,6 @@ /* global webrtcsupport, _ */ | ||
if (!this.get('hasCamera')) { | ||
return false; | ||
} | ||
// not much we can do here. we can really only guess they haven't given video permissions if they have a camera and have already given mic permissions | ||
@@ -45,2 +49,6 @@ if (!this.get('hasCameraPermission')) { | ||
if (!this.get('hasMicrophone')) { | ||
return false; | ||
} | ||
// not much we can do here. we can really only guess they haven't given audio permissions if they have a mic and have already given camera permissions | ||
@@ -161,14 +169,14 @@ if (!this.get('hasMicPermission')) { | ||
const addCamera = (device, hasLabel) => { | ||
if (!hasLabel) { | ||
device.label = this.lookup('webrtcDevices.cameraLabel', {number: ++cameraCount}).toString(); | ||
const addCamera = (device, hasBrowserLabel) => { | ||
if (!hasBrowserLabel) { | ||
device.label = device.label || this.lookup('webrtcDevices.cameraLabel', {number: ++cameraCount}).toString(); | ||
} | ||
this.set('hasCameraPermission', this.get('hasCameraPermission') || hasLabel); | ||
this.set('hasCameraPermission', this.get('hasCameraPermission') || hasBrowserLabel); | ||
cameras.push(Ember.Object.create(device)); | ||
}; | ||
const addMicrophone = (device, hasLabel) => { | ||
if (!hasLabel) { | ||
const addMicrophone = (device, hasBrowserLabel) => { | ||
if (!hasBrowserLabel) { | ||
device.label = device.label || this.lookup('webrtcDevices.microphoneLabel', {number: ++microphoneCount}).toString(); | ||
} | ||
this.set('hasMicPermission', this.get('hasMicPermission') || hasLabel); | ||
this.set('hasMicPermission', this.get('hasMicPermission') || hasBrowserLabel); | ||
microphones.push(Ember.Object.create(device)); | ||
@@ -175,0 +183,0 @@ }; |
{ | ||
"name": "ember-webrtc-devices", | ||
"version": "0.3.12", | ||
"version": "1.0.0", | ||
"description": "Enumerating and selecting media devices from the browser as an ember addon", | ||
@@ -5,0 +5,0 @@ "directories": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
51392
397
1