RealGravity Anomaly

Programmer's documentation for the RealGravity Javascript tools and widgets

The live scripts are kept at http://anomaly.realgravity.com/javascripts.

Developer Mode

Certain ways in which the Javascript has been encapsulated unfortunately prevent supporting a full developer mode at this time. Specifically, the make process wraps all the combined JS inside an anonymous function, assuring a completely private namespace. The only global variable created is RealGravity, and all required libraries are kept under tight wraps. This means that the combined js (in normal or minified mode) must be used, and you cannot load the individual scripts for easier debugging.

The reason for doing this is because the script must be robust in a wide variety of unknown environments which could have their own copies of the same libraries (such as jQuery) which might be incompatible with ours. It's also to prevent usage of features or libraries which might change or disappear in the future.

Demos

See the current list of demos

Getting Started

At this time, the primary widget is the Video Wall. The Video Wall is a wrapper method for RealGravity.player, RealGravity.videoList, RealGravity.channelList and RealGravity.videoMetadata. It requires a single div on the page into which all the requested components will be injected.

See the tutorial for more information.

Themes

videoWall supports themes as a way to modify behaviour and styling. The default theme is, simply, 'default' -- that's what's being used above. You can write your own by extending RealGravity.themes. The name of your theme will create a class on the videoWall main <div> as RGtheme_themename. It will also attempt to pull css from http://anomaly.realgravity.com/stylesheets/videowall_themename.css unless you specify the option noCss: true (which is automatically true with the default theme).

A few sample themes are hosted on anomaly, and in the future we will likely provide a library of commonly used themes.