Class: shaka.hls.Tag

Constructor

new Tag(id, name, attributesnon-null, valueopt, nullable)

Parameters:
Name Type Attributes Default Description
id number
name string
attributes Array.<shaka.hls.Attribute>
value string <optional>
<nullable>
null
Source:

Members

attributes :Array.<shaka.hls.Attribute>

Type:
Source:

id :number

Type:
  • number
Source:

name :string

Type:
  • string
Source:

value :string

Type:
  • string
Source:

Methods

addAttribute(attributenon-null)

Adds an attribute to an HLS Tag.
Parameters:
Name Type Description
attribute shaka.hls.Attribute
Source:

getAttribute(name) → {shaka.hls.Attribute}

Gets the first attribute of the tag with a specified name.
Parameters:
Name Type Description
name string
Source:
Returns:
attribute
Type
shaka.hls.Attribute

getAttributeValue(name, defaultValueopt) → {string}

Gets the value of the first attribute of the tag with a specified name. If not found, returns an optional default value.
Parameters:
Name Type Attributes Description
name string
defaultValue string <optional>
Source:
Returns:
Type
string

getRequiredAttrValue(name) → {string}

Finds the attribute and returns its value. Throws an error if attribute was not found.
Parameters:
Name Type Description
name string
Source:
Returns:
Type
string

getTagKey() → {string}

Create the string key of the tag.
Source:
Returns:
Type
string

setName(name)

Set the name of the tag. Used only for Preload hinted MAP tag.
Parameters:
Name Type Description
name string
Source:

toString(attributesToSkipopt, nullable) → {string}

Create the string representation of the tag. For the DRM system - the full tag needs to be passed down to the CDM. There are two ways of doing this (1) save the original tag or (2) recreate the tag. As in some cases (like in tests) the tag never existed in string form, it is far easier to recreate the tag from the parsed form.
Parameters:
Name Type Attributes Description
attributesToSkip Set.<string> <optional>
<nullable>
Source:
Returns:
Type
string