OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // The <code>chrome.webrtcAudioPrivate</code> API allows enumeration | 5 // The <code>chrome.webrtcAudioPrivate</code> API allows enumeration |
6 // of audio output (sink) devices as well as getting and setting the | 6 // of audio output (sink) devices as well as getting and setting the |
7 // active device for a given requesting process. | 7 // active device for a given requesting process. |
8 // | 8 // |
9 // Note that device IDs as used in this API are opaque (i.e. they are | 9 // Note that device IDs as used in this API are opaque (i.e. they are |
10 // not the hardware identifier of the device) and while they are | 10 // not the hardware identifier of the device) and while they are |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
43 | 43 |
44 dictionary RequestInfo { | 44 dictionary RequestInfo { |
45 // The tab identifier from the chrome.tabs API, if the request is from a | 45 // The tab identifier from the chrome.tabs API, if the request is from a |
46 // tab. | 46 // tab. |
47 long? tabId; | 47 long? tabId; |
48 // The guest process id for the requester, if the request is from a | 48 // The guest process id for the requester, if the request is from a |
49 // webview. | 49 // webview. |
50 long? guestProcessId; | 50 long? guestProcessId; |
51 }; | 51 }; |
52 | 52 |
53 dictionary AudioExperiments { | |
54 // Enables or disables the new acoustic echo canceller (AEC3) in WebRTC. | |
55 boolean? enableAec3; | |
56 }; | |
57 | |
53 interface Functions { | 58 interface Functions { |
54 // Retrieves a list of available audio sink devices. | 59 // Retrieves a list of available audio sink devices. |
55 static void getSinks(GetSinksCallback callback); | 60 static void getSinks(GetSinksCallback callback); |
56 | 61 |
57 // Retrieves the currently active audio sink for the given requesting | 62 // Retrieves the currently active audio sink for the given requesting |
58 // process. | 63 // process. |
59 static void getActiveSink(RequestInfo request, | 64 static void getActiveSink(RequestInfo request, |
60 SinkIdCallback callback); | 65 SinkIdCallback callback); |
61 | 66 |
62 // Sets the active audio sink device for the specified requesting process. | 67 // Sets the active audio sink device for the specified requesting process. |
63 static void setActiveSink(RequestInfo request, | 68 static void setActiveSink(RequestInfo request, |
64 DOMString sinkId, | 69 DOMString sinkId, |
65 optional CompletionCallback callback); | 70 optional CompletionCallback callback); |
66 | 71 |
67 // Given a security origin and an input device ID valid for that | 72 // Given a security origin and an input device ID valid for that |
68 // security origin, retrieve an audio sink ID valid for the | 73 // security origin, retrieve an audio sink ID valid for the |
69 // extension, or the empty string if there is no associated audio | 74 // extension, or the empty string if there is no associated audio |
70 // sink. | 75 // sink. |
71 // | 76 // |
72 // The associated sink ID can be used as a sink ID for | 77 // The associated sink ID can be used as a sink ID for |
73 // setActiveSink. It is valid irrespective of which process you are | 78 // setActiveSink. It is valid irrespective of which process you are |
74 // setting the active sink for. | 79 // setting the active sink for. |
75 static void getAssociatedSink(DOMString securityOrigin, | 80 static void getAssociatedSink(DOMString securityOrigin, |
76 DOMString sourceIdInOrigin, | 81 DOMString sourceIdInOrigin, |
77 SinkIdCallback cb); | 82 SinkIdCallback cb); |
83 | |
84 // Provides settings to experiments related to WebRTC audio. | |
85 static void setAudioExperiments(RequestInfo request, | |
Devlin
2017/04/10 21:34:25
Document the parameters this accepts. Also, probab
Henrik Grunell
2017/04/11 06:49:39
I asked the author to remove the callback that was
hlundin-chromium
2017/04/11 09:19:37
Added documentation.
Devlin
2017/04/11 20:49:37
The main reason is consistency with other APIs and
hlundin-chromium
2017/04/12 05:54:16
Time is not on our side now, so I'll prefer to hol
| |
86 DOMString securityOrigin, | |
87 AudioExperiments audioExperiments); | |
78 }; | 88 }; |
79 | 89 |
80 interface Events { | 90 interface Events { |
81 // Fired when audio sink devices are added or removed. | 91 // Fired when audio sink devices are added or removed. |
82 static void onSinksChanged(); | 92 static void onSinksChanged(); |
83 }; | 93 }; |
84 }; | 94 }; |
OLD | NEW |