Class HtmlMedia

All Implemented Interfaces:
Serializable, Cloneable, Element, Node
Direct Known Subclasses:
HtmlAudio, HtmlMeter, HtmlVideo

public class HtmlMedia extends HtmlElement
HTML Media element, e.g. HtmlAudio or HtmlVideo.
See Also:
  • Method Details

    • canPlayType

      public String canPlayType(String type)
      Determines whether the specified media type can be played back.
      Parameters:
      type - the type
      Returns:
      "probably", "maybe", or "". The current implementation returns ""
    • getSrcAttribute

      public final String getSrcAttribute()
      Returns the value of the attribute src. Refer to the HTML 4.01 documentation for details on the use of this attribute.
      Returns:
      the value of the attribute src or an empty string if that attribute isn't defined
    • getSrc

      public String getSrc()
      Returns:
      the value of the src value
    • setSrc

      public void setSrc(String src)
      Sets the value of the src attribute.
      Parameters:
      src - the value of the src attribute
    • getCurrentSrc

      public String getCurrentSrc()
      Returns the absolute URL of the chosen media resource. This could happen, for example, if the web server selects a media file based on the resolution of the user's display. The value is an empty string if the networkState property is EMPTY.
      Returns:
      the absolute URL of the chosen media resource