org.openqa.selenium.devtools.v119.webaudio.WebAudio Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of selenium-devtools-v119 Show documentation
Show all versions of selenium-devtools-v119 Show documentation
Selenium automates browsers. That's it! What you do with that power is entirely up to you.
package org.openqa.selenium.devtools.v119.webaudio;
import org.openqa.selenium.Beta;
import org.openqa.selenium.devtools.Command;
import org.openqa.selenium.devtools.Event;
import org.openqa.selenium.devtools.ConverterFunctions;
import java.util.Map;
import java.util.LinkedHashMap;
import org.openqa.selenium.json.JsonInput;
/**
* This domain allows inspection of Web Audio API.
* https://webaudio.github.io/web-audio-api/
*/
@Beta()
public class WebAudio {
/**
* Enables the WebAudio domain and starts sending context lifetime events.
*/
public static Command enable() {
LinkedHashMap params = new LinkedHashMap<>();
return new Command<>("WebAudio.enable", Map.copyOf(params));
}
/**
* Disables the WebAudio domain.
*/
public static Command disable() {
LinkedHashMap params = new LinkedHashMap<>();
return new Command<>("WebAudio.disable", Map.copyOf(params));
}
/**
* Fetch the realtime data from the registered contexts.
*/
public static Command getRealtimeData(org.openqa.selenium.devtools.v119.webaudio.model.GraphObjectId contextId) {
java.util.Objects.requireNonNull(contextId, "contextId is required");
LinkedHashMap params = new LinkedHashMap<>();
params.put("contextId", contextId);
return new Command<>("WebAudio.getRealtimeData", Map.copyOf(params), ConverterFunctions.map("realtimeData", org.openqa.selenium.devtools.v119.webaudio.model.ContextRealtimeData.class));
}
public static Event contextCreated() {
return new Event<>("WebAudio.contextCreated", ConverterFunctions.map("context", org.openqa.selenium.devtools.v119.webaudio.model.BaseAudioContext.class));
}
public static Event contextWillBeDestroyed() {
return new Event<>("WebAudio.contextWillBeDestroyed", ConverterFunctions.map("contextId", org.openqa.selenium.devtools.v119.webaudio.model.GraphObjectId.class));
}
public static Event contextChanged() {
return new Event<>("WebAudio.contextChanged", ConverterFunctions.map("context", org.openqa.selenium.devtools.v119.webaudio.model.BaseAudioContext.class));
}
public static Event audioListenerCreated() {
return new Event<>("WebAudio.audioListenerCreated", ConverterFunctions.map("listener", org.openqa.selenium.devtools.v119.webaudio.model.AudioListener.class));
}
public static Event audioListenerWillBeDestroyed() {
return new Event<>("WebAudio.audioListenerWillBeDestroyed", input -> input.read(org.openqa.selenium.devtools.v119.webaudio.model.AudioListenerWillBeDestroyed.class));
}
public static Event audioNodeCreated() {
return new Event<>("WebAudio.audioNodeCreated", ConverterFunctions.map("node", org.openqa.selenium.devtools.v119.webaudio.model.AudioNode.class));
}
public static Event audioNodeWillBeDestroyed() {
return new Event<>("WebAudio.audioNodeWillBeDestroyed", input -> input.read(org.openqa.selenium.devtools.v119.webaudio.model.AudioNodeWillBeDestroyed.class));
}
public static Event audioParamCreated() {
return new Event<>("WebAudio.audioParamCreated", ConverterFunctions.map("param", org.openqa.selenium.devtools.v119.webaudio.model.AudioParam.class));
}
public static Event audioParamWillBeDestroyed() {
return new Event<>("WebAudio.audioParamWillBeDestroyed", input -> input.read(org.openqa.selenium.devtools.v119.webaudio.model.AudioParamWillBeDestroyed.class));
}
public static Event nodesConnected() {
return new Event<>("WebAudio.nodesConnected", input -> input.read(org.openqa.selenium.devtools.v119.webaudio.model.NodesConnected.class));
}
public static Event nodesDisconnected() {
return new Event<>("WebAudio.nodesDisconnected", input -> input.read(org.openqa.selenium.devtools.v119.webaudio.model.NodesDisconnected.class));
}
public static Event nodeParamConnected() {
return new Event<>("WebAudio.nodeParamConnected", input -> input.read(org.openqa.selenium.devtools.v119.webaudio.model.NodeParamConnected.class));
}
public static Event nodeParamDisconnected() {
return new Event<>("WebAudio.nodeParamDisconnected", input -> input.read(org.openqa.selenium.devtools.v119.webaudio.model.NodeParamDisconnected.class));
}
}