Class Video

java.lang.Object
io.mindspice.simplypages.core.HtmlTag
io.mindspice.simplypages.components.media.Video
All Implemented Interfaces:
Component

public class Video extends HtmlTag
HTML video wrapper with media attribute and sizing helpers.

Mutable and not thread-safe. Source/attribute configuration updates this instance in place. Mutate within a request-scoped flow. For reuse, stop mutating and render as a stable structure with per-request slot/context values.

  • Constructor Details

    • Video

      public Video(String src)
      Creates video with an application-controlled or separately media-context-validated source. Attribute encoding does not validate URL schemes, destinations, or media payloads.
  • Method Details

    • create

      public static Video create(String src)
      Creates video with the trusted/context-validated source contract of Video(String).
    • withControls

      public Video withControls()
    • withControls

      public Video withControls(boolean controls)
      Sets or removes the native playback controls.
    • withAutoplay

      public Video withAutoplay()
    • withLoop

      public Video withLoop()
    • withMuted

      public Video withMuted()
    • withPoster

      public Video withPoster(String posterUrl)
      Sets an encoded poster URL without Image's source policy. Supply an application-controlled or separately image-context-validated destination; encoding is not scheme validation.
    • withWidth

      public Video withWidth(String width)
      Description copied from class: HtmlTag
      Sets inline width after restricted CSS token validation.
      Overrides:
      withWidth in class HtmlTag
    • withWidth

      public Video withWidth(int width)
    • withHeight

      public Video withHeight(String height)
    • withHeight

      public Video withHeight(int height)
    • withClass

      public Video withClass(String className)
      Description copied from class: HtmlTag
      Overrides:
      withClass in class HtmlTag
    • withPreload

      public Video withPreload(String preload)