API/libsapojs/SAPO/Widget/Videos

[Elements] are optional

Class SAPO.Widget.Videos


class SAPO.Widget.Videos
requires Prototype requires SAPO.Utility.String requires SAPO.Utility.Url requires SAPO.Communication.Syndication
Defined in Widget/Videos/0.1/lib.js

Constructor Summary
Videos (Object options)
Renders a badge which can show a user's latest videos or a playlist from a user.
Available CSS classes: sapo_widget_videos, sapo_widget_videos_logo, sapo_widget_videos_thumb, sapo_widget_videos_controls

Function Summary
init()
Initialization function. Called by the constructor and receives the same parameters.

Constructor Details

constructor Videos

Videos(Object options)
Renders a badge which can show a user's latest videos or a playlist from a user.
Available CSS classes: sapo_widget_videos, sapo_widget_videos_logo, sapo_widget_videos_thumb, sapo_widget_videos_controls
Parameters:
options Widget options
  • string user - username for videos.sapo.pt
  • [ string playlist ] - number on an url like videos.sapo.pt/user/playview/1
  • [ int total ] - total number of items to load
  • [ int visible ] - visible items. If the total number of items is greater than the visible items, the widget will have various "pages"
  • [ string divid ] - optional id for the div where the thumbnails will be loaded.
  • [ boolean showThumbs ] - if true, shows thumbnails
  • [ boolean showLabels ] - if true, shows labels
  • [ string playLabel ] - optional html for the play button
  • [ string stopLabel ] - optional html for the stop button
  • [ boolean autoplay ] - if true, plays through the various pages automatically
  • [ int refreshRate ] - rate for cycling through pages in miliseconds
  • [ string cssURI ] - url for optional CSS stylesheet

Function Details

function init

init()
Initialization function. Called by the constructor and receives the same parameters.