html_compose.attributes.video_attrs
1from . import BaseAttribute 2from typing import Literal 3 4 5class VideoAttrs: 6 """ 7 This module contains functions for attributes in the 'video' element. 8 Which is inherited by a class so we can generate type hints 9 """ 10 11 @staticmethod 12 def autoplay(value: bool) -> BaseAttribute: 13 """ 14 "video" attribute: autoplay 15 Hint that the media resource can be started automatically when the page is loaded 16 17 Args: 18 value: 19 Boolean attribute 20 21 Returns: 22 An autoplay attribute to be added to your element 23 24 """ 25 26 return BaseAttribute("autoplay", value) 27 28 @staticmethod 29 def controls(value: bool) -> BaseAttribute: 30 """ 31 "video" attribute: controls 32 Show user agent controls 33 34 Args: 35 value: 36 Boolean attribute 37 38 Returns: 39 An controls attribute to be added to your element 40 41 """ 42 43 return BaseAttribute("controls", value) 44 45 @staticmethod 46 def crossorigin( 47 value: Literal["anonymous", "use-credentials"], 48 ) -> BaseAttribute: 49 """ 50 "video" attribute: crossorigin 51 How the element handles crossorigin requests 52 53 Args: 54 value: 55 ['anonymous', 'use-credentials'] 56 57 Returns: 58 An crossorigin attribute to be added to your element 59 60 """ 61 62 return BaseAttribute("crossorigin", value) 63 64 @staticmethod 65 def height(value: int) -> BaseAttribute: 66 """ 67 "video" attribute: height 68 Vertical dimension 69 70 Args: 71 value: 72 Valid non-negative integer 73 74 Returns: 75 An height attribute to be added to your element 76 77 """ 78 79 return BaseAttribute("height", value) 80 81 @staticmethod 82 def loop(value: bool) -> BaseAttribute: 83 """ 84 "video" attribute: loop 85 Whether to loop the media resource 86 87 Args: 88 value: 89 Boolean attribute 90 91 Returns: 92 An loop attribute to be added to your element 93 94 """ 95 96 return BaseAttribute("loop", value) 97 98 @staticmethod 99 def muted(value: bool) -> BaseAttribute: 100 """ 101 "video" attribute: muted 102 Whether to mute the media resource by default 103 104 Args: 105 value: 106 Boolean attribute 107 108 Returns: 109 An muted attribute to be added to your element 110 111 """ 112 113 return BaseAttribute("muted", value) 114 115 @staticmethod 116 def playsinline(value: bool) -> BaseAttribute: 117 """ 118 "video" attribute: playsinline 119 Encourage the user agent to display video content within the element's playback area 120 121 Args: 122 value: 123 Boolean attribute 124 125 Returns: 126 An playsinline attribute to be added to your element 127 128 """ 129 130 return BaseAttribute("playsinline", value) 131 132 @staticmethod 133 def poster(value) -> BaseAttribute: 134 """ 135 "video" attribute: poster 136 Poster frame to show prior to video playback 137 138 Args: 139 value: 140 Valid non-empty URL potentially surrounded by spaces 141 142 Returns: 143 An poster attribute to be added to your element 144 145 """ 146 147 return BaseAttribute("poster", value) 148 149 @staticmethod 150 def preload(value: Literal["none", "metadata", "auto"]) -> BaseAttribute: 151 """ 152 "video" attribute: preload 153 Hints how much buffering the media resource will likely need 154 155 Args: 156 value: 157 ['none', 'metadata', 'auto'] 158 159 Returns: 160 An preload attribute to be added to your element 161 162 """ 163 164 return BaseAttribute("preload", value) 165 166 @staticmethod 167 def src(value) -> BaseAttribute: 168 """ 169 "video" attribute: src 170 Address of the resource 171 172 Args: 173 value: 174 Valid non-empty URL potentially surrounded by spaces 175 176 Returns: 177 An src attribute to be added to your element 178 179 """ 180 181 return BaseAttribute("src", value) 182 183 @staticmethod 184 def width(value: int) -> BaseAttribute: 185 """ 186 "video" attribute: width 187 Horizontal dimension 188 189 Args: 190 value: 191 Valid non-negative integer 192 193 Returns: 194 An width attribute to be added to your element 195 196 """ 197 198 return BaseAttribute("width", value)
6class VideoAttrs: 7 """ 8 This module contains functions for attributes in the 'video' element. 9 Which is inherited by a class so we can generate type hints 10 """ 11 12 @staticmethod 13 def autoplay(value: bool) -> BaseAttribute: 14 """ 15 "video" attribute: autoplay 16 Hint that the media resource can be started automatically when the page is loaded 17 18 Args: 19 value: 20 Boolean attribute 21 22 Returns: 23 An autoplay attribute to be added to your element 24 25 """ 26 27 return BaseAttribute("autoplay", value) 28 29 @staticmethod 30 def controls(value: bool) -> BaseAttribute: 31 """ 32 "video" attribute: controls 33 Show user agent controls 34 35 Args: 36 value: 37 Boolean attribute 38 39 Returns: 40 An controls attribute to be added to your element 41 42 """ 43 44 return BaseAttribute("controls", value) 45 46 @staticmethod 47 def crossorigin( 48 value: Literal["anonymous", "use-credentials"], 49 ) -> BaseAttribute: 50 """ 51 "video" attribute: crossorigin 52 How the element handles crossorigin requests 53 54 Args: 55 value: 56 ['anonymous', 'use-credentials'] 57 58 Returns: 59 An crossorigin attribute to be added to your element 60 61 """ 62 63 return BaseAttribute("crossorigin", value) 64 65 @staticmethod 66 def height(value: int) -> BaseAttribute: 67 """ 68 "video" attribute: height 69 Vertical dimension 70 71 Args: 72 value: 73 Valid non-negative integer 74 75 Returns: 76 An height attribute to be added to your element 77 78 """ 79 80 return BaseAttribute("height", value) 81 82 @staticmethod 83 def loop(value: bool) -> BaseAttribute: 84 """ 85 "video" attribute: loop 86 Whether to loop the media resource 87 88 Args: 89 value: 90 Boolean attribute 91 92 Returns: 93 An loop attribute to be added to your element 94 95 """ 96 97 return BaseAttribute("loop", value) 98 99 @staticmethod 100 def muted(value: bool) -> BaseAttribute: 101 """ 102 "video" attribute: muted 103 Whether to mute the media resource by default 104 105 Args: 106 value: 107 Boolean attribute 108 109 Returns: 110 An muted attribute to be added to your element 111 112 """ 113 114 return BaseAttribute("muted", value) 115 116 @staticmethod 117 def playsinline(value: bool) -> BaseAttribute: 118 """ 119 "video" attribute: playsinline 120 Encourage the user agent to display video content within the element's playback area 121 122 Args: 123 value: 124 Boolean attribute 125 126 Returns: 127 An playsinline attribute to be added to your element 128 129 """ 130 131 return BaseAttribute("playsinline", value) 132 133 @staticmethod 134 def poster(value) -> BaseAttribute: 135 """ 136 "video" attribute: poster 137 Poster frame to show prior to video playback 138 139 Args: 140 value: 141 Valid non-empty URL potentially surrounded by spaces 142 143 Returns: 144 An poster attribute to be added to your element 145 146 """ 147 148 return BaseAttribute("poster", value) 149 150 @staticmethod 151 def preload(value: Literal["none", "metadata", "auto"]) -> BaseAttribute: 152 """ 153 "video" attribute: preload 154 Hints how much buffering the media resource will likely need 155 156 Args: 157 value: 158 ['none', 'metadata', 'auto'] 159 160 Returns: 161 An preload attribute to be added to your element 162 163 """ 164 165 return BaseAttribute("preload", value) 166 167 @staticmethod 168 def src(value) -> BaseAttribute: 169 """ 170 "video" attribute: src 171 Address of the resource 172 173 Args: 174 value: 175 Valid non-empty URL potentially surrounded by spaces 176 177 Returns: 178 An src attribute to be added to your element 179 180 """ 181 182 return BaseAttribute("src", value) 183 184 @staticmethod 185 def width(value: int) -> BaseAttribute: 186 """ 187 "video" attribute: width 188 Horizontal dimension 189 190 Args: 191 value: 192 Valid non-negative integer 193 194 Returns: 195 An width attribute to be added to your element 196 197 """ 198 199 return BaseAttribute("width", value)
This module contains functions for attributes in the 'video' element. Which is inherited by a class so we can generate type hints
12 @staticmethod 13 def autoplay(value: bool) -> BaseAttribute: 14 """ 15 "video" attribute: autoplay 16 Hint that the media resource can be started automatically when the page is loaded 17 18 Args: 19 value: 20 Boolean attribute 21 22 Returns: 23 An autoplay attribute to be added to your element 24 25 """ 26 27 return BaseAttribute("autoplay", value)
"video" attribute: autoplay Hint that the media resource can be started automatically when the page is loaded
Args: value: Boolean attribute
Returns: An autoplay attribute to be added to your element
29 @staticmethod 30 def controls(value: bool) -> BaseAttribute: 31 """ 32 "video" attribute: controls 33 Show user agent controls 34 35 Args: 36 value: 37 Boolean attribute 38 39 Returns: 40 An controls attribute to be added to your element 41 42 """ 43 44 return BaseAttribute("controls", value)
"video" attribute: controls Show user agent controls
Args: value: Boolean attribute
Returns: An controls attribute to be added to your element
46 @staticmethod 47 def crossorigin( 48 value: Literal["anonymous", "use-credentials"], 49 ) -> BaseAttribute: 50 """ 51 "video" attribute: crossorigin 52 How the element handles crossorigin requests 53 54 Args: 55 value: 56 ['anonymous', 'use-credentials'] 57 58 Returns: 59 An crossorigin attribute to be added to your element 60 61 """ 62 63 return BaseAttribute("crossorigin", value)
"video" attribute: crossorigin How the element handles crossorigin requests
Args: value: ['anonymous', 'use-credentials']
Returns: An crossorigin attribute to be added to your element
65 @staticmethod 66 def height(value: int) -> BaseAttribute: 67 """ 68 "video" attribute: height 69 Vertical dimension 70 71 Args: 72 value: 73 Valid non-negative integer 74 75 Returns: 76 An height attribute to be added to your element 77 78 """ 79 80 return BaseAttribute("height", value)
"video" attribute: height Vertical dimension
Args: value: Valid non-negative integer
Returns: An height attribute to be added to your element
82 @staticmethod 83 def loop(value: bool) -> BaseAttribute: 84 """ 85 "video" attribute: loop 86 Whether to loop the media resource 87 88 Args: 89 value: 90 Boolean attribute 91 92 Returns: 93 An loop attribute to be added to your element 94 95 """ 96 97 return BaseAttribute("loop", value)
"video" attribute: loop Whether to loop the media resource
Args: value: Boolean attribute
Returns: An loop attribute to be added to your element
99 @staticmethod 100 def muted(value: bool) -> BaseAttribute: 101 """ 102 "video" attribute: muted 103 Whether to mute the media resource by default 104 105 Args: 106 value: 107 Boolean attribute 108 109 Returns: 110 An muted attribute to be added to your element 111 112 """ 113 114 return BaseAttribute("muted", value)
"video" attribute: muted Whether to mute the media resource by default
Args: value: Boolean attribute
Returns: An muted attribute to be added to your element
116 @staticmethod 117 def playsinline(value: bool) -> BaseAttribute: 118 """ 119 "video" attribute: playsinline 120 Encourage the user agent to display video content within the element's playback area 121 122 Args: 123 value: 124 Boolean attribute 125 126 Returns: 127 An playsinline attribute to be added to your element 128 129 """ 130 131 return BaseAttribute("playsinline", value)
"video" attribute: playsinline Encourage the user agent to display video content within the element's playback area
Args: value: Boolean attribute
Returns: An playsinline attribute to be added to your element
133 @staticmethod 134 def poster(value) -> BaseAttribute: 135 """ 136 "video" attribute: poster 137 Poster frame to show prior to video playback 138 139 Args: 140 value: 141 Valid non-empty URL potentially surrounded by spaces 142 143 Returns: 144 An poster attribute to be added to your element 145 146 """ 147 148 return BaseAttribute("poster", value)
"video" attribute: poster Poster frame to show prior to video playback
Args: value: Valid non-empty URL potentially surrounded by spaces
Returns: An poster attribute to be added to your element
150 @staticmethod 151 def preload(value: Literal["none", "metadata", "auto"]) -> BaseAttribute: 152 """ 153 "video" attribute: preload 154 Hints how much buffering the media resource will likely need 155 156 Args: 157 value: 158 ['none', 'metadata', 'auto'] 159 160 Returns: 161 An preload attribute to be added to your element 162 163 """ 164 165 return BaseAttribute("preload", value)
"video" attribute: preload Hints how much buffering the media resource will likely need
Args: value: ['none', 'metadata', 'auto']
Returns: An preload attribute to be added to your element
167 @staticmethod 168 def src(value) -> BaseAttribute: 169 """ 170 "video" attribute: src 171 Address of the resource 172 173 Args: 174 value: 175 Valid non-empty URL potentially surrounded by spaces 176 177 Returns: 178 An src attribute to be added to your element 179 180 """ 181 182 return BaseAttribute("src", value)
"video" 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
184 @staticmethod 185 def width(value: int) -> BaseAttribute: 186 """ 187 "video" attribute: width 188 Horizontal dimension 189 190 Args: 191 value: 192 Valid non-negative integer 193 194 Returns: 195 An width attribute to be added to your element 196 197 """ 198 199 return BaseAttribute("width", value)
"video" attribute: width Horizontal dimension
Args: value: Valid non-negative integer
Returns: An width attribute to be added to your element