org.chenillekit.tapestry.core.components
Class ProtoTube
java.lang.Object
org.chenillekit.tapestry.core.components.ProtoTube
- All Implemented Interfaces:
- ClientElement
@SupportsInformalParameters
@Import(library={"prototube/prototube.js","prototube/swfobject.js","${tapestry.scriptaculous}/effects.js"},
stylesheet="prototube/prototube.css")
public class ProtoTube- extends Object
- implements ClientElement
ProtoTube can be used to embed YouTube videos and the respective thumbnails in pages of any web site.
This component generates HTML to embed a player to show the video in other Web site pages. The component
may also generate HTML to display thumbnail preview of the videos and display video in a overlay viewer.
ProtoTube is unobtrusive: when javascript is turned off, the page still delivers its core functionality
and is just displayed the link to the Video page on the YouTube site.
Would seem to be compatible with IE6, IE7, IE8, Firefox 3.09, Safari 3.2.2, Opera 9.61.
Configuration Options
- overlay: default true, if false embed the video player directly
Overlay and image preview options:
- duration: overlay appare/fade effect duration (default 0.5)
- opacity: lightbox overlay opacity (default 0.8)
- ImagePreview: show the video thumbs (default true)
- imageID: choose between different image previews: value: 0 to 3 (0 = 320x240 jpg , {1,2,3} = 130x97 jpg, default 1)
Player options
- playerWidth: default 425px
- playerHeight: default 350px
- fs: 1, allow fullscreen button (default 1, 0 disallow fullscreen)
- autoplay: allowed value: 1,0 (default 0)
- loop: allowed value: 1,0 (default 0)
- hd: Setting to 1 enables High Definition playback by default , if is available; values: 0 or 1 (default 0)
- showinfo: Setting to 0 causes the player to not display information like the video title and rating before the video starts playing; values: 0 or 1 (default 1)
- rel: show related video at end; values: 0 or 1 (default 1)
- Version:
- $Id: ProtoTube.java 674 2010-07-29 12:47:25Z homburgs $
|
Method Summary |
protected void |
configure(JSONObject config)
Invoked to allow subclasses to further configure the parameters passed to this component's javascript
options. |
String |
getClientId()
Returns a unique id for the element. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ProtoTube
public ProtoTube()
configure
protected void configure(JSONObject config)
- Invoked to allow subclasses to further configure the parameters passed to this component's javascript
options. Subclasses may override this method to configure additional features of the ProtoTube.
This implementation does nothing.
Configuration Options
- overlay: default true, if false embed the video player directly
Overlay and image preview options:
- duration: overlay appare/fade effect duration (default 0.5)
- opacity: lightbox overlay opacity (default 0.8)
- ImagePreview: show the video thumbs (default true)
- imageID: choose between different image previews: value: 0 to 3 (0 = 320x240 jpg , {1,2,3} = 130x97 jpg, default 1)
Player options
- playerWidth: default 425px
- playerHeight: default 350px
- fs: 1, allow fullscreen button (default 1, 0 disallow fullscreen)
- autoplay: allowed value: 1,0 (default 0)
- loop: allowed value: 1,0 (default 0)
- hd: Setting to 1 enables High Definition playback by default , if is available; values: 0 or 1 (default 0)
- showinfo: Setting to 0 causes the player to not display information like the video title and rating before the video starts playing; values: 0 or 1 (default 1)
- rel: show related video at end; values: 0 or 1 (default 1)
- Parameters:
config - parameters object
getClientId
public String getClientId()
- Returns a unique id for the element. This value will be unique for any given rendering of a
page. This value is intended for use as the id attribute of the client-side element, and will
be used with any DHTML/Ajax related JavaScript.
- Specified by:
getClientId in interface ClientElement
Copyright © 2008-2010 ChenilleKit. All Rights Reserved.