chrome-types 0.1.90 → 0.1.93
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.
- package/_all.d.ts +194 -8
- package/index.d.ts +316 -5
- package/package.json +2 -2
package/_all.d.ts
CHANGED
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
// Generated on
|
|
18
|
-
// Built at
|
|
17
|
+
// Generated on Wed Mar 09 2022 22:28:07 GMT+0000 (Coordinated Universal Time)
|
|
18
|
+
// Built at 0cac0c047f8f4d2aef880f7d28b7aa418a194e98
|
|
19
19
|
|
|
20
20
|
// Includes all types, including MV2 + Platform Apps APIs.
|
|
21
21
|
|
|
@@ -1604,7 +1604,6 @@ declare namespace chrome {
|
|
|
1604
1604
|
*
|
|
1605
1605
|
* @since Chrome 59
|
|
1606
1606
|
* @chrome-permission audio
|
|
1607
|
-
* @chrome-platform-apps
|
|
1608
1607
|
* @chrome-platform chromeos
|
|
1609
1608
|
*/
|
|
1610
1609
|
export namespace audio {
|
|
@@ -9081,7 +9080,7 @@ declare namespace chrome {
|
|
|
9081
9080
|
isUrlFilterCaseSensitive?: boolean;
|
|
9082
9081
|
|
|
9083
9082
|
/**
|
|
9084
|
-
* The rule will only match network requests originating from the list of `
|
|
9083
|
+
* The rule will only match network requests originating from the list of `initiatorDomains`. If the list is omitted, the rule is applied to requests from all domains. An empty list is not allowed.
|
|
9085
9084
|
*
|
|
9086
9085
|
* Notes:
|
|
9087
9086
|
*
|
|
@@ -9089,11 +9088,13 @@ declare namespace chrome {
|
|
|
9089
9088
|
* * The entries must consist of only ascii characters.
|
|
9090
9089
|
* * Use punycode encoding for internationalized domains.
|
|
9091
9090
|
* * This matches against the request initiator and not the request url.
|
|
9091
|
+
*
|
|
9092
|
+
* @since Pending
|
|
9092
9093
|
*/
|
|
9093
|
-
|
|
9094
|
+
initiatorDomains?: string[];
|
|
9094
9095
|
|
|
9095
9096
|
/**
|
|
9096
|
-
* The rule will not match network requests originating from the list of `excludedDomains`. If the list is empty or omitted, no domains are excluded. This takes precedence over `
|
|
9097
|
+
* The rule will not match network requests originating from the list of `excludedDomains`. If the list is empty or omitted, no domains are excluded. This takes precedence over `initiatorDomains`.
|
|
9097
9098
|
*
|
|
9098
9099
|
* Notes:
|
|
9099
9100
|
*
|
|
@@ -9101,6 +9102,48 @@ declare namespace chrome {
|
|
|
9101
9102
|
* * The entries must consist of only ascii characters.
|
|
9102
9103
|
* * Use punycode encoding for internationalized domains.
|
|
9103
9104
|
* * This matches against the request initiator and not the request url.
|
|
9105
|
+
*
|
|
9106
|
+
* @since Pending
|
|
9107
|
+
*/
|
|
9108
|
+
excludedInitiatorDomains?: string[];
|
|
9109
|
+
|
|
9110
|
+
/**
|
|
9111
|
+
* The rule will only match network requests when the domain matches one from the list of `requestDomains`. If the list is omitted, the rule is applied to requests from all domains. An empty list is not allowed.
|
|
9112
|
+
*
|
|
9113
|
+
* Notes:
|
|
9114
|
+
*
|
|
9115
|
+
* * Sub-domains like "a.example.com" are also allowed.
|
|
9116
|
+
* * The entries must consist of only ascii characters.
|
|
9117
|
+
* * Use punycode encoding for internationalized domains.
|
|
9118
|
+
*
|
|
9119
|
+
* @since Pending
|
|
9120
|
+
*/
|
|
9121
|
+
requestDomains?: string[];
|
|
9122
|
+
|
|
9123
|
+
/**
|
|
9124
|
+
* The rule will not match network requests when the domains matches one from the list of `excludedDomains`. If the list is empty or omitted, no domains are excluded. This takes precedence over `requestDomains`.
|
|
9125
|
+
*
|
|
9126
|
+
* Notes:
|
|
9127
|
+
*
|
|
9128
|
+
* * Sub-domains like "a.example.com" are also allowed.
|
|
9129
|
+
* * The entries must consist of only ascii characters.
|
|
9130
|
+
* * Use punycode encoding for internationalized domains.
|
|
9131
|
+
*
|
|
9132
|
+
* @since Pending
|
|
9133
|
+
*/
|
|
9134
|
+
excludedRequestDomains?: string[];
|
|
9135
|
+
|
|
9136
|
+
/**
|
|
9137
|
+
* The rule will only match network requests originating from the list of `domains`.
|
|
9138
|
+
*
|
|
9139
|
+
* @deprecated Use {@link initiatorDomains} instead
|
|
9140
|
+
*/
|
|
9141
|
+
domains?: string[];
|
|
9142
|
+
|
|
9143
|
+
/**
|
|
9144
|
+
* The rule will not match network requests originating from the list of `excludedDomains`.
|
|
9145
|
+
*
|
|
9146
|
+
* @deprecated Use {@link excludedInitiatorDomains} instead
|
|
9104
9147
|
*/
|
|
9105
9148
|
excludedDomains?: string[];
|
|
9106
9149
|
|
|
@@ -20793,6 +20836,17 @@ declare namespace chrome {
|
|
|
20793
20836
|
tab: tabs.Tab,
|
|
20794
20837
|
) => void>;
|
|
20795
20838
|
|
|
20839
|
+
/**
|
|
20840
|
+
* Shows the page action. The page action is shown whenever the tab is selected.
|
|
20841
|
+
*
|
|
20842
|
+
* @chrome-returns-extra since Pending
|
|
20843
|
+
* @param tabId The id of the tab for which you want to modify the page action.
|
|
20844
|
+
*/
|
|
20845
|
+
export function show(
|
|
20846
|
+
|
|
20847
|
+
tabId: number,
|
|
20848
|
+
): Promise<void>;
|
|
20849
|
+
|
|
20796
20850
|
/**
|
|
20797
20851
|
* Shows the page action. The page action is shown whenever the tab is selected.
|
|
20798
20852
|
*
|
|
@@ -20808,6 +20862,17 @@ declare namespace chrome {
|
|
|
20808
20862
|
callback?: () => void,
|
|
20809
20863
|
): void;
|
|
20810
20864
|
|
|
20865
|
+
/**
|
|
20866
|
+
* Hides the page action. Hidden page actions still appear in the Chrome toolbar, but are grayed out.
|
|
20867
|
+
*
|
|
20868
|
+
* @chrome-returns-extra since Pending
|
|
20869
|
+
* @param tabId The id of the tab for which you want to modify the page action.
|
|
20870
|
+
*/
|
|
20871
|
+
export function hide(
|
|
20872
|
+
|
|
20873
|
+
tabId: number,
|
|
20874
|
+
): Promise<void>;
|
|
20875
|
+
|
|
20811
20876
|
/**
|
|
20812
20877
|
* Hides the page action. Hidden page actions still appear in the Chrome toolbar, but are grayed out.
|
|
20813
20878
|
*
|
|
@@ -20823,6 +20888,27 @@ declare namespace chrome {
|
|
|
20823
20888
|
callback?: () => void,
|
|
20824
20889
|
): void;
|
|
20825
20890
|
|
|
20891
|
+
/**
|
|
20892
|
+
* Sets the title of the page action. This is displayed in a tooltip over the page action.
|
|
20893
|
+
*
|
|
20894
|
+
* @chrome-returns-extra since Pending
|
|
20895
|
+
*/
|
|
20896
|
+
export function setTitle(
|
|
20897
|
+
|
|
20898
|
+
details: {
|
|
20899
|
+
|
|
20900
|
+
/**
|
|
20901
|
+
* The id of the tab for which you want to modify the page action.
|
|
20902
|
+
*/
|
|
20903
|
+
tabId: number,
|
|
20904
|
+
|
|
20905
|
+
/**
|
|
20906
|
+
* The tooltip string.
|
|
20907
|
+
*/
|
|
20908
|
+
title: string,
|
|
20909
|
+
},
|
|
20910
|
+
): Promise<void>;
|
|
20911
|
+
|
|
20826
20912
|
/**
|
|
20827
20913
|
* Sets the title of the page action. This is displayed in a tooltip over the page action.
|
|
20828
20914
|
*/
|
|
@@ -20849,16 +20935,57 @@ declare namespace chrome {
|
|
|
20849
20935
|
|
|
20850
20936
|
/**
|
|
20851
20937
|
* Gets the title of the page action.
|
|
20938
|
+
*
|
|
20939
|
+
* @chrome-returns-extra since Pending
|
|
20852
20940
|
*/
|
|
20853
20941
|
export function getTitle(
|
|
20854
20942
|
|
|
20855
20943
|
details: TabDetails,
|
|
20944
|
+
): Promise<string>;
|
|
20856
20945
|
|
|
20857
|
-
|
|
20946
|
+
/**
|
|
20947
|
+
* Gets the title of the page action.
|
|
20948
|
+
*/
|
|
20949
|
+
export function getTitle(
|
|
20950
|
+
|
|
20951
|
+
details: TabDetails,
|
|
20952
|
+
|
|
20953
|
+
callback?: (
|
|
20858
20954
|
result: string,
|
|
20859
20955
|
) => void,
|
|
20860
20956
|
): void;
|
|
20861
20957
|
|
|
20958
|
+
/**
|
|
20959
|
+
* Sets the icon for the page action. The icon can be specified either as the path to an image file or as the pixel data from a canvas element, or as dictionary of either one of those. Either the **path** or the **imageData** property must be specified.
|
|
20960
|
+
*
|
|
20961
|
+
* @chrome-returns-extra since Pending
|
|
20962
|
+
*/
|
|
20963
|
+
export function setIcon(
|
|
20964
|
+
|
|
20965
|
+
details: {
|
|
20966
|
+
|
|
20967
|
+
/**
|
|
20968
|
+
* The id of the tab for which you want to modify the page action.
|
|
20969
|
+
*/
|
|
20970
|
+
tabId: number,
|
|
20971
|
+
|
|
20972
|
+
/**
|
|
20973
|
+
* Either an ImageData object or a dictionary {size -> ImageData} representing icon to be set. If the icon is specified as a dictionary, the actual image to be used is chosen depending on screen's pixel density. If the number of image pixels that fit into one screen space unit equals `scale`, then image with size `scale` \* n will be selected, where n is the size of the icon in the UI. At least one image must be specified. Note that 'details.imageData = foo' is equivalent to 'details.imageData = {'16': foo}'
|
|
20974
|
+
*/
|
|
20975
|
+
imageData?: ImageDataType | {[name: string]: any},
|
|
20976
|
+
|
|
20977
|
+
/**
|
|
20978
|
+
* Either a relative image path or a dictionary {size -> relative image path} pointing to icon to be set. If the icon is specified as a dictionary, the actual image to be used is chosen depending on screen's pixel density. If the number of image pixels that fit into one screen space unit equals `scale`, then image with size `scale` \* n will be selected, where n is the size of the icon in the UI. At least one image must be specified. Note that 'details.path = foo' is equivalent to 'details.path = {'16': foo}'
|
|
20979
|
+
*/
|
|
20980
|
+
path?: string | {[name: string]: any},
|
|
20981
|
+
|
|
20982
|
+
/**
|
|
20983
|
+
* **Deprecated.** This argument is ignored.
|
|
20984
|
+
*/
|
|
20985
|
+
iconIndex?: number,
|
|
20986
|
+
},
|
|
20987
|
+
): Promise<void>;
|
|
20988
|
+
|
|
20862
20989
|
/**
|
|
20863
20990
|
* Sets the icon for the page action. The icon can be specified either as the path to an image file or as the pixel data from a canvas element, or as dictionary of either one of those. Either the **path** or the **imageData** property must be specified.
|
|
20864
20991
|
*/
|
|
@@ -20890,6 +21017,27 @@ declare namespace chrome {
|
|
|
20890
21017
|
callback?: () => void,
|
|
20891
21018
|
): void;
|
|
20892
21019
|
|
|
21020
|
+
/**
|
|
21021
|
+
* Sets the HTML document to be opened as a popup when the user clicks on the page action's icon.
|
|
21022
|
+
*
|
|
21023
|
+
* @chrome-returns-extra since Pending
|
|
21024
|
+
*/
|
|
21025
|
+
export function setPopup(
|
|
21026
|
+
|
|
21027
|
+
details: {
|
|
21028
|
+
|
|
21029
|
+
/**
|
|
21030
|
+
* The id of the tab for which you want to modify the page action.
|
|
21031
|
+
*/
|
|
21032
|
+
tabId: number,
|
|
21033
|
+
|
|
21034
|
+
/**
|
|
21035
|
+
* The relative path to the HTML file to show in a popup. If set to the empty string (`''`), no popup is shown.
|
|
21036
|
+
*/
|
|
21037
|
+
popup: string,
|
|
21038
|
+
},
|
|
21039
|
+
): Promise<void>;
|
|
21040
|
+
|
|
20893
21041
|
/**
|
|
20894
21042
|
* Sets the HTML document to be opened as a popup when the user clicks on the page action's icon.
|
|
20895
21043
|
*/
|
|
@@ -20916,12 +21064,22 @@ declare namespace chrome {
|
|
|
20916
21064
|
|
|
20917
21065
|
/**
|
|
20918
21066
|
* Gets the html document set as the popup for this page action.
|
|
21067
|
+
*
|
|
21068
|
+
* @chrome-returns-extra since Pending
|
|
20919
21069
|
*/
|
|
20920
21070
|
export function getPopup(
|
|
20921
21071
|
|
|
20922
21072
|
details: TabDetails,
|
|
21073
|
+
): Promise<string>;
|
|
20923
21074
|
|
|
20924
|
-
|
|
21075
|
+
/**
|
|
21076
|
+
* Gets the html document set as the popup for this page action.
|
|
21077
|
+
*/
|
|
21078
|
+
export function getPopup(
|
|
21079
|
+
|
|
21080
|
+
details: TabDetails,
|
|
21081
|
+
|
|
21082
|
+
callback?: (
|
|
20925
21083
|
result: string,
|
|
20926
21084
|
) => void,
|
|
20927
21085
|
): void;
|
|
@@ -29930,6 +30088,20 @@ declare namespace chrome {
|
|
|
29930
30088
|
eventTypes?: EventType[];
|
|
29931
30089
|
}
|
|
29932
30090
|
|
|
30091
|
+
/**
|
|
30092
|
+
* Speaks text using a text-to-speech engine.
|
|
30093
|
+
*
|
|
30094
|
+
* @chrome-returns-extra since Pending
|
|
30095
|
+
* @param utterance The text to speak, either plain text or a complete, well-formed SSML document. Speech engines that do not support SSML will strip away the tags and speak the text. The maximum length of the text is 32,768 characters.
|
|
30096
|
+
* @param options The speech options.
|
|
30097
|
+
*/
|
|
30098
|
+
export function speak(
|
|
30099
|
+
|
|
30100
|
+
utterance: string,
|
|
30101
|
+
|
|
30102
|
+
options?: TtsOptions,
|
|
30103
|
+
): Promise<void>;
|
|
30104
|
+
|
|
29933
30105
|
/**
|
|
29934
30106
|
* Speaks text using a text-to-speech engine.
|
|
29935
30107
|
*
|
|
@@ -29961,6 +30133,13 @@ declare namespace chrome {
|
|
|
29961
30133
|
*/
|
|
29962
30134
|
export function resume(): void;
|
|
29963
30135
|
|
|
30136
|
+
/**
|
|
30137
|
+
* Checks whether the engine is currently speaking. On Mac OS X, the result is true whenever the system speech engine is speaking, even if the speech wasn't initiated by Chrome.
|
|
30138
|
+
*
|
|
30139
|
+
* @chrome-returns-extra since Pending
|
|
30140
|
+
*/
|
|
30141
|
+
export function isSpeaking(): Promise<boolean>;
|
|
30142
|
+
|
|
29964
30143
|
/**
|
|
29965
30144
|
* Checks whether the engine is currently speaking. On Mac OS X, the result is true whenever the system speech engine is speaking, even if the speech wasn't initiated by Chrome.
|
|
29966
30145
|
*/
|
|
@@ -29974,6 +30153,13 @@ declare namespace chrome {
|
|
|
29974
30153
|
) => void,
|
|
29975
30154
|
): void;
|
|
29976
30155
|
|
|
30156
|
+
/**
|
|
30157
|
+
* Gets an array of all available voices.
|
|
30158
|
+
*
|
|
30159
|
+
* @chrome-returns-extra since Pending
|
|
30160
|
+
*/
|
|
30161
|
+
export function getVoices(): Promise<TtsVoice[]>;
|
|
30162
|
+
|
|
29977
30163
|
/**
|
|
29978
30164
|
* Gets an array of all available voices.
|
|
29979
30165
|
*/
|
package/index.d.ts
CHANGED
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
// Generated on
|
|
18
|
-
// Built at
|
|
17
|
+
// Generated on Wed Mar 09 2022 22:28:02 GMT+0000 (Coordinated Universal Time)
|
|
18
|
+
// Built at 0cac0c047f8f4d2aef880f7d28b7aa418a194e98
|
|
19
19
|
|
|
20
20
|
// Includes MV3+ APIs only.
|
|
21
21
|
|
|
@@ -849,6 +849,245 @@ declare namespace chrome {
|
|
|
849
849
|
): void;
|
|
850
850
|
}
|
|
851
851
|
|
|
852
|
+
/**
|
|
853
|
+
* The `chrome.audio` API is provided to allow users to get information about and control the audio devices attached to the system. This API is currently only available in kiosk mode for ChromeOS.
|
|
854
|
+
*
|
|
855
|
+
* @since Chrome 59
|
|
856
|
+
* @chrome-permission audio
|
|
857
|
+
* @chrome-platform chromeos
|
|
858
|
+
*/
|
|
859
|
+
export namespace audio {
|
|
860
|
+
|
|
861
|
+
/**
|
|
862
|
+
* Type of stream an audio device provides.
|
|
863
|
+
*/
|
|
864
|
+
export type StreamType = "INPUT" | "OUTPUT";
|
|
865
|
+
|
|
866
|
+
/**
|
|
867
|
+
* Available audio device types.
|
|
868
|
+
*/
|
|
869
|
+
export type DeviceType = "HEADPHONE" | "MIC" | "USB" | "BLUETOOTH" | "HDMI" | "INTERNAL_SPEAKER" | "INTERNAL_MIC" | "FRONT_MIC" | "REAR_MIC" | "KEYBOARD_MIC" | "HOTWORD" | "LINEOUT" | "POST_MIX_LOOPBACK" | "POST_DSP_LOOPBACK" | "ALSA_LOOPBACK" | "OTHER";
|
|
870
|
+
|
|
871
|
+
export interface AudioDeviceInfo {
|
|
872
|
+
|
|
873
|
+
/**
|
|
874
|
+
* The unique identifier of the audio device.
|
|
875
|
+
*/
|
|
876
|
+
id: string;
|
|
877
|
+
|
|
878
|
+
/**
|
|
879
|
+
* Stream type associated with this device.
|
|
880
|
+
*/
|
|
881
|
+
streamType: StreamType;
|
|
882
|
+
|
|
883
|
+
/**
|
|
884
|
+
* Type of the device.
|
|
885
|
+
*/
|
|
886
|
+
deviceType: DeviceType;
|
|
887
|
+
|
|
888
|
+
/**
|
|
889
|
+
* The user-friendly name (e.g. "USB Microphone").
|
|
890
|
+
*/
|
|
891
|
+
displayName: string;
|
|
892
|
+
|
|
893
|
+
/**
|
|
894
|
+
* Device name.
|
|
895
|
+
*/
|
|
896
|
+
deviceName: string;
|
|
897
|
+
|
|
898
|
+
/**
|
|
899
|
+
* True if this is the current active device.
|
|
900
|
+
*/
|
|
901
|
+
isActive: boolean;
|
|
902
|
+
|
|
903
|
+
/**
|
|
904
|
+
* The sound level of the device, volume for output, gain for input.
|
|
905
|
+
*/
|
|
906
|
+
level: number;
|
|
907
|
+
|
|
908
|
+
/**
|
|
909
|
+
* The stable/persisted device id string when available.
|
|
910
|
+
*/
|
|
911
|
+
stableDeviceId?: string;
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
export interface DeviceFilter {
|
|
915
|
+
|
|
916
|
+
/**
|
|
917
|
+
* If set, only audio devices whose stream type is included in this list will satisfy the filter.
|
|
918
|
+
*/
|
|
919
|
+
streamTypes?: StreamType[];
|
|
920
|
+
|
|
921
|
+
/**
|
|
922
|
+
* If set, only audio devices whose active state matches this value will satisfy the filter.
|
|
923
|
+
*/
|
|
924
|
+
isActive?: boolean;
|
|
925
|
+
}
|
|
926
|
+
|
|
927
|
+
export interface DeviceProperties {
|
|
928
|
+
|
|
929
|
+
/**
|
|
930
|
+
* The audio device's desired sound level. Defaults to the device's current sound level.
|
|
931
|
+
*
|
|
932
|
+
* If used with audio input device, represents audio device gain.
|
|
933
|
+
*
|
|
934
|
+
* If used with audio output device, represents audio device volume.
|
|
935
|
+
*/
|
|
936
|
+
level?: number;
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
export interface DeviceIdLists {
|
|
940
|
+
|
|
941
|
+
/**
|
|
942
|
+
* List of input devices specified by their ID.
|
|
943
|
+
*
|
|
944
|
+
* To indicate input devices should be unaffected, leave this property unset.
|
|
945
|
+
*/
|
|
946
|
+
input?: string[];
|
|
947
|
+
|
|
948
|
+
/**
|
|
949
|
+
* List of output devices specified by their ID.
|
|
950
|
+
*
|
|
951
|
+
* To indicate output devices should be unaffected, leave this property unset.
|
|
952
|
+
*/
|
|
953
|
+
output?: string[];
|
|
954
|
+
}
|
|
955
|
+
|
|
956
|
+
export interface MuteChangedEvent {
|
|
957
|
+
|
|
958
|
+
/**
|
|
959
|
+
* The type of the stream for which the mute value changed. The updated mute value applies to all devices with this stream type.
|
|
960
|
+
*/
|
|
961
|
+
streamType: StreamType;
|
|
962
|
+
|
|
963
|
+
/**
|
|
964
|
+
* Whether or not the stream is now muted.
|
|
965
|
+
*/
|
|
966
|
+
isMuted: boolean;
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
export interface LevelChangedEvent {
|
|
970
|
+
|
|
971
|
+
/**
|
|
972
|
+
* ID of device whose sound level has changed.
|
|
973
|
+
*/
|
|
974
|
+
deviceId: string;
|
|
975
|
+
|
|
976
|
+
/**
|
|
977
|
+
* The device's new sound level.
|
|
978
|
+
*/
|
|
979
|
+
level: number;
|
|
980
|
+
}
|
|
981
|
+
|
|
982
|
+
/**
|
|
983
|
+
* Fired when sound level changes for an active audio device.
|
|
984
|
+
*/
|
|
985
|
+
export const onLevelChanged: events.Event<(
|
|
986
|
+
event: LevelChangedEvent,
|
|
987
|
+
) => void>;
|
|
988
|
+
|
|
989
|
+
/**
|
|
990
|
+
* Fired when the mute state of the audio input or output changes. Note that mute state is system-wide and the new value applies to every audio device with specified stream type.
|
|
991
|
+
*/
|
|
992
|
+
export const onMuteChanged: events.Event<(
|
|
993
|
+
event: MuteChangedEvent,
|
|
994
|
+
) => void>;
|
|
995
|
+
|
|
996
|
+
/**
|
|
997
|
+
* Fired when audio devices change, either new devices being added, or existing devices being removed.
|
|
998
|
+
*/
|
|
999
|
+
export const onDeviceListChanged: events.Event<(
|
|
1000
|
+
devices: AudioDeviceInfo[],
|
|
1001
|
+
) => void>;
|
|
1002
|
+
|
|
1003
|
+
/**
|
|
1004
|
+
* Gets a list of audio devices filtered based on `filter`.
|
|
1005
|
+
*
|
|
1006
|
+
* @param filter Device properties by which to filter the list of returned audio devices. If the filter is not set or set to `{}`, returned device list will contain all available audio devices.
|
|
1007
|
+
* @param callback Reports the requested list of audio devices.
|
|
1008
|
+
*/
|
|
1009
|
+
export function getDevices(
|
|
1010
|
+
|
|
1011
|
+
filter: DeviceFilter,
|
|
1012
|
+
|
|
1013
|
+
callback: (
|
|
1014
|
+
devices: AudioDeviceInfo[],
|
|
1015
|
+
) => void,
|
|
1016
|
+
): void;
|
|
1017
|
+
|
|
1018
|
+
/**
|
|
1019
|
+
* Gets a list of audio devices filtered based on `filter`.
|
|
1020
|
+
*
|
|
1021
|
+
* @param callback Reports the requested list of audio devices.
|
|
1022
|
+
*/
|
|
1023
|
+
export function getDevices(
|
|
1024
|
+
|
|
1025
|
+
callback: (
|
|
1026
|
+
devices: AudioDeviceInfo[],
|
|
1027
|
+
) => void,
|
|
1028
|
+
): void;
|
|
1029
|
+
|
|
1030
|
+
/**
|
|
1031
|
+
* Sets lists of active input and/or output devices.
|
|
1032
|
+
*
|
|
1033
|
+
* @param ids
|
|
1034
|
+
|
|
1035
|
+
Specifies IDs of devices that should be active. If either the input or output list is not set, devices in that category are unaffected.
|
|
1036
|
+
|
|
1037
|
+
It is an error to pass in a non-existent device ID.
|
|
1038
|
+
|
|
1039
|
+
**NOTE:** While the method signature allows device IDs to be passed as a list of strings, this method of setting active devices is deprecated and should not be relied upon to work. Please use {@link DeviceIdLists} instead.
|
|
1040
|
+
*/
|
|
1041
|
+
export function setActiveDevices(
|
|
1042
|
+
|
|
1043
|
+
ids: DeviceIdLists | string[],
|
|
1044
|
+
|
|
1045
|
+
callback: () => void,
|
|
1046
|
+
): void;
|
|
1047
|
+
|
|
1048
|
+
/**
|
|
1049
|
+
* Sets the properties for the input or output device.
|
|
1050
|
+
*/
|
|
1051
|
+
export function setProperties(
|
|
1052
|
+
|
|
1053
|
+
id: string,
|
|
1054
|
+
|
|
1055
|
+
properties: DeviceProperties,
|
|
1056
|
+
|
|
1057
|
+
callback: () => void,
|
|
1058
|
+
): void;
|
|
1059
|
+
|
|
1060
|
+
/**
|
|
1061
|
+
* Gets the system-wide mute state for the specified stream type.
|
|
1062
|
+
*
|
|
1063
|
+
* @param streamType Stream type for which mute state should be fetched.
|
|
1064
|
+
* @param callback Callback reporting whether mute is set or not for specified stream type.
|
|
1065
|
+
*/
|
|
1066
|
+
export function getMute(
|
|
1067
|
+
|
|
1068
|
+
streamType: StreamType,
|
|
1069
|
+
|
|
1070
|
+
callback: (
|
|
1071
|
+
value: boolean,
|
|
1072
|
+
) => void,
|
|
1073
|
+
): void;
|
|
1074
|
+
|
|
1075
|
+
/**
|
|
1076
|
+
* Sets mute state for a stream type. The mute state will apply to all audio devices with the specified audio stream type.
|
|
1077
|
+
*
|
|
1078
|
+
* @param streamType Stream type for which mute state should be set.
|
|
1079
|
+
* @param isMuted New mute value.
|
|
1080
|
+
*/
|
|
1081
|
+
export function setMute(
|
|
1082
|
+
|
|
1083
|
+
streamType: StreamType,
|
|
1084
|
+
|
|
1085
|
+
isMuted: boolean,
|
|
1086
|
+
|
|
1087
|
+
callback?: () => void,
|
|
1088
|
+
): void;
|
|
1089
|
+
}
|
|
1090
|
+
|
|
852
1091
|
/**
|
|
853
1092
|
* The `chrome.automation` API allows developers to access the automation (accessibility) tree for the browser. The tree resembles the DOM tree, but only exposes the _semantic_ structure of a page. It can be used to programmatically interact with a page by examining names, roles, and states, listening for events, and performing actions on nodes.
|
|
854
1093
|
*
|
|
@@ -5643,7 +5882,7 @@ declare namespace chrome {
|
|
|
5643
5882
|
isUrlFilterCaseSensitive?: boolean;
|
|
5644
5883
|
|
|
5645
5884
|
/**
|
|
5646
|
-
* The rule will only match network requests originating from the list of `
|
|
5885
|
+
* The rule will only match network requests originating from the list of `initiatorDomains`. If the list is omitted, the rule is applied to requests from all domains. An empty list is not allowed.
|
|
5647
5886
|
*
|
|
5648
5887
|
* Notes:
|
|
5649
5888
|
*
|
|
@@ -5651,11 +5890,13 @@ declare namespace chrome {
|
|
|
5651
5890
|
* * The entries must consist of only ascii characters.
|
|
5652
5891
|
* * Use punycode encoding for internationalized domains.
|
|
5653
5892
|
* * This matches against the request initiator and not the request url.
|
|
5893
|
+
*
|
|
5894
|
+
* @since Pending
|
|
5654
5895
|
*/
|
|
5655
|
-
|
|
5896
|
+
initiatorDomains?: string[];
|
|
5656
5897
|
|
|
5657
5898
|
/**
|
|
5658
|
-
* The rule will not match network requests originating from the list of `excludedDomains`. If the list is empty or omitted, no domains are excluded. This takes precedence over `
|
|
5899
|
+
* The rule will not match network requests originating from the list of `excludedDomains`. If the list is empty or omitted, no domains are excluded. This takes precedence over `initiatorDomains`.
|
|
5659
5900
|
*
|
|
5660
5901
|
* Notes:
|
|
5661
5902
|
*
|
|
@@ -5663,6 +5904,48 @@ declare namespace chrome {
|
|
|
5663
5904
|
* * The entries must consist of only ascii characters.
|
|
5664
5905
|
* * Use punycode encoding for internationalized domains.
|
|
5665
5906
|
* * This matches against the request initiator and not the request url.
|
|
5907
|
+
*
|
|
5908
|
+
* @since Pending
|
|
5909
|
+
*/
|
|
5910
|
+
excludedInitiatorDomains?: string[];
|
|
5911
|
+
|
|
5912
|
+
/**
|
|
5913
|
+
* The rule will only match network requests when the domain matches one from the list of `requestDomains`. If the list is omitted, the rule is applied to requests from all domains. An empty list is not allowed.
|
|
5914
|
+
*
|
|
5915
|
+
* Notes:
|
|
5916
|
+
*
|
|
5917
|
+
* * Sub-domains like "a.example.com" are also allowed.
|
|
5918
|
+
* * The entries must consist of only ascii characters.
|
|
5919
|
+
* * Use punycode encoding for internationalized domains.
|
|
5920
|
+
*
|
|
5921
|
+
* @since Pending
|
|
5922
|
+
*/
|
|
5923
|
+
requestDomains?: string[];
|
|
5924
|
+
|
|
5925
|
+
/**
|
|
5926
|
+
* The rule will not match network requests when the domains matches one from the list of `excludedDomains`. If the list is empty or omitted, no domains are excluded. This takes precedence over `requestDomains`.
|
|
5927
|
+
*
|
|
5928
|
+
* Notes:
|
|
5929
|
+
*
|
|
5930
|
+
* * Sub-domains like "a.example.com" are also allowed.
|
|
5931
|
+
* * The entries must consist of only ascii characters.
|
|
5932
|
+
* * Use punycode encoding for internationalized domains.
|
|
5933
|
+
*
|
|
5934
|
+
* @since Pending
|
|
5935
|
+
*/
|
|
5936
|
+
excludedRequestDomains?: string[];
|
|
5937
|
+
|
|
5938
|
+
/**
|
|
5939
|
+
* The rule will only match network requests originating from the list of `domains`.
|
|
5940
|
+
*
|
|
5941
|
+
* @deprecated Use {@link initiatorDomains} instead
|
|
5942
|
+
*/
|
|
5943
|
+
domains?: string[];
|
|
5944
|
+
|
|
5945
|
+
/**
|
|
5946
|
+
* The rule will not match network requests originating from the list of `excludedDomains`.
|
|
5947
|
+
*
|
|
5948
|
+
* @deprecated Use {@link excludedInitiatorDomains} instead
|
|
5666
5949
|
*/
|
|
5667
5950
|
excludedDomains?: string[];
|
|
5668
5951
|
|
|
@@ -19985,6 +20268,20 @@ declare namespace chrome {
|
|
|
19985
20268
|
eventTypes?: EventType[];
|
|
19986
20269
|
}
|
|
19987
20270
|
|
|
20271
|
+
/**
|
|
20272
|
+
* Speaks text using a text-to-speech engine.
|
|
20273
|
+
*
|
|
20274
|
+
* @chrome-returns-extra since Pending
|
|
20275
|
+
* @param utterance The text to speak, either plain text or a complete, well-formed SSML document. Speech engines that do not support SSML will strip away the tags and speak the text. The maximum length of the text is 32,768 characters.
|
|
20276
|
+
* @param options The speech options.
|
|
20277
|
+
*/
|
|
20278
|
+
export function speak(
|
|
20279
|
+
|
|
20280
|
+
utterance: string,
|
|
20281
|
+
|
|
20282
|
+
options?: TtsOptions,
|
|
20283
|
+
): Promise<void>;
|
|
20284
|
+
|
|
19988
20285
|
/**
|
|
19989
20286
|
* Speaks text using a text-to-speech engine.
|
|
19990
20287
|
*
|
|
@@ -20016,6 +20313,13 @@ declare namespace chrome {
|
|
|
20016
20313
|
*/
|
|
20017
20314
|
export function resume(): void;
|
|
20018
20315
|
|
|
20316
|
+
/**
|
|
20317
|
+
* Checks whether the engine is currently speaking. On Mac OS X, the result is true whenever the system speech engine is speaking, even if the speech wasn't initiated by Chrome.
|
|
20318
|
+
*
|
|
20319
|
+
* @chrome-returns-extra since Pending
|
|
20320
|
+
*/
|
|
20321
|
+
export function isSpeaking(): Promise<boolean>;
|
|
20322
|
+
|
|
20019
20323
|
/**
|
|
20020
20324
|
* Checks whether the engine is currently speaking. On Mac OS X, the result is true whenever the system speech engine is speaking, even if the speech wasn't initiated by Chrome.
|
|
20021
20325
|
*/
|
|
@@ -20029,6 +20333,13 @@ declare namespace chrome {
|
|
|
20029
20333
|
) => void,
|
|
20030
20334
|
): void;
|
|
20031
20335
|
|
|
20336
|
+
/**
|
|
20337
|
+
* Gets an array of all available voices.
|
|
20338
|
+
*
|
|
20339
|
+
* @chrome-returns-extra since Pending
|
|
20340
|
+
*/
|
|
20341
|
+
export function getVoices(): Promise<TtsVoice[]>;
|
|
20342
|
+
|
|
20032
20343
|
/**
|
|
20033
20344
|
* Gets an array of all available voices.
|
|
20034
20345
|
*/
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"type": "module",
|
|
6
6
|
"name": "chrome-types",
|
|
7
7
|
"config": {
|
|
8
|
-
"build-hash": "
|
|
8
|
+
"build-hash": "0c1e8e266ce57545"
|
|
9
9
|
},
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
@@ -16,5 +16,5 @@
|
|
|
16
16
|
"url": "https://github.com/GoogleChrome/chrome-types/issues"
|
|
17
17
|
},
|
|
18
18
|
"homepage": "https://github.com/GoogleChrome/chrome-types",
|
|
19
|
-
"version": "0.1.
|
|
19
|
+
"version": "0.1.93"
|
|
20
20
|
}
|