Contents |
The Boxee JavaScript API is designed to facilitate interaction with media in the Boxee browser. Each time media is loaded, a set of JS control files that are stored on Boxee's remote server, are referenced. Each file represents an associated domain and specific to the player utilized on that domain. A list of known JS control files can be found below as examples of proper API usage:
Anyone can write their own custom control files for an application. You can test your modifications by saving your domain.js file to the installed /boxee/system/players/flashplayer directory. This is not the boxee directory where your local profile data, log, and apps are stored. When you are sufficiently happy with the results, submit the controller to app-submit@boxee.tv where it will be reviewed and made available to every user in the Boxee community.
void enableLog(bool enable)
Widget getActiveWidget()
string getParam(string param)
float getVersion()
Widget getWidgets()
void log(string msg)
void notifyCurrentTime(int time)
void notifyCurrentProgress(int percent)
void notifyPlaybackEnded()
void runInBrowser(string javascript)
void setCanPause(bool can)
void setCanSetVolume(bool can)
void setCanSkip(bool can)
void setDefaultCrop(int left?, int right?, int top?, int bottom?)
void setDuration(float dur)
void onDocumentLoaded = function()
void onInit = function()
void onNewWindow = function()
string rewriteSrc = function(string source)
void onBack = function()
void onBigBack = function()
void onBigSkip = function()
void onPause = function()
void onPlay = function()
void onSetVolume = function(int volume)
void onSkip = function()
bool autoChoosePlayer
int browserHeight
int browserWidth
bool renderBrowser
void click(int x, int y)
string getAttribute(string attribute)
int getPixel(int x, int y)
void mouseMove(int x, int y)
void setActive(bool active)
int height
int width