html_compose.attributes.track_attrs
1from . import BaseAttribute 2from typing import Literal 3from ..base_types import StrLike 4 5 6class TrackAttrs: 7 """ 8 This module contains functions for attributes in the 'track' element. 9 Which is inherited by a class so we can generate type hints 10 """ 11 12 @staticmethod 13 def default(value: bool) -> BaseAttribute: 14 """ 15 "track" attribute: default 16 Enable the track if no other text track is more suitable 17 18 Args: 19 value: 20 Boolean attribute 21 22 Returns: 23 An default attribute to be added to your element 24 25 """ 26 27 return BaseAttribute("default", value) 28 29 @staticmethod 30 def kind( 31 value: Literal[ 32 "subtitles", "captions", "descriptions", "chapters", "metadata" 33 ], 34 ) -> BaseAttribute: 35 """ 36 "track" attribute: kind 37 The type of text track 38 39 Args: 40 value: 41 ['subtitles', 'captions', 'descriptions', 'chapters', 'metadata'] 42 43 Returns: 44 An kind attribute to be added to your element 45 46 """ 47 48 return BaseAttribute("kind", value) 49 50 @staticmethod 51 def label(value: StrLike) -> BaseAttribute: 52 """ 53 "track" attribute: label 54 User-visible label 55 56 Args: 57 value: 58 Text 59 60 Returns: 61 An label attribute to be added to your element 62 63 """ 64 65 return BaseAttribute("label", value) 66 67 @staticmethod 68 def src(value) -> BaseAttribute: 69 """ 70 "track" attribute: src 71 Address of the resource 72 73 Args: 74 value: 75 Valid non-empty URL potentially surrounded by spaces 76 77 Returns: 78 An src attribute to be added to your element 79 80 """ 81 82 return BaseAttribute("src", value) 83 84 @staticmethod 85 def srclang(value) -> BaseAttribute: 86 """ 87 "track" attribute: srclang 88 Language of the text track 89 90 Args: 91 value: 92 Valid BCP 47 language tag 93 94 Returns: 95 An srclang attribute to be added to your element 96 97 """ 98 99 return BaseAttribute("srclang", value)
7class TrackAttrs: 8 """ 9 This module contains functions for attributes in the 'track' element. 10 Which is inherited by a class so we can generate type hints 11 """ 12 13 @staticmethod 14 def default(value: bool) -> BaseAttribute: 15 """ 16 "track" attribute: default 17 Enable the track if no other text track is more suitable 18 19 Args: 20 value: 21 Boolean attribute 22 23 Returns: 24 An default attribute to be added to your element 25 26 """ 27 28 return BaseAttribute("default", value) 29 30 @staticmethod 31 def kind( 32 value: Literal[ 33 "subtitles", "captions", "descriptions", "chapters", "metadata" 34 ], 35 ) -> BaseAttribute: 36 """ 37 "track" attribute: kind 38 The type of text track 39 40 Args: 41 value: 42 ['subtitles', 'captions', 'descriptions', 'chapters', 'metadata'] 43 44 Returns: 45 An kind attribute to be added to your element 46 47 """ 48 49 return BaseAttribute("kind", value) 50 51 @staticmethod 52 def label(value: StrLike) -> BaseAttribute: 53 """ 54 "track" attribute: label 55 User-visible label 56 57 Args: 58 value: 59 Text 60 61 Returns: 62 An label attribute to be added to your element 63 64 """ 65 66 return BaseAttribute("label", value) 67 68 @staticmethod 69 def src(value) -> BaseAttribute: 70 """ 71 "track" attribute: src 72 Address of the resource 73 74 Args: 75 value: 76 Valid non-empty URL potentially surrounded by spaces 77 78 Returns: 79 An src attribute to be added to your element 80 81 """ 82 83 return BaseAttribute("src", value) 84 85 @staticmethod 86 def srclang(value) -> BaseAttribute: 87 """ 88 "track" attribute: srclang 89 Language of the text track 90 91 Args: 92 value: 93 Valid BCP 47 language tag 94 95 Returns: 96 An srclang attribute to be added to your element 97 98 """ 99 100 return BaseAttribute("srclang", value)
This module contains functions for attributes in the 'track' element. Which is inherited by a class so we can generate type hints
13 @staticmethod 14 def default(value: bool) -> BaseAttribute: 15 """ 16 "track" attribute: default 17 Enable the track if no other text track is more suitable 18 19 Args: 20 value: 21 Boolean attribute 22 23 Returns: 24 An default attribute to be added to your element 25 26 """ 27 28 return BaseAttribute("default", value)
"track" attribute: default Enable the track if no other text track is more suitable
Args: value: Boolean attribute
Returns: An default attribute to be added to your element
30 @staticmethod 31 def kind( 32 value: Literal[ 33 "subtitles", "captions", "descriptions", "chapters", "metadata" 34 ], 35 ) -> BaseAttribute: 36 """ 37 "track" attribute: kind 38 The type of text track 39 40 Args: 41 value: 42 ['subtitles', 'captions', 'descriptions', 'chapters', 'metadata'] 43 44 Returns: 45 An kind attribute to be added to your element 46 47 """ 48 49 return BaseAttribute("kind", value)
"track" attribute: kind The type of text track
Args: value: ['subtitles', 'captions', 'descriptions', 'chapters', 'metadata']
Returns: An kind attribute to be added to your element
51 @staticmethod 52 def label(value: StrLike) -> BaseAttribute: 53 """ 54 "track" attribute: label 55 User-visible label 56 57 Args: 58 value: 59 Text 60 61 Returns: 62 An label attribute to be added to your element 63 64 """ 65 66 return BaseAttribute("label", value)
"track" attribute: label User-visible label
Args: value: Text
Returns: An label attribute to be added to your element
68 @staticmethod 69 def src(value) -> BaseAttribute: 70 """ 71 "track" attribute: src 72 Address of the resource 73 74 Args: 75 value: 76 Valid non-empty URL potentially surrounded by spaces 77 78 Returns: 79 An src attribute to be added to your element 80 81 """ 82 83 return BaseAttribute("src", value)
"track" attribute: src Address of the resource
Args: value: Valid non-empty URL potentially surrounded by spaces
Returns: An src attribute to be added to your element
85 @staticmethod 86 def srclang(value) -> BaseAttribute: 87 """ 88 "track" attribute: srclang 89 Language of the text track 90 91 Args: 92 value: 93 Valid BCP 47 language tag 94 95 Returns: 96 An srclang attribute to be added to your element 97 98 """ 99 100 return BaseAttribute("srclang", value)
"track" attribute: srclang Language of the text track
Args: value: Valid BCP 47 language tag
Returns: An srclang attribute to be added to your element