Class: shaka.hls.Tag

Constructor

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

Creates an HLS tag object.
Parameters:
Name Type Attributes Description
id number
name string
attributes Array.<shaka.hls.Attribute>
value string <optional>
<nullable>
Source:

Members

(constant) attributes :Array.<shaka.hls.Attribute>

Type:
Source:

(constant) id :number

Type:
  • number
Source:

(constant) name :string

Type:
  • string
Source:

(constant, nullable) 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) → (nullable) {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) → (nullable) {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

toString() → {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.
Source:
Returns:
Type
string