Class Audio<T extends Audio<T>>
<audio> element for embedding sound content.
The Audio class provides a Java representation of the HTML audio element, which embeds sound content in web pages. It supports various audio formats and provides controls for playback, volume, and other audio-specific features. The element can contain multiple source elements to provide format fallbacks.
All playable media attributes (autoplay, controls, crossorigin, loop, muted, preload,
src) are inherited from MediaElement.
Usage Example:
// Create an audio player with controls
Audio audioPlayer = new Audio();
audioPlayer.setSrc("/audio/soundtrack.mp3");
audioPlayer.setControls(true);
audioPlayer.setPreload("auto");
// Create a looping background audio
Audio bgMusic = new Audio();
bgMusic.setSrc("/audio/background.mp3");
bgMusic.setLoop(true);
bgMusic.setAutoPlay(true);
bgMusic.setMuted(false);
// Create audio with multiple format sources
Audio multiFormat = new Audio();
multiFormat.setControls(true);
Source mp3Source = new Source();
mp3Source.setSrc("/audio/sound.mp3");
mp3Source.setType("audio/mpeg");
Source oggSource = new Source();
oggSource.setSrc("/audio/sound.ogg");
oggSource.setType("audio/ogg");
multiFormat.addElement(mp3Source);
multiFormat.addElement(oggSource);
- Since:
- 2007
- Version:
- 1.0
- Author:
- Marvin P. Warble Jr.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddFallbackContent(Element fallback) Adds fallback content for browsers that do not support this media element.Adds aSourceelement specifying an alternative media resource.Adds a media source with the specified URL.Adds aTrackelement for text tracks (subtitles, captions, etc.).Adds a text track with the specified URL.protected StringReturns the crossorigin attribute value.Returns the HTMLheightattribute value.Returns the HTMLwidthattribute value.protected StringReturns the preload attribute value.protected StringgetSrc()Returns the src attribute value.protected booleanReturns whether the autoplay attribute is set.protected booleanReturns whether the controls attribute is set.protected booleanisLoop()Returns whether the loop attribute is set.protected booleanisMuted()Returns whether the muted attribute is set.voidRemoves all source, track, and fallback elements from this media element.setAutoPlay(boolean autoplay) Sets the autoplay boolean attribute.setControls(boolean controls) Sets the controls boolean attribute.setCrossOrigin(CrossOrigin crossOrigin) Sets the cross-origin attribute using theCrossOriginenum.setCrossOrigin(String crossOrigin) Sets the crossorigin attribute.setIntrinsicHeight(int pixels) Sets the HTMLheightattribute to specify intrinsic height in pixels.setIntrinsicHeight(String height) Sets the HTMLheightattribute to specify intrinsic height.setIntrinsicWidth(int pixels) Sets the HTMLwidthattribute to specify intrinsic width in pixels.setIntrinsicWidth(String width) Sets the HTMLwidthattribute to specify intrinsic width.setLoop(boolean loop) Sets the loop boolean attribute.setMuted(boolean muted) Sets the muted boolean attribute.setPreload(Preload preload) Sets the preload strategy using thePreloadenum.setPreload(String preload) Sets the preload attribute.Sets the URL of the media resource.Methods inherited from class com.oorian.html.StyledElement
addClass, addStyle, addStyle, addStyleAttribute, addTransition, animate, clearTransitions, getActiveStyle, getCssClass, getDisabledStyle, getFocusStyle, getFocusVisibleStyle, getHoverStyle, getHtml, getStyle, getStyleAttribute, hidden, hide, initialize, isDisplayed, isTransitionForwardActive, onHide, onRemovedFromPage, onShow, removeClass, setActiveStyle, setAlignContent, setAlignContent, setAlignItems, setAlignItems, setAlignSelf, setAlignSelf, setAnimation, setAnimationDelay, setAnimationDelay, setAnimationDelay, setAnimationDirection, setAnimationDirection, setAnimationDuration, setAnimationDuration, setAnimationDuration, setAnimationFillMode, setAnimationFillMode, setAnimationIterationCount, setAnimationIterationCount, setAnimationIterationCount, setAnimationName, setAnimationPlayState, setAnimationPlayState, setAnimationTimingFunction, setAnimationTimingFunction, setAnimationTimingFunction, setAnimationTimingFunction, setBackdropFilter, setBackdropFilter, setBackfaceVisibility, setBackfaceVisibility, setBackground, setBackground, setBackgroundAttachment, setBackgroundAttachment, setBackgroundBlendMode, setBackgroundBlendMode, setBackgroundClip, setBackgroundClip, setBackgroundColor, setBackgroundColor, setBackgroundColor, setBackgroundImage, setBackgroundImage, setBackgroundOrigin, setBackgroundOrigin, setBackgroundPosition, setBackgroundPosition, setBackgroundPosition, setBackgroundPosition, setBackgroundPosition, setBackgroundRepeat, setBackgroundRepeat, setBackgroundSize, setBackgroundSize, setBackgroundSize, setBackgroundSize, setBackgroundSize, setBlur, setBorder, setBorder, setBorder, setBorder, setBorder, setBorder, setBorder, setBorder, setBorder, setBorderBottom, setBorderBottom, setBorderBottom, setBorderBottom, setBorderBottom, setBorderBottom, setBorderBottom, setBorderBottom, setBorderBottomColor, setBorderBottomColor, setBorderBottomLeftRadius, setBorderBottomLeftRadius, setBorderBottomLeftRadius, setBorderBottomRightRadius, setBorderBottomRightRadius, setBorderBottomRightRadius, setBorderBottomStyle, setBorderBottomStyle, setBorderBottomWidth, setBorderBottomWidth, setBorderBottomWidth, setBorderBottomWidth, setBorderColor, setBorderColor, setBorderColor, setBorderColor, setBorderImage, setBorderImage, setBorderImageOutset, setBorderImageRepeat, setBorderImageSlice, setBorderImageSource, setBorderImageWidth, setBorderLeft, setBorderLeft, setBorderLeft, setBorderLeft, setBorderLeft, setBorderLeft, setBorderLeft, setBorderLeft, setBorderLeftColor, setBorderLeftColor, setBorderLeftStyle, setBorderLeftStyle, setBorderLeftWidth, setBorderLeftWidth, setBorderLeftWidth, setBorderLeftWidth, setBorderRadius, setBorderRadius, setBorderRadius, setBorderRadius, setBorderRadius, setBorderRadius, setBorderRight, setBorderRight, setBorderRight, setBorderRight, setBorderRight, setBorderRight, setBorderRight, setBorderRight, setBorderRightColor, setBorderRightColor, setBorderRightStyle, setBorderRightStyle, setBorderRightWidth, setBorderRightWidth, setBorderRightWidth, setBorderRightWidth, setBorderStyle, setBorderStyle, setBorderTop, setBorderTop, setBorderTop, setBorderTop, setBorderTop, setBorderTop, setBorderTop, setBorderTop, setBorderTopColor, setBorderTopColor, setBorderTopLeftRadius, setBorderTopLeftRadius, setBorderTopLeftRadius, setBorderTopRightRadius, setBorderTopRightRadius, setBorderTopRightRadius, setBorderTopStyle, setBorderTopStyle, setBorderTopWidth, setBorderTopWidth, setBorderTopWidth, setBorderTopWidth, setBorderWidth, setBorderWidth, setBorderWidth, setBorderWidth, setBorderWidth, setBorderWidth, setBorderWidth, setBottom, setBottom, setBottom, setBoxShadow, setBoxShadow, setBoxShadow, setBoxShadow, setBoxShadow, setBoxSizing, setBoxSizing, setBreakAfter, setBreakBefore, setBreakInside, setBrightness, setClass, setClear, setClear, setClip, setClipPath, setClipPath, setColGap, setColGap, setColor, setColor, setColumnCount, setColumnCount, setColumnFill, setColumnFill, setColumnGap, setColumnRule, setColumnRuleColor, setColumnRuleColor, setColumnRuleStyle, setColumnRuleStyle, setColumnRuleWidth, setColumnRuleWidth, setColumns, setColumns, setColumns, setColumnSpan, setColumnWidth, setColumnWidth, setColumnWidth, setContrast, setCounterIncrement, setCounterReset, setCursor, setCursor, setDirection, setDirection, setDisabledStyle, setDisplay, setDisplay, setFilter, setFilter, setFilterOpacity, setFlex, setFlexBasis, setFlexDirection, setFlexDirection, setFlexFlow, setFlexGrow, setFlexGrow, setFlexShrink, setFlexShrink, setFlexWrap, setFlexWrap, setFloat, setFloat, setFocusStyle, setFocusVisibleStyle, setFont, setFont, setFont, setFont, setFont, setFont, setFont, setFont, setFont, setFont, setFont, setFont, setFontFace, setFontFamily, setFontFamily, setFontFeatureSettings, setFontKerning, setFontLanguageOverride, setFontSize, setFontSize, setFontSize, setFontSizeAdjust, setFontStretch, setFontStretch, setFontStyle, setFontStyle, setFontSynthesis, setFontVariant, setFontVariant, setFontVariantAlternates, setFontVariantCaps, setFontVariantEastAsian, setFontVariantLigatures, setFontVariantNumeric, setFontVariantPosition, setFontWeight, setFontWeight, setGap, setGap, setGap, setGap, setGrayscale, setHangingPunctuation, setHangingPunctuation, setHeight, setHeight, setHeight, setHoverStyle, setHueRotate, setHyphens, setImageOrientation, setImageRendering, setImageResolution, setImeMode, setInvert, setJustifyContent, setJustifyContent, setKeyFrames, setLeft, setLeft, setLeft, setLetterSpacing, setLetterSpacing, setLetterSpacing, setLetterSpacing, setLineBreak, setLineHeight, setLineHeight, setLineHeight, setLineHeight, setMargin, setMargin, setMargin, setMargin, setMargin, setMarginBottom, setMarginBottom, setMarginBottom, setMarginLeft, setMarginLeft, setMarginLeft, setMarginRight, setMarginRight, setMarginRight, setMarginTop, setMarginTop, setMarginTop, setMark, setMarkAfter, setMarkBefore, setMarks, setMarqueeDirection, setMarqueePlayCount, setMarqueeSpeed, setMarqueeStyle, setMask, setMaskType, setMaxHeight, setMaxHeight, setMaxHeight, setMaxHeightToWindowHeight, setMaxWidth, setMaxWidth, setMaxWidth, setMaxWidthToWindowWidth, setMinHeight, setMinHeight, setMinHeight, setMinHeightToWindowHeight, setMinWidth, setMinWidth, setMinWidth, setMinWidthToWindowWidth, setNavDown, setNavIndex, setNavIndex, setNavLeft, setNavRight, setNavUp, setObjectFit, setObjectPosition, setOnClickNavigateBack, setOnClickNavigateBack, setOnClickNavigateBack, setOnClickNavigateForward, setOnClickNavigateForward, setOnClickNavigateForward, setOnClickNavigateTo, setOnDblClick, setOnDblClickChange, setOpacity, setOpacity, setOrder, setOrder, setOrphans, setOutline, setOutline, setOutline, setOutline, setOutlineColor, setOutlineColor, setOutlineOffset, setOutlineOffset, setOutlineOffset, setOutlineStyle, setOutlineStyle, setOutlineWidth, setOutlineWidth, setOutlineWidth, setOutlineWidth, setOverflow, setOverflow, setOverflow, setOverflowWrap, setOverflowX, setOverflowX, setOverflowY, setOverflowY, setPadding, setPadding, setPadding, setPadding, setPadding, setPadding, setPadding, setPadding, setPaddingBottom, setPaddingBottom, setPaddingBottom, setPaddingLeft, setPaddingLeft, setPaddingLeft, setPaddingRight, setPaddingRight, setPaddingRight, setPaddingTop, setPaddingTop, setPaddingTop, setPageBreakAfter, setPageBreakAfter, setPageBreakBefore, setPageBreakBefore, setPageBreakInside, setPageBreakInside, setPerspective, setPerspective, setPerspective, setPerspectiveOrigin, setPerspectiveOrigin, setPerspectiveOrigin, setPerspectiveOrigin, setPhonemes, setPosition, setPosition, setPosition, setPosition, setPosition, setQuotes, setResize, setResize, setResizeToWindowHeight, setResizeToWindowHeight, setResizeToWindowWidth, setRest, setRestAfter, setRestBefore, setRight, setRight, setRight, setRotate, setRotate, setRowGap, setRowGap, setSaturate, setScale, setScale, setSepia, setShow, setSize, setSize, setSize, setSkewX, setSkewY, setStyle, setStyle, setTabSize, setTabSize, setTabSize, setTabSize, setTextAlign, setTextAlign, setTextAlignLast, setTextAlignLast, setTextCombineUpright, setTextCombineWeight, setTextDecoration, setTextDecoration, setTextDecorationColor, setTextDecorationColor, setTextDecorationLine, setTextDecorationLine, setTextDecorationStyle, setTextDecorationStyle, setTextIndent, setTextIndent, setTextIndent, setTextIndent, setTextJustify, setTextJustify, setTextOrientation, setTextOverflow, setTextOverflow, setTextSelectDisabled, setTextShadow, setTextShadow, setTextShadow, setTextShadow, setTextShadow, setTextTransform, setTextTransform, setTextUnderlinePosition, setTop, setTop, setTop, setTransform, setTransform, setTransformOrigin, setTransformOrigin, setTransformOrigin, setTransformOrigin, setTransformOrigin, setTransformStyle, setTransformStyle, setTransition, setTransitionDelay, setTransitionDelay, setTransitionDelay, setTransitionDuration, setTransitionDuration, setTransitionDuration, setTransitionProperty, setTransitionTimingFunction, setTransitionTimingFunction, setTransitionTimingFunction, setTransitionTimingFunction, setTranslateX, setTranslateY, setTranslateZ, setUnicodeBidi, setUnicodeBidi, setVerticalAlign, setVerticalAlign, setVisibility, setVisibility, setVoiceBalance, setVoiceDuration, setVoicePitch, setVoicePitchRange, setVoiceRate, setVoiceStress, setVoiceVolume, setWhiteSpace, setWhiteSpace, setWidows, setWidth, setWidth, setWidth, setWordBreak, setWordBreak, setWordSpacing, setWordSpacing, setWordSpacing, setWordSpacing, setWordWrap, setWordWrap, setWritingMode, setZIndex, setZIndex, show, shown, stopAnimation, transitionForward, transitionForward, transitionReverse, transitionReverse, updateStyle, updateStyle, updateStyleIfChangedMethods inherited from class com.oorian.html.VisualElement
clearOnClick, click, disable, enable, getAccessKey, getAutoCapitalize, getEnterKeyHint, getInputMode, getPopover, getRole, getTabIndex, getTitle, isAutoFocus, isContentEditable, isDisabled, isDraggable, isHidden, isInert, isSpellCheck, onDisabled, onEnabled, setAccessKey, setAriaAtomic, setAriaBusy, setAriaChecked, setAriaCheckedMixed, setAriaControls, setAriaCurrent, setAriaDescribedBy, setAriaDisabled, setAriaErrorMessage, setAriaExpanded, setAriaHasPopup, setAriaHasPopup, setAriaHidden, setAriaInvalid, setAriaLabel, setAriaLabelledBy, setAriaLevel, setAriaLive, setAriaModal, setAriaOwns, setAriaPressed, setAriaRequired, setAriaSelected, setAriaValueRange, setAriaValueText, setAutoCapitalize, setAutoFocus, setConsumeEvent, setContentEditable, setDisabled, setDraggable, setDropAllowed, setEnterKeyHint, setFocus, setHidden, setInert, setInputMode, setOnAnimationCancel, setOnAnimationEnd, setOnAnimationIteration, setOnAnimationStart, setOnAuxClick, setOnBeforeInput, setOnBeforeToggle, setOnBlur, setOnChange, setOnClick, setOnClickChange, setOnCompositionEnd, setOnCompositionStart, setOnCompositionUpdate, setOnContextMenu, setOnCopy, setOnCut, setOnDocumentResize, setOnFocus, setOnFocusIn, setOnFocusOut, setOnFormData, setOnGotPointerCapture, setOnInput, setOnInvalid, setOnKeyDown, setOnKeyPressed, setOnKeyUp, setOnLostPointerCapture, setOnMouseDown, setOnMouseEnter, setOnMouseLeave, setOnMouseMove, setOnMouseOut, setOnMouseOutChangeClass, setOnMouseOutChangeStyle, setOnMouseOutChangeStyle, setOnMouseOver, setOnMouseOverChangeClass, setOnMouseOverChangeStyle, setOnMouseOverChangeStyle, setOnMouseOverShow, setOnMouseUp, setOnPageLoad, setOnPaste, setOnPointerCancel, setOnPointerDown, setOnPointerEnter, setOnPointerLeave, setOnPointerMove, setOnPointerOut, setOnPointerOver, setOnPointerUp, setOnResize, setOnScroll, setOnScrollEnd, setOnSelect, setOnSelectionChange, setOnSelectStart, setOnToggle, setOnTouchCancel, setOnTouchEnd, setOnTouchMove, setOnTouchStart, setOnTransitionCancel, setOnTransitionEnd, setOnTransitionRun, setOnTransitionStart, setOnWheel, setOnWindowResize, setPopover, setRole, setRole, setSpellCheck, setTabIndex, setTitle, setTooltipMethods inherited from class com.oorian.html.Element
addAttribute, addAttribute, addAttribute, addAttribute, addElement, addLineBreak, addLineOfText, addLineOfText, addLineOfText, addParagraph, addParagraph, addSpacer, addText, addText, addText, addText, assignId, containsElement, containsElement, create, dispatchEvent, dispatchEvent, dispatchEvent, dispatchEvent, equals, excludeId, executeJs, executeJs, executeJs, getAccept, getAllElements, getAncestor, getAttribute, getAttributes, getComponent, getDir, getElement, getElementById, getElementCount, getElementCount, getElements, getElements, getElementsByComponentName, getElementsByTagName, getHtml, getId, getInnerHtml, getInnerHtml, getIs, getItemId, getItemProp, getItemRef, getItemType, getLang, getNextSibling, getPage, getParent, getPart, getPrevSibling, getSlot, getTagName, getTextContent, getUrl, hasAttribute, hasElements, insertElement, isChildOf, isClosedTag, isCreated, isDescendantOf, isDescendantOf, isInitialized, isItemScope, isTranslate, onCallback, onCreated, onElementAdded, onElementRemoved, onHashChange, onHidden, onInitialized, onJsReturn, onPageLoaded, onPageUnloaded, onRefresh, onShown, onUpdated, onUserEvent, prewrite, recreate, refresh, refresh, registerAddition, registerListener, registerListener, registerListener, registerListener, registerListener, registerListener, registerListener, registerSubtraction, registerUpdate, removeAttribute, removeAttribute, removeElement, removeElement, removeFromParent, requestCallback, requestCallback, requestCallback, requestCallback, resetId, scrollTo, scrollToBottom, scrollToTop, self, sendCommand, sendUpdate, setAccept, setComponent, setDir, setDir, setElement, setId, setIs, setItemId, setItemProp, setItemRef, setItemScope, setItemType, setLang, setOnError, setOnLoad, setPage, setParent, setPart, setSlot, setTagName, setText, setText, setText, setText, setTranslate, toString, unregisterListener, update, updateAttributes
-
Constructor Details
-
Audio
public Audio()Creates a new Audio element.
-
-
Method Details
-
addSource
Adds aSourceelement specifying an alternative media resource.Multiple source elements can be added to provide the same media in different formats, allowing the browser to choose the best supported format.
- Parameters:
source- the Source element to add- Returns:
- this element for method chaining
-
addSource
Adds a media source with the specified URL.Convenience method that creates a
Sourceelement with the given URL.- Parameters:
src- the URL of the media resource- Returns:
- this element for method chaining
-
addTrack
Adds aTrackelement for text tracks (subtitles, captions, etc.).Track elements provide timed text information such as subtitles, captions, descriptions, chapters, or metadata.
- Parameters:
track- the Track element to add- Returns:
- this element for method chaining
-
addTrack
Adds a text track with the specified URL.Convenience method that creates a
Trackelement with the given URL.- Parameters:
src- the URL of the text track file (e.g., a WebVTT file)- Returns:
- this element for method chaining
-
addFallbackContent
Adds fallback content for browsers that do not support this media element.The fallback element is displayed in place of the media player when the browser does not support the
<audio>or<video>element. Common fallback content includes a download link or descriptive text.- Parameters:
fallback- the element to display as fallback content- Returns:
- this element for method chaining
-
removeAllElements
public void removeAllElements()Removes all source, track, and fallback elements from this media element.- Overrides:
removeAllElementsin classElement<T extends com.oorian.html.elements.MediaElement<T>>
-
setAutoPlay
Sets the autoplay boolean attribute.Indicates that the media should begin playing automatically as soon as enough data is available. Note that many browsers block autoplay unless the media is muted.
- Parameters:
autoplay- True to enable autoplay, false to remove.- Returns:
- This element for method chaining.
-
setControls
Sets the controls boolean attribute.Indicates that the browser should display playback controls (play, pause, volume, etc.) for the media.
- Parameters:
controls- True to show controls, false to remove.- Returns:
- This element for method chaining.
-
setCrossOrigin
Sets the cross-origin attribute using theCrossOriginenum.- Parameters:
crossOrigin- The CORS mode.- Returns:
- This element for method chaining.
-
setCrossOrigin
Sets the crossorigin attribute.Specifies how the element handles cross-origin requests. The value
"anonymous"sends requests without credentials;"use-credentials"includes cookies and authentication.- Parameters:
crossOrigin- The cross-origin value (anonymous, use-credentials).- Returns:
- This element for method chaining.
-
setLoop
Sets the loop boolean attribute.Indicates that the media should restart from the beginning upon reaching the end.
- Parameters:
loop- True to enable looping, false to remove.- Returns:
- This element for method chaining.
-
setMuted
Sets the muted boolean attribute.Indicates that the media audio output should be muted by default. This attribute is often required to enable autoplay in modern browsers.
- Parameters:
muted- True to mute, false to remove.- Returns:
- This element for method chaining.
-
setPreload
Sets the preload strategy using thePreloadenum.- Parameters:
preload- The preload strategy.- Returns:
- This element for method chaining.
-
setPreload
Sets the preload attribute.Provides a hint to the browser about how much of the media resource should be preloaded. Values include
"none"(don't preload),"metadata"(preload only metadata), and"auto"(preload the entire resource).- Parameters:
preload- The preload hint (none, metadata, auto).- Returns:
- This element for method chaining.
-
setSrc
Sets the URL of the media resource.If the URL starts with "/" (absolute path within the application), the servlet context path will be automatically prepended.
- Parameters:
url- the URL of the media resource.- Returns:
- This element for method chaining.
-
isAutoPlay
protected boolean isAutoPlay()Returns whether the autoplay attribute is set.- Returns:
trueif autoplay is present,falseotherwise.
-
isControls
protected boolean isControls()Returns whether the controls attribute is set.- Returns:
trueif controls is present,falseotherwise.
-
getCrossOrigin
Returns the crossorigin attribute value.- Returns:
- The cross-origin value, or
nullif not set.
-
isLoop
protected boolean isLoop()Returns whether the loop attribute is set.- Returns:
trueif loop is present,falseotherwise.
-
isMuted
protected boolean isMuted()Returns whether the muted attribute is set.- Returns:
trueif muted is present,falseotherwise.
-
getPreload
Returns the preload attribute value.- Returns:
- The preload hint, or
nullif not set.
-
getSrc
Returns the src attribute value.- Returns:
- The resource URL, or
nullif not set.
-
setIntrinsicWidth
Sets the HTMLwidthattribute to specify intrinsic width in pixels.This sets the HTML attribute (e.g.,
<img width="300">), not the CSSwidthproperty. To set CSS width, use the inheritedStyledElement.setWidth(int)method.- Parameters:
pixels- The width in pixels.- Returns:
- This element for method chaining.
-
setIntrinsicWidth
Sets the HTMLwidthattribute to specify intrinsic width.This sets the HTML attribute, not the CSS
widthproperty. To set CSS width, use the inheritedStyledElement.setWidth(String)method.- Parameters:
width- The width value.- Returns:
- This element for method chaining.
-
setIntrinsicHeight
Sets the HTMLheightattribute to specify intrinsic height in pixels.This sets the HTML attribute (e.g.,
<img height="200">), not the CSSheightproperty. To set CSS height, use the inheritedStyledElement.setHeight(int)method.- Parameters:
pixels- The height in pixels.- Returns:
- This element for method chaining.
-
setIntrinsicHeight
Sets the HTMLheightattribute to specify intrinsic height.This sets the HTML attribute, not the CSS
heightproperty. To set CSS height, use the inheritedStyledElement.setHeight(String)method.- Parameters:
height- The height value.- Returns:
- This element for method chaining.
-
getIntrinsicWidth
Returns the HTMLwidthattribute value.Returns the intrinsic width set via the HTML attribute, not the CSS width.
- Returns:
- The width value, or
nullif not set.
-
getIntrinsicHeight
Returns the HTMLheightattribute value.Returns the intrinsic height set via the HTML attribute, not the CSS height.
- Returns:
- The height value, or
nullif not set.
-