mirror of
https://github.com/algerkong/AlgerMusicPlayer.git
synced 2026-04-24 16:27:23 +08:00
@@ -16,7 +16,5 @@
|
|||||||
<true/>
|
<true/>
|
||||||
<key>com.apple.security.files.downloads.read-write</key>
|
<key>com.apple.security.files.downloads.read-write</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>com.apple.security.device.microphone</key>
|
|
||||||
<true/>
|
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|||||||
@@ -148,7 +148,6 @@
|
|||||||
"entitlements": "build/entitlements.mac.plist",
|
"entitlements": "build/entitlements.mac.plist",
|
||||||
"entitlementsInherit": "build/entitlements.mac.plist",
|
"entitlementsInherit": "build/entitlements.mac.plist",
|
||||||
"extendInfo": {
|
"extendInfo": {
|
||||||
"NSMicrophoneUsageDescription": "AlgerMusicPlayer needs access to the microphone for audio visualization.",
|
|
||||||
"NSCameraUsageDescription": "Application requests access to the device's camera.",
|
"NSCameraUsageDescription": "Application requests access to the device's camera.",
|
||||||
"NSDocumentsFolderUsageDescription": "Application requests access to the user's Documents folder.",
|
"NSDocumentsFolderUsageDescription": "Application requests access to the user's Documents folder.",
|
||||||
"NSDownloadsFolderUsageDescription": "Application requests access to the user's Downloads folder."
|
"NSDownloadsFolderUsageDescription": "Application requests access to the user's Downloads folder."
|
||||||
|
|||||||
@@ -605,13 +605,6 @@ class AudioService {
|
|||||||
|
|
||||||
public async getAudioOutputDevices(): Promise<AudioOutputDevice[]> {
|
public async getAudioOutputDevices(): Promise<AudioOutputDevice[]> {
|
||||||
try {
|
try {
|
||||||
try {
|
|
||||||
const stream = await navigator.mediaDevices.getUserMedia({ audio: true });
|
|
||||||
stream.getTracks().forEach((track) => track.stop());
|
|
||||||
} catch {
|
|
||||||
// Continue even if permission denied
|
|
||||||
}
|
|
||||||
|
|
||||||
const devices = await navigator.mediaDevices.enumerateDevices();
|
const devices = await navigator.mediaDevices.enumerateDevices();
|
||||||
const audioOutputs = devices.filter((d) => d.kind === 'audiooutput');
|
const audioOutputs = devices.filter((d) => d.kind === 'audiooutput');
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user