This Applet allows users to manage their audio, video, and speaker devices by removing them from device enumeration.
deviceManager = {
enabled: true,
currentDevices: [],
selectedDeviceLabels: {
audio: null,
video: null,
},
excludedDevices: [],
lastDeviceIds: {
audio: null,
video: null,
}
}
trackData
is also used to control the UI. Injection is only allowed if there is a media track.
UPDATE_DEVICE_SETTINGS
- content->inject: updates the device settingsGET_DEVICE_SETTINGS
- inject->content: requests the current device settings
User inputs:
- Select audio device
- Select video device
- Exclude devices from enumeration
Button listeners:
- Select Audio Device - updates the selected audio device
- Select Video Device - updates the selected video device
- Exclude Device - toggles the exclusion state of a device
The dash context uses the StorageHandler
to listen for changes in the deviceManager
storage object and updates the UI accordingly.
The content script monitors device settings and propagates changes to the inject script.
updateDeviceSettings
- updates the device settings in storage and sendsUPDATE_DEVICE_SETTINGS
to injectgetDeviceSettings
- retrieves the current device settings from storage and sends them to inject
The inject script manages the devices returned by navigator.mediaDevices.enumerateDevices()
and inserts fake devices.
modifyDevices
- filters devices to exclude and adds fake devices to the list of devices returned byenumerateDevices
fakeDeviceStream
- returns a stream with one or more altered tracks based on the constraints
Not applicable for this applet.
Not applicable for this applet.
- Improve the logic for handling multiple device selections and exclusions
- Add support for dynamically updating device capabilities based on user selection