com.silverpeas.form.displayers
Class VideoPlayer

java.lang.Object
  extended by com.silverpeas.form.displayers.VideoPlayer

public class VideoPlayer
extends Object

An (X)HTML video player with javascript. The video player is set up and rendered by using javascript.


Constructor Summary
VideoPlayer()
          Creates a new displayer of a video player with the default settings: no video to play, autoplay set at false, the width at 425 pixels and the height at 300 pixels.
VideoPlayer(String videoURL, boolean autoplay)
          Creates a new displayer of a video player that will play the video at the specified URL.
 
Method Summary
 String getHeight()
          Gets the height of the video player (in CSS instruction, by default 425px).
 String getVideoURL()
          Gets the URL of the video to play.
 String getWidth()
          Gets the width of the video player (in CSS instruction, by default 425px).
 void init(org.apache.ecs.ConcreteElement element)
          Initializes the video player by declaring the required ressources (script, stylesheets, ...).
 boolean isAutoplay()
          Should the video player autostart?
 void renderIn(org.apache.ecs.ConcreteElement element)
          Renders the video player into the specified (X)HTML element.
 void setAutoplay(boolean autoplay)
          Sets the video autoplaying property
 void setHeight(String height)
          Sets the height of the video player in CSS (for example: 425px for 425 pixels).
 void setVideoURL(String videoURL)
          Sets the URL of the video to play.
 void setWidth(String width)
          Sets the width of the video player in CSS (for example: 425px for 425 pixels).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VideoPlayer

public VideoPlayer(String videoURL,
                   boolean autoplay)
Creates a new displayer of a video player that will play the video at the specified URL. By default the width and the height of the video player is respectively 425 pixels and 300 pixels.

Parameters:
videoURL - the URL of the video to play.
autoplay - the video playing should be autostarted?

VideoPlayer

public VideoPlayer()
Creates a new displayer of a video player with the default settings: no video to play, autoplay set at false, the width at 425 pixels and the height at 300 pixels.

Method Detail

isAutoplay

public boolean isAutoplay()
Should the video player autostart?

Returns:
true if the video should be autoplayed, false otherwise.

setAutoplay

public void setAutoplay(boolean autoplay)
Sets the video autoplaying property

Parameters:
autoplay - true to autostart the video, false otherwise.

getVideoURL

public String getVideoURL()
Gets the URL of the video to play.

Returns:
the video URL.

setVideoURL

public void setVideoURL(String videoURL)
Sets the URL of the video to play.

Parameters:
videoURL - the URL of the video to play.

getHeight

public String getHeight()
Gets the height of the video player (in CSS instruction, by default 425px).

Returns:
the video height.

setHeight

public void setHeight(String height)
Sets the height of the video player in CSS (for example: 425px for 425 pixels).

Parameters:
height - the video height.

getWidth

public String getWidth()
Gets the width of the video player (in CSS instruction, by default 425px).

Returns:
the video width.

setWidth

public void setWidth(String width)
Sets the width of the video player in CSS (for example: 425px for 425 pixels).

Parameters:
width - the video width.

init

public void init(org.apache.ecs.ConcreteElement element)
Initializes the video player by declaring the required ressources (script, stylesheets, ...). This method is required before any call of the display method.

Parameters:
an - XHTML element into which the resources declaration will be rendered.

renderIn

public void renderIn(org.apache.ecs.ConcreteElement element)
Renders the video player into the specified (X)HTML element.

Parameters:
an - (X)HTML element into which the video player will be rendered.


Copyright © 2016 Silverpeas. All Rights Reserved.