File tree Expand file tree Collapse file tree 1 file changed +0
-30
lines changed Expand file tree Collapse file tree 1 file changed +0
-30
lines changed Original file line number Diff line number Diff line change @@ -138,9 +138,6 @@ export class WebCompat extends ContentFeature {
138138 if ( this . getFeatureSettingEnabled ( 'modifyCookies' ) ) {
139139 this . modifyCookies ( ) ;
140140 }
141- if ( this . getFeatureSettingEnabled ( 'disableDeviceEnumeration' ) ) {
142- this . preventDeviceEnumeration ( ) ;
143- }
144141 if ( this . getFeatureSettingEnabled ( 'enumerateDevices' ) ) {
145142 this . deviceEnumerationFix ( ) ;
146143 }
@@ -806,33 +803,6 @@ export class WebCompat extends ContentFeature {
806803 }
807804 }
808805
809- /**
810- * Prevents device enumeration by returning an empty array when enabled
811- */
812- preventDeviceEnumeration ( ) {
813- if ( ! window . MediaDevices ) {
814- return ;
815- }
816- let disableDeviceEnumeration = false ;
817- const isFrame = window . self !== window . top ;
818- if ( isFrame ) {
819- disableDeviceEnumeration = this . getFeatureSettingEnabled ( 'disableDeviceEnumerationFrames' ) ;
820- } else {
821- disableDeviceEnumeration = this . getFeatureSettingEnabled ( 'disableDeviceEnumeration' ) ;
822- }
823- if ( disableDeviceEnumeration ) {
824- const enumerateDevicesProxy = new DDGProxy ( this , MediaDevices . prototype , 'enumerateDevices' , {
825- /**
826- * @returns {Promise<MediaDeviceInfo[]> }
827- */
828- apply ( ) {
829- return Promise . resolve ( [ ] ) ;
830- } ,
831- } ) ;
832- enumerateDevicesProxy . overload ( ) ;
833- }
834- }
835-
836806 /**
837807 * Creates a valid MediaDeviceInfo or InputDeviceInfo object that passes instanceof checks
838808 * @param {'videoinput' | 'audioinput' | 'audiooutput' } kind - The device kind
You can’t perform that action at this time.
0 commit comments