Constructor
new Tag(id, namenon-null, attributesnon-null, opt_valueopt, nullable)
Creates an HLS tag object.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
id |
number | ||
name |
string | ||
attributes |
Array.<shaka.hls.Attribute> | ||
opt_value |
string |
<optional> <nullable> |
- Source:
Members
-
(constant) attributes :Array.<shaka.hls.Attribute>
-
Type:
- Array.<shaka.hls.Attribute>
- Source:
-
(constant) id :number
-
Type:
- number
- Source:
-
(constant, non-null) 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(namenon-null) → (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(namenon-null, opt_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 opt_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 with 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