Skip to content

Function: getUrlFromTemplate() ​

ts
function getUrlFromTemplate(
   representation, 
   segmentTemplate, 
   segmentId
): string;

Defined in: mapper/dash/mapDashToHam/utils/getUrlFromTemplate.ts:18

Internal

Create the url from a segment template.

Searches for substrings with the format $value$ and replaces it with the correct value.

  • RepresentationID: id of the representation
  • Number: id of the segment. %0Xd defines the number X of digits it needs to have

Parameters ​

representation ​

Representation

Representation of the template

segmentTemplate ​

SegmentTemplate

Segment template

segmentId ​

number

Segment id

Returns ​

string

url from the segment template

A Streaming Video Technology Alliance project.