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

org.openqa.selenium.devtools.v90.media.model.PlayerEvent 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.0.0-beta-4
Show newest version
package org.openqa.selenium.devtools.v90.media.model;

import org.openqa.selenium.Beta;
import org.openqa.selenium.json.JsonInput;

/**
 * Corresponds to kMediaEventTriggered
 */
public class PlayerEvent {

    private final org.openqa.selenium.devtools.v90.media.model.Timestamp timestamp;

    private final java.lang.String value;

    public PlayerEvent(org.openqa.selenium.devtools.v90.media.model.Timestamp timestamp, java.lang.String value) {
        this.timestamp = java.util.Objects.requireNonNull(timestamp, "timestamp is required");
        this.value = java.util.Objects.requireNonNull(value, "value is required");
    }

    public org.openqa.selenium.devtools.v90.media.model.Timestamp getTimestamp() {
        return timestamp;
    }

    public java.lang.String getValue() {
        return value;
    }

    private static PlayerEvent fromJson(JsonInput input) {
        org.openqa.selenium.devtools.v90.media.model.Timestamp timestamp = null;
        java.lang.String value = null;
        input.beginObject();
        while (input.hasNext()) {
            switch(input.nextName()) {
                case "timestamp":
                    timestamp = input.read(org.openqa.selenium.devtools.v90.media.model.Timestamp.class);
                    break;
                case "value":
                    value = input.nextString();
                    break;
                default:
                    input.skipValue();
                    break;
            }
        }
        input.endObject();
        return new PlayerEvent(timestamp, value);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy