All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.openqa.selenium.devtools.v119.media.Media Maven / Gradle / Ivy

Go to download

Selenium automates browsers. That's it! What you do with that power is entirely up to you.

There is a newer version: 4.18.0
Show newest version
package org.openqa.selenium.devtools.v119.media;

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 detailed inspection of media elements
 */
@Beta()
public class Media {

    /**
     * Enables the Media domain
     */
    public static Command enable() {
        LinkedHashMap params = new LinkedHashMap<>();
        return new Command<>("Media.enable", Map.copyOf(params));
    }

    /**
     * Disables the Media domain.
     */
    public static Command disable() {
        LinkedHashMap params = new LinkedHashMap<>();
        return new Command<>("Media.disable", Map.copyOf(params));
    }

    public static Event playerPropertiesChanged() {
        return new Event<>("Media.playerPropertiesChanged", input -> input.read(org.openqa.selenium.devtools.v119.media.model.PlayerPropertiesChanged.class));
    }

    public static Event playerEventsAdded() {
        return new Event<>("Media.playerEventsAdded", input -> input.read(org.openqa.selenium.devtools.v119.media.model.PlayerEventsAdded.class));
    }

    public static Event playerMessagesLogged() {
        return new Event<>("Media.playerMessagesLogged", input -> input.read(org.openqa.selenium.devtools.v119.media.model.PlayerMessagesLogged.class));
    }

    public static Event playerErrorsRaised() {
        return new Event<>("Media.playerErrorsRaised", input -> input.read(org.openqa.selenium.devtools.v119.media.model.PlayerErrorsRaised.class));
    }

    public static Event> playersCreated() {
        return new Event<>("Media.playersCreated", ConverterFunctions.map("players", java.util.List.class));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy