@UnstableApi
class UrlTemplate


A template from which URLs can be built.

URLs are built according to the substitution rules defined in ISO/IEC 23009-1:2014 5.3.9.4.4.

Summary

Public functions

String!
buildUri(
    representationId: String!,
    segmentNumber: Long,
    bandwidth: Int,
    time: Long
)

Constructs a Uri from the template, substituting in the provided arguments.

java-static UrlTemplate!
compile(template: String!)

Compile an instance from the provided template string.

Public functions

buildUri

fun buildUri(
    representationId: String!,
    segmentNumber: Long,
    bandwidth: Int,
    time: Long
): String!

Constructs a Uri from the template, substituting in the provided arguments.

Arguments whose corresponding identifiers are not present in the template will be ignored.

Parameters
representationId: String!

The representation identifier.

segmentNumber: Long

The segment number.

bandwidth: Int

The bandwidth.

time: Long

The time as specified by the segment timeline.

Returns
String!

The built Uri.

compile

java-static fun compile(template: String!): UrlTemplate!

Compile an instance from the provided template string.

Parameters
template: String!

The template.

Returns
UrlTemplate!

The compiled instance.

Throws
java.lang.IllegalArgumentException

If the template string is malformed.