Back to Exoplayer

UrlTemplate (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/source/dash/manifest/UrlTemplate.html

latest3.1 KB
Original Source

Package com.google.android.exoplayer2.source.dash.manifest

Class UrlTemplate

  • java.lang.Object

    • com.google.android.exoplayer2.source.dash.manifest.UrlTemplate

[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final classUrlTemplateextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")

Deprecated. com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.

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.

Method Summary

All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description | | --- | --- | --- | | String | buildUri​(String representationId, long segmentNumber, int bandwidth, long time) | Deprecated.

Constructs a Uri from the template, substituting in the provided arguments. | | static UrlTemplate | compile​(String template) | Deprecated.

Compile an instance from the provided template string. |

- 

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

- 

compile

public static[UrlTemplate](UrlTemplate.html "class in com.google.android.exoplayer2.source.dash.manifest")compile​([String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")template)

Deprecated.

Compile an instance from the provided template string. Parameters:template - The template.Returns:The compiled instance.Throws:IllegalArgumentException - If the template string is malformed.

- 

buildUri

public[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")buildUri​([String](https://developer.android.com/reference/java/lang/String.html?is-external=true "class or interface in java.lang")representationId,
                       long segmentNumber,
                       int bandwidth,
                       long time)

Deprecated.

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 - The representation identifier.segmentNumber - The segment number.bandwidth - The bandwidth.time - The time as specified by the segment timeline.Returns:The built Uri.