All Implemented Interfaces:
Serializable, Iterable<Component>, IEventSink, IEventSource, IFeedbackContributor, IConverterLocator, IMetadataContext<Serializable,Component>, IHeaderContributor, IRequestableComponent, IHierarchical<Component>, IClusterable

public class Video extends MediaComponent
A video media component to display videos.
Since:
7.0.0
Author:
Tobias Soloschenko, Andrew Lombardi
See Also:
  • Constructor Details

    • Video

      public Video(String id)
      Creates a video component
      Parameters:
      id - the component id
    • Video

      public Video(String id, IModel<?> model)
      Creates a video component
      Parameters:
      id - the component id
      model - the internally used model
    • Video

      public Video(String id, ResourceReference resourceReference)
      Creates a video component
      Parameters:
      id - the component id
      resourceReference - the resource reference of the video file
    • Video

      public Video(String id, IModel<?> model, ResourceReference resourceReference)
      Creates a video component
      Parameters:
      id - the component id
      model - the internally used model
      resourceReference - the resource reference of the video file
    • Video

      public Video(String id, ResourceReference resourceReference, PageParameters pageParameters)
      Creates a media component
      Parameters:
      id - the component id
      resourceReference - the resource reference of the video file
      pageParameters - the page parameters to be used to be prepended to the video URL
    • Video

      public Video(String id, IModel<?> model, ResourceReference resourceReference, PageParameters pageParameters)
      Creates a video component
      Parameters:
      id - the component id
      model - the internally used model
      resourceReference - the resource reference of the video file
      pageParameters - the page parameters to be used to be prepended to the video URL
    • Video

      public Video(String id, String url)
      Creates a video component
      Parameters:
      id - the component id
      url - an external URL to be used for the video component
    • Video

      public Video(String id, IModel<?> model, String url)
      Creates a video component
      Parameters:
      id - the component id
      model - the internally used model
      url - an external URL to be used for the video component
    • Video

      public Video(String id, String url, PageParameters pageParameters)
      Creates a video component
      Parameters:
      id - the component id
      url - an external URL to be used for the video component
      pageParameters - the page parameters to be used to be prepended to the video URL
    • Video

      public Video(String id, IModel<?> model, String url, PageParameters pageParameters)
      Creates a video component
      Parameters:
      id - the component id
      model - the internally used model
      url - an external URL to be used for the video component
      pageParameters - the page parameters to be used to be prepended to the video URL
  • Method Details

    • onComponentTag

      protected void onComponentTag(ComponentTag tag)
      Description copied from class: Component
      Processes the component tag. Overrides of this method most likely should call the super implementation.
      Overrides:
      onComponentTag in class MediaComponent
      Parameters:
      tag - Tag to modify
    • getPoster

      The image to be displayed if the video isn't available
      Returns:
      the resource reference of the image
    • getPosterPageParameters

      Gets the posters page parameters
      Returns:
      the page parameters for the poster
    • setPosterPageParameters

      public void setPosterPageParameters(PageParameters posterPageParameters)
      Sets the posters page parameters
      Parameters:
      posterPageParameters - the page parameters for the poster
    • setPoster

      public void setPoster(ResourceReference poster)
      Sets the image to be displayed if the video isn't available
      Parameters:
      poster - the resource reference of the image used if the video isn't available
    • setPoster

      public void setPoster(ResourceReference poster, PageParameters posterPageParameters)
      Sets the image to be displayed if the video isn't available
      Parameters:
      poster - the resource reference of the image used if the video isn't available
      posterPageParameters - the page parameters for the poster
    • getWidth

      public Integer getWidth()
      Gets the width of the video area
      Returns:
      the width of the video area
    • setWidth

      public void setWidth(Integer width)
      Sets the width of the video area
      Parameters:
      width - the width of the video area
    • getHeight

      public Integer getHeight()
      Gets the height of the video area
      Returns:
      the height of the video area
    • setHeight

      public void setHeight(Integer height)
      Sets the height of the video area
      Parameters:
      height - the height of the video area