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

org.openqa.selenium.devtools.v85.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.26.0
Show newest version
package org.openqa.selenium.devtools.v85.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 com.google.common.collect.ImmutableMap;
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() {
        ImmutableMap.Builder params = ImmutableMap.builder();
        return new Command<>("Media.enable", params.build());
    }

    /**
     * Disables the Media domain.
     */
    public static Command disable() {
        ImmutableMap.Builder params = ImmutableMap.builder();
        return new Command<>("Media.disable", params.build());
    }

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

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

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

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

    public static Event> playersCreated() {
        return new Event<>("Media.playersCreated", ConverterFunctions.map("players", new com.google.common.reflect.TypeToken>() {
        }.getType()));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy