mirror of
https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak.git
synced 2026-12-03 20:12:52 +08:00
feat(kaak): match KOOK audio device picker
This commit is contained in:
1 parent
70cc6c3bbf
commit
8e580e7e18
15 files changed
+408
-59
No files matched your search
@@ -52,6 +52,17 @@ test("a completed newer device selection retires older errors", async t => {
|
||||
assert.equal(controls.settingsError.value, "");
|
||||
});
|
||||
|
||||
test("the custom device picker can select input and output devices by ID", async t => {
|
||||
const selected = [];
|
||||
const { controls } = mount(t, {
|
||||
setInputDevice: async deviceId => selected.push(["input", deviceId]),
|
||||
setOutputDevice: async deviceId => selected.push(["output", deviceId]),
|
||||
});
|
||||
await controls.onInputDeviceChange("microphone-id");
|
||||
await controls.onOutputDeviceChange("speaker-id");
|
||||
assert.deepEqual(selected, [["input", "microphone-id"], ["output", "speaker-id"]]);
|
||||
});
|
||||
|
||||
test("an earlier selection cannot replace the current selection's error", async t => {
|
||||
const old = deferred();
|
||||
const { controls } = mount(t, { setInputDevice: () => old.promise, setOutputDevice: async () => { throw new Error("current output"); } });
|
||||
|
||||
Reference in new issue
Block a user