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

io.lindstrom.m3u8.model.StartTimeOffset Maven / Gradle / Ivy

There is a newer version: 0.28
Show newest version
package io.lindstrom.m3u8.model;

import org.immutables.value.Value;

/**
 * Start time offset (EXT-X-START)
 *
 * @see 
 * RFC 8216 - 4.3.5.2.  EXT-X-START
 */
@Value.Immutable
public interface StartTimeOffset {
    /**
     * The start offset in seconds. Can be negative.
     * @return start time offset in seconds.
     */
    double timeOffset();

    @Value.Default
    default boolean precise() {
        return false;
    }

    static Builder builder() {
        return new Builder();
    }

    class Builder extends StartTimeOffsetBuilder {
    }

    static StartTimeOffset of(double timeOffset) {
        return of(timeOffset, false);
    }

    static StartTimeOffset of(double timeOffset, boolean precise) {
        return builder().timeOffset(timeOffset).precise(precise).build();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy