@minto-ai/tools 1.0.59 → 1.0.60
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -147,6 +147,10 @@ declare class MicrophonePermission {
|
|
|
147
147
|
* 根据MediaDevices.getUserMedia规范实现
|
|
148
148
|
*/
|
|
149
149
|
requestMicrophonePermission(): Promise<void>;
|
|
150
|
+
/**
|
|
151
|
+
* 检查麦克风权限状态
|
|
152
|
+
*/
|
|
153
|
+
isMicrophonePermissionGranted(): boolean;
|
|
150
154
|
}
|
|
151
155
|
/**
|
|
152
156
|
* 统一的音频权限管理类
|
|
@@ -163,6 +167,10 @@ declare class AudioPermission {
|
|
|
163
167
|
* 请求麦克风权限
|
|
164
168
|
*/
|
|
165
169
|
requestMicrophonePermission(): Promise<void>;
|
|
170
|
+
/**
|
|
171
|
+
* 检查麦克风权限状态
|
|
172
|
+
*/
|
|
173
|
+
isMicrophonePermissionGranted(): boolean;
|
|
166
174
|
}
|
|
167
175
|
/**
|
|
168
176
|
* 创建或获取音频权限管理实例
|
package/dist/index.js
CHANGED
|
@@ -13354,7 +13354,6 @@ var AudioPlaybackPermission = /* @__PURE__ */ function() {
|
|
|
13354
13354
|
var interactionEvents = ["click", "touchstart", "touchend", "keydown", "mousedown", "pointerdown"];
|
|
13355
13355
|
var _handleInteraction = function handleInteraction() {
|
|
13356
13356
|
_this3.userInteracted = true;
|
|
13357
|
-
console.log(_this3.userInteracted);
|
|
13358
13357
|
interactionEvents.forEach(function(eventType) {
|
|
13359
13358
|
document.removeEventListener(eventType, _handleInteraction);
|
|
13360
13359
|
});
|
|
@@ -13582,6 +13581,11 @@ var MicrophonePermission = /* @__PURE__ */ function() {
|
|
|
13582
13581
|
}
|
|
13583
13582
|
return requestMicrophonePermission;
|
|
13584
13583
|
}()
|
|
13584
|
+
}, {
|
|
13585
|
+
key: "isMicrophonePermissionGranted",
|
|
13586
|
+
value: function isMicrophonePermissionGranted() {
|
|
13587
|
+
return this.microphonePermissionGranted;
|
|
13588
|
+
}
|
|
13585
13589
|
}]);
|
|
13586
13590
|
}();
|
|
13587
13591
|
var AudioPermission = /* @__PURE__ */ function() {
|
|
@@ -13630,6 +13634,11 @@ var AudioPermission = /* @__PURE__ */ function() {
|
|
|
13630
13634
|
}
|
|
13631
13635
|
return requestMicrophonePermission;
|
|
13632
13636
|
}()
|
|
13637
|
+
}, {
|
|
13638
|
+
key: "isMicrophonePermissionGranted",
|
|
13639
|
+
value: function isMicrophonePermissionGranted() {
|
|
13640
|
+
return this.microphonePermission.isMicrophonePermissionGranted();
|
|
13641
|
+
}
|
|
13633
13642
|
}]);
|
|
13634
13643
|
}();
|
|
13635
13644
|
var audioPermissionInstance = null;
|