8
8
package com .opentok ;
9
9
10
10
/**
11
- * POJO for the 'hls' object node in the 'outputs' section of a Broadcast request's body.
11
+ * Represents HLS options for a live streaming broadcast. Pass this object
12
+ * into the {@link BroadcastProperties.Builder#hls()} method. It is returned by the
13
+ * {@link BroadcastProperties#hls()} method.
12
14
*/
13
15
public class Hls {
14
16
15
17
private final boolean dvr ;
16
18
private final boolean lowLatency ;
17
19
20
+ /**
21
+ * Used to create the Hls object.
22
+ */
18
23
public static class Builder {
19
24
private boolean dvr = false ;
20
25
private boolean lowLatency = false ;
21
26
27
+ /**
28
+ * Whether to enable
29
+ * <a href="https://tokbox.com/developer/guides/broadcast/live-streaming/#dvr">DVR functionality</a> —
30
+ * rewinding, pausing, and resuming — in players that support it (true), or not (false, the default).
31
+ * With DVR enabled, the HLS URL will include a ?DVR query string appended to the end.
32
+ */
22
33
public Builder dvr (boolean dvr ) {
23
34
this .dvr = dvr ;
24
35
return this ;
25
36
}
26
37
38
+ /**
39
+ * Whether to enable
40
+ * <a href="https://tokbox.com/developer/guides/broadcast/live-streaming/#low-latency">low-latency mode</a>
41
+ * for the HLSstream. Some HLS players do not support low-latency mode. This feature is incompatible
42
+ * with DVR mode HLS broadcasts.
43
+ */
27
44
public Builder lowLatency (boolean lowLatency ) {
28
45
this .lowLatency = lowLatency ;
29
46
return this ;
30
47
}
31
48
49
+ /**
50
+ * Builds the HLS object with the selected settings.
51
+ */
32
52
public Hls build () {
33
53
return new Hls (this );
34
54
}
@@ -41,10 +61,20 @@ protected Hls(Builder builder) {
41
61
}
42
62
}
43
63
64
+ /**
65
+ * Whether
66
+ * <a href="https://tokbox.com/developer/guides/broadcast/live-streaming/#dvr">DVR functionality</a> —
67
+ * rewinding, pausing, and resuming — is enabled in players that support it.
68
+ */
44
69
public boolean dvr () {
45
70
return dvr ;
46
71
}
47
72
73
+ /**
74
+ * Whether
75
+ * <a href="https://tokbox.com/developer/guides/broadcast/live-streaming/#low-latency">low-latency mode</a>
76
+ * is enabled for the HLSstream. Some HLS players do not support low-latency mode.
77
+ */
48
78
public boolean lowLatency () {
49
79
return lowLatency ;
50
80
}
0 commit comments