TimeRange類別

上次更新: 2023-09-21

自訂廣告標籤可讓您將代表時間表區段的一組TimeRange規格傳遞給TVSDK。

集合中的每個TimeRange規格都代表播放時間表上的區段,該區段由TVSDK內部維護,且必須適當地標示為廣告相關期間。

TimeRange class是簡單的資料結構,可在時間軸上顯示開始位置和結束位置。 這兩個唯讀屬性抽象化了播放時間軸中時間範圍的概念。

秘訣

這兩個值都以毫秒為單位表示。

以下為摘要 TimeRange 類別:

public final class TimeRange {
    // the start/end values are provided at construction time
    public static TimeRange createRange(long begin, long duration) {...}

    // only getters are available
    public long getBegin() {...}
    public long getEnd() {...}
    public long getDuration() {...}
}

此頁面上的