JavaScript API

From DevWiki

Jump to: navigation, search

Back to Home

The following has been updated to include information for multiple versions of the Boxee JavaScript API. Please take note of the New/Deprecated tags throughout this document. Boxee PC Client < 7.0, Boxee Box and all non-pc clients >= 7.0


Contents



Preface

The new Boxee client has a builtin webkit based browser (qt flavor). In general that browser always renders “offscreen” and boxee is responsible for taking that offscreen snapshot and presenting it to the user. Several content-types are associated with the builtin browser so that it is launched whenever web content is to be consumed.

Once launched, the boxee browser will look for a “controller script”. That script (written in javascript) contains information on how to render the page and is used to “orchestrate” the page’s playback.

Previous version of Boxee contained a mozilla based browser and although it used the same mechanism for web content playback, there are some fundamental changes in the API and flows in the current Boxee version.

This document describes the developer API of the current Boxee client’s embedded browser.


Backward Compatibility

The new browser tries to be backward compatible and accommodate scripts that were written to older versions of the browser. In order to specify that a specific script was written for the new browser, specify the following:

boxee.apiMinVersion=7.0;

This will cause the browser to set the defaults correctly. For example - automatically choosing the player is switched off by default.


Examples

The scripts listed below do not necessarily work for, nor are they intended for any particular site. They are simply examples to assist in the learning process. We will add more here as needed.


Builtin Objects

A few Javascript objects are predefined and should be used to control how a page “executes”.

boxee

The boxee object contains:

browser

The browser object contains functions for interacting with the current web page (executing javascript, simulating mouse and keyboard events, etc...)

playerState

New (>= 7.0)

This is a new object (introduced in version 7.0 of the API) that holds information on the current state of the player (active controls, extensions, playback state, etc...)

Browser OSD

Whenever a user clicks on "menu", the browser’s OSD shows up. Before the OSD shows up, the playerState object is queried so that the OSD will reflect the current state. This way, interval polling that is used in many older scripts can be avoided.

The recommended way for a script to send information to boxee is simply by setting playerState variables.

The onUpdateState handler is introduced in version 7.0 of the API that is called just before the OSD shows up to allow the script to set playerState variables. Example:

New (>= 7.0)
boxee.onUpdateState = function() { /* code */ }


Browser Modes

The browser currently has 3 main modes of operations, 4 total:

Cursor Mode

New (>= 7.0)

In this mode, the browser shows a cursor and allows cursor navigation using the remote controls arrow buttons. Clicking on links will follow them and clicking on edit fields will open up boxee’s keyboard dialog. Whenever the cursor hovers over an edit field it becomes focused so that input from the keyboard is passed directly to the control.

This is the default mode of operation.

To set this mode, call:

boxee.setMode(boxee.CURSOR_MODE);

When in cursor mode, a few handlers can be implemented to change the default behavior:

boxee.onMouseMoveDown

if this handler exists, it will be called when the used hits “down” (instead of moving the mouse down).

boxee.onMouseMoveDown = function() { boxee.log('User pressed Down'); }

All mouse handlers responding to the same logic:


Keyboard Mode

New (>= 7.0)

In this mode of operation, remote control navigation is translated to arrow keys. For example if the user hits the remote’s “up” button, the browser will act as if “arrow up” was pressed on the keyboard. This mode is very useful for various sites that were designed with 10ft UI in mind (e.g. youtube leanback). To set this mode, call:

boxee.setMode(boxee.KEYBOARD_MODE);

When in keyboard mode, a few handlers can be implemented to change the default behavior:

boxee.onKeyboardKeyDown

if this handler exists, it will be called when the used hits “down” (instead of sending “arrow down” to the browser).

boxee.onMouseMoveDown = function() { boxee.log('User pressed Down'); }

All keyboard handlers responding to the same logic:


Player Mode

New (>= 7.0)

When in player mode, the remote-control’s navigation keys translate to player actions.

To set this mode, call:

boxee.setMode(boxee.PLAYER_MODE);

The user can not override the behavior in Player Mode (for that matter, up/down will always control the volume). However, the user does need to provide handlers for available OSD actions:


Locked Player Mode

New (>= 7.0)

This is the same as Player Mode, however the user can not go back to the browser page and can not activate the cursor. It is essentially like regular playback mode. To set this mode, call:

boxee.setMode(boxee.LOCKED_PLAYER_MODE);


Browser Mode

Deprecated (<7.0)

This is a mode that was used in versions before 7.0 and is deprecated.


Normal Mode

Deprecated (<7.0)

This is a mode that was used in versions before 7.0 and is deprecated.


Control Scripts

Control scripts are called on by the Boxee player and used to manage playback functionality. These scripts can be defined in different ways and can be located in different places. When a the player loads a url, it will look for scripts in the following places/order:

bx-jsactions

1. specified in flash:// protocol media link
If using the flash potocol (flash://) for media links, the bx-jsactions parameter can be used to specify the URL for the control script to be loaded. Notice the bx-jsactions param in the example below.
See the Boxee RSS Specifications for more details on how to construct a proper link using the flash protocol.
flash://joost.com/src=http%3A%2F%2Fjoost.com%2Fembed%2F13600&bx-jsactions=http%3A%2F%2Fmyserver%2Fcontrol.js

local

2. used for debugging only
Does not load if bx-jsactions is specified.
See Testing and Debugging below.
/opt/boxee/system/players/flashplayer/joost.js

boxee server

3. Default location scripts created by boxee devs
Does not load if bx-jsactions is specified or loaded locally.
The Boxee server uses a number of methods to find a proper control script, including the domain from the url provided. These are scripts are written and managed by Boxee developers.

metadata tag

4. if available, will always be loaded
A control script url can be specified by web developers in the <head> tag of any page.
If exists, this script will load regardless of any others that may have already been loaded. Can be used to override predefined scripts.
<meta name="boxee-control" content="http://mysite.com/boxee/mysite.js" />

object src

4. loaded if no script was found before
If no control scripts have been located up to this point, Boxee will load the url and attempt to automatically locate the proper object on the page. (flash, silverlight, etc..)
If an object is found (<object> or <embed> tags), boxee will then look for the src or data attribute in that object.
Once found, the player will again check first locally, then on the boxee servers for the proper script.
<embed src="http://cdn.episodic.com/player/EpisodicPlayer.swf?pid=294" />


Testing & Debugging

You can write and test scripts locally, making the process much easier. Boxee will look in your local install folder for a domain.js to use before looking on our servers or another source. For this to work you must place your scripts under the flashplayer folder in your install directory (listed below). You can then use boxee.log(str) or alert(str) to debug your code. Make sure you enable logging with boxee.enableLog(true); before trying to debug your code.

Important Note: Viewing the js output in terminal is not available in Windows. To get the output we suggest using DebugView. You can download it here.

Windows

Use DebugView to monitor javascript output. C:\Program Files\Boxee\system\players\flashplayer\

Linux

Lauch boxee from a terminal to monitor javascript output /opt/boxee/system/players/flashplayer/

OSX

Open Console.app and select DATABASE SEARCHES > Console Messages to view javascript output. /Applications/Boxee.app/Contents/Resources/Boxee/system/players/flashplayer/

Non-PC Clients

Currently there is no way to monitor javascript output on devices such as the Boxee Box. We are actively working on developing a way for devs to obtain this output and will update the client as soon as its available.


"boxee" Web Object

New (>= 7.0)

Whenever a page is loaded in boxee’s embedded browser, a javascript object called “boxee” becomes available for scripts running on this page. This objects exports a single method: “exec”, which executes javascript code - inside the “javascript controller”.

This is very powerful in several ways: A site can...

boxee.exec('boxee.onPause = function() { browser.execute("document.player.pause()"); }')

This object will be wrapped with easier to use javascript functions in future releases.


Screen Modes

New (>= 7.0)

On embedded platforms, boxee supports the “real full screen” playback mode of flash. At the moment this is not supported on PC platforms and on those platforms boxee uses a “fake full screen” mode which is done by scaling up the flash "square" to the entire screen.

Many of the times, the control's layout is different between fake full screen and real full screen, which may cause problems with scripts that simulate clicks and mouse moves.

In order for the developer to control which full screen mode is used, a second (boolean) parameter to "setActive" is introduced. If it is set to "true" then boxee will try to activate the "real full screen" mode of the flash player. Note that setActive only applies when a flash object is manually selected.

This behavior can also be controlled by a new boolean boxee variable called “realFullScreen”.


boxee Object

Constants

Modes are define above in section 6.


Variables

realFullScreen
New (>= 7.0)
realFullScreen:Boolean
Controls the default full screen mode. see screen modes
boxee.realFullScreen = true;
renderBrowser
renderBrowser:Boolean
Controls whether the complete web page is shown or not
boxee.renderBrowser = true;
apiMinVersion
New (>= 7.0)
apiMinVersion:Number
Affects default values. For scripts utilizing the latest functionality it should be set to "7.0".
boxee.apiMinVersion = 7.0;
autoChoosePlayer
autoChoosePlayer:Boolean
Controls whether the browser should automatically pick the playing video from the page and present it full screen (skipping the web page phase). the default has changed in version 7.0 and is now "false".
boxee.autoChoosePlayer = true;
browserWidth
browserWidth:Number
Controls the size which the browser should open up to. Default is 1280. Remember that browser size can affect performance.
boxee.browserWidth = 853;
browserHeight
browserHeight:Number
Controls the size which the browser should open up to. Default is 720. Remember that browser size can affect performance.
boxee.browserHeight = 480;
useBoxeeCookies
useBoxeeCookies:Boolean
Controls whether to import the cookies from boxee so that they are available to the web page. This is useful when the page is launched from a script after already performing some HTTP transactions (e.g. login) using the built-in python modules. The default has changed in version 7.0 and is now set to "true".
boxee.useBoxeeCookies = false;
autoChooseRepeat
autoChooseRepeat:Boolean
If set to "true", boxee will repeatedly try and pick the playing video from the web page. This is useful in web pages that change the player (e.g. during commercials). this value is only used if "autoChoosePlayer" is set to "true".
boxee.autoChooseRepeat = true;
reloadOnPageChange
New (>= 7.0)
reloadOnPageChange:Boolean
If set to "true", will re-fetch and evaluate the domain’s JavaScript controller when navigating to a new web page. mind that the default is "false".
boxee.reloadOnPageChange = true;
showOSDOnStartup
New (>= 7.0)
showOSDOnStartup:Boolean
Show OSD when browser is first launched, default is true.
boxee.showOSDOnStartup = false;


Functions

getVersion
getVersion():Number
Returns the current api version.
boxee.getVersion();
enableLog
enableLog(allowLogging:Boolean):Void
This function switches logging on or off.
boxee.enableLog(true);
log
log(message:String):Void
If logging is enabled, this will output the message to standard error or as "OutputDebugString" on win32. Currently there is no valid way to obtain JavaScript debug logs from the Boxee Box, but is something we are currently working on.
boxee.log('this is a test!');
setCanPause
Deprecated (<7.0)
setCanPause(allowPausing:Boolean):Void
Notifies the client that pause functionality is available for this site’s player. Replaced with playerState.canPause in v7.
boxee.setCanPause(false);
setCanSkip
Deprecated (<7.0)
setCanSkip(allowSeek:Boolean):Void
Notifies the client that seek functionality is available for this site’s player. Replaced with playerState.canSeek
boxee.setCanSkip();
setCanSetVolume
Deprecated (<7.0)
setCanSetVolume(allowVolumeChange:Boolean):Void
Notifies the client that volume control is available for this site’s player. No replacement. Boxee volume control now controls system volume.
boxee.setCanSetVolume();
setMode
setMode(mode:Integer):Void
Changes the browser's mode of operation. see "Browser Modes" in section 6.
boxee.setMode(boxee.KEYBOARD_MODE);
notifyConfigChange
notifyConfigChange(width:Integer, height:Integer):Void
Tells the boxee client that the width and height of the display should change (for example - when scaling a player to full screen). This function does nothing on embedded platforms.
boxee.notifyConfigChange(720, 1280);
getWidgets
getWidgets(width:Integer, height:Integer):Array
Returns an array of all widgets known to the browser. Widget is an <embed>, <object> or <video> element on the page. see "Widget"
boxee.getWidgets();
getActiveWidget
getActiveWidget():Widget
If one of the widgets is now the active one (shown full screen), this function will return it
boxee.log(boxee.getActiveWidget().height);
setDefaultCrop
Deprecated (<7.0)
setDefaultCrop(left:Integer, top:Integer, right:Integer, bottom:Integer):Void
If the browser is to automatically choose the player (autoChoosePlayer) - this sets the crop of the player chosen.
boxee.setDefaultCrop(10, 10, 10, 50);
runInBrowser
Deprecated
See "browser.execute"
setDuration
Deprecated (<7.0)
setDuration(duration:Float):Void
Replaced with "playerState.duration"
boxee.setDuration(2365.12);
notifyCurrentTime
Deprecated (<7.0)
notifyCurrentTime(time:Float):Void
Replaced with "playerState.time"
boxee.notifyCurrentTime(26.58);
notifyPlaybackEnded
notifyPlaybackEnded():Void
Tells boxee that playback is done and the browser should be closed
boxee.notifyPlaybackEnded();
notifyCurrentProgress
Deprecated (<7.0)
notifyCurrentProgress(progress:Number):Void
Replaced with "playerState.progress"
boxee.notifyCurrentProgress(89);
notifyPlaybackPaused
Deprecated (<7.0)
notifyPlaybackPaused():Void
Replaced with "playerState.isPaused"
boxee.notifyPlaybackPaused();
notifyPlaybackResumed
Deprecated (<7.0)
notifyPlaybackResumed():Void
Replaced with "playerState.isPaused"
boxee.notifyPlaybackResumed();
getHttp
New (>= 7.0)
getHttp(url:String):String
Issues an "HTTP GET" on the provided URL and returns the result's body (the URL should contain text)
boxee.getHttp();
getCurrentLocation
New (>= 7.0)
getCurrentLocation():String
Returns the browser’s current URL
url = boxee.getCurrentLocation();
getParam
getParam(param:String):String
When the browser is launched, several parameters are set by the system and others are set by the launch command (if it was launched as "flash://"). The only valid system parameter at the moment is "src" which contains the original url that the browser was launched with.
source = boxee.getParam('src');
getPlatform
New (>= 7.0)
getPlatform():String
Returns the current platform.
"MacIntel" on mac, "appletv" on apple-tv, "dsm380” on boxee box, "Linux" on linux, "Win32" on windows
platform = boxee.getPlatform();
getCookie
Deprecated
setCookie
Deprecated
loadJS
New (>= 7.0)
loadJS(url:String):Void
Loads and evaluates the JavaScript at the provided URL.
boxee.loadJS('http://mysite.com/boxee/js/mysite.js');
enableExt
Deprecated (<7.0)
enableExt(id:Integer, title:String, thumbUrl:String):Void
See playerState.extN
boxee.enableExt(0, "Toggle HD", "http://mysite.com/icons/icons_hd.png");
disableExt
Deprecated (<7.0)
disableExt(id:Integer):Void
See playerState.extN | disableExt disabled an active extension.
boxee.disableExt(1);
showNotification
showNotification(message:String, thumbUrl:String, durationInSeconds:Integer):Void
Makes boxee show a popup notification. In pre 7.0 versions the popup is displayed in the top left, however in versions >= 7.0 the popup displays in the top right.
boxee.showNotification("This video is available in HD", ".", 3);
getTextInput
getTextInput(title:String, callbackFunction:String):Void
Launch boxee's keyboard OSD and assign a callback for the input.
boxee.getTextInput("this is the title", "OnUserInput");
 
function OnUserInput(inputText, confirmed) {
  if (confirmed)
    alert("user entered: "+inputText);
  else
    alert("user cancelled...");
}
launchInspector
New (>= 7.0)
launchInspector():Void
This is very useful for debugging, it will launch the builtin webkit inspector (the complete inspector, including javascript console).
boxee.launchInspector();
dumpWidgets
New (>= 7.0)
dumpWidgets():Void
If logging is enabled, this will dump information on all available widgets
boxee.dumpWidgets();
dumpActiveWidget
New (>= 7.0)
dumpActiveWidget():Void
If logging is enabled, this will dump information on the active widget (if there is one)
boxee.dumpActiveWidget();
callBoxeeBuiltin
New (>= 7.0)
callBoxeeBuiltin(builtinFunction:String):Void
Activates a builtin function in boxee, the exact same way as it is used from skin. See boxee’s UI documentation for more available actions.
boxee.callBoxeeBuiltin("ActivateWindow(NetworkSettings)");
showBoxeeOSD
New (>= 7.0)
showBoxeeOSD():Void
Reveals the Boxee OSD.
boxee.showBoxeeOSD();
autoSelectPlayer
New (>= 7.0)
autoSelectPlayer():Void
Tries to locate a player on the page (among the available widgets) and if one is found - automatically set it as active.
boxee.autoSelectPlayer();


Handlers

All functions that are called on various events (hooks).

onInit
Called after the browser is created, just before it navigates to the first page.
boxee.onInit = function() {}
onDocumentLoading
Called whenever a page starts loading
boxee.onDocumentLoading = function() {}
onDocumentLoaded
Called when the page had finished loading
boxee.onDocumentLoaded = function() {}
onNotifyUrl
onNotifyUrl():String
Called whenever a url resource is loaded by the web page. receives the url as a string parameter.
boxee.onNotifyUrl = function(url) { alert(url); }
onUpdateState
New (>= 7.0)
Called just before the browser’s OSD is shown. to allow setting the playerState correctly.
boxee.onUpdateState = function() {}
onEnterFullScreen
New (>= 7.0)
Called when the user requested that the player will go to full screen. if this handler exists, it is expected to cause the player to switch to full screen (the default action will not be executed).
boxee.onEnterFullScreen = function() {}
onExitFullScreen
New (>= 7.0)
Called when the user requested to leave full screen playback. if this handler exists then the default action will not be executed and the handler is expected to cause the player to leave full screen.
boxee.onExitFullScreen = function() {}
onPause
Called when the user requested that the video will be “paused”. this handler is expected to actually pause the video.
boxee.onPause = function() {}
onPlay
Called when the video should be resumed. the handler is expected to resume the video.
boxee.onPlay = function() {}
onSkip
Called when the user requested a short skip forward. the handler is expected to perform that skip.
boxee.onSkip = function() {}
onBigSkip
Called when the user requested a big skip forward. the handler is expected to perform that skip.
boxee.onBigSkip = function() {}
onBack
Called when the user requested a short jump backwards. the handler is expected to perform this jump.
boxee.onBack = function() {}
onBigBack
Called when the user requested a big jump backwards. the handler is expected to perform this jump.
boxee.onBigBack = function() {}
onKeyboardKeyUp
New (>= 7.0)
Called when in KEYBOARD_MODE and “up” was clicked. if this handler exists - the default action will not execute.
boxee.onKeyboardKeyUp = function() {}
onKeyboardKeyDown
New (>= 7.0)
Called when in KEYBOARD_MODE and “down” was clicked. if this handler exists - the default action will not execute.
boxee.onKeyboardKeyDown = function() {}
onKeyboardKeyLeft
New (>= 7.0)
Called when in KEYBOARD_MODE and “left” was clicked. if this handler exists - the default action will not execute.
boxee.onKeyboardKeyLeft = function() {}
onKeyboardKeyRight
New (>= 7.0)
Called when in KEYBOARD_MODE and “right” was clicked. if this handler exists - the default action will not execute.
boxee.onKeyboardKeyRight = function() {}
onKeyboardKeyEnter
New (>= 7.0)
Called when in KEYBOARD_MODE and “enter” (select) was clicked. if this handler exists - the default action will not execute.
boxee.onKeyboardKeyEnter = function() {}
onMouseMoveUp
New (>= 7.0)
Called when in CURSOR_MODE and is supposed to move the mouse up. it overrides the default behavior (if exists).
boxee.onMouseMoveUp = function() {}
onMouseMoveDown
New (>= 7.0)
Called when in CURSOR_MODE and is supposed to move the mouse down. it overrides the default behavior (if exists).
boxee.onMouseMoveDown = function() {}
onMouseMoveLeft
New (>= 7.0)
Called when in CURSOR_MODE and is supposed to move the mouse left. it overrides the default behavior (if exists).
boxee.onMouseMoveLeft = function() {}
onMouseMoveRight
New (>= 7.0)
Called when in CURSOR_MODE and is supposed to move the mouse right. it overrides the default behavior (if exists).
boxee.onMouseMoveRight = function() {}
onMouseClick
New (>= 7.0)
Called when in CURSOR_MODE and click was performed. it overrides the default behavior (if exists).
boxee.onMouseClick = function() {}


browser

Functions

execute
execute(expression:String):String
Execute JavaScript expression on the current web page.
isPlaying = browser.execute('document.player.isVideoPlaying();');
navigate
navigate(url:String):Void
Navigate to a given url.
browser.navigate();
mouseMove
mouseMove(x:Integer, y:Integer):Void
Moves mouse pointer to a specified location.
browser.mouseMove(500, 160);
click
click(x:Integer, y:Integer):Void
Simulates a mouse click at the specified location.
browser.click(500, 160);
mouseDown
mouseDown(x:Integer, y:Integer):Void
Simulates a mouse down event at the specified location.
browser.mouseDown(500, 160);
mouseUp
mouseUp(x:Integer, y:Integer):Void
Simulates a mouse up event at the specified location.
browser.mouseUp(500, 160);
keyPress
keyPress(keyCode:Integer):Void
Simulates a key press event in the browser.
List of available keyCodes
browser.keyPress(13);
keyUp
keyUp(keyCode:Integer):Void
Simulates a key up event in the browser.
List of available keyCodes
browser.keyUp(13);
keyDown
keyDown(keyCode:Integer):Void
Simulates a key down event in the browser.
List of available keyCodes
browser.keyDown(13);
setCookie
setCookie(domain:String, key:String, value:String):Void
Sets a cookie in the browser.
browser.setCookie('youtube.com', '_somekey', 'somevalue');
getLocation
getLocation():String
Asks the browser for the current URL
currentUrl = browser.getLocation();
mouseWheelLeft
mouseWheelLeft():Void
Simulates mouse wheel left.
browser.mouseWheelLeft();
mouseWheelRight
mouseWheelRight():Void
Simulates mouse wheel right.
browser.mouseWheelRight();
mouseWheelUp
mouseWheelUp():Void
Simulates mouse wheel up.
browser.mouseWheelUp();
mouseWheelDown
mouseWheelDown():Void
Simulates mouse wheel down.
browser.mouseWheelDown();
mouseWheelPageLeft
mouseWheelPageLeft():Void
Simulates mouse wheel "page jump" left
browser.mouseWheelPageLeft();
mouseWheelPageUp
mouseWheelPageUp():Void
Simulates mouse wheel "page jump" up
browser.mouseWheelPageUp();
mouseWheelPageDown
mouseWheelPageDown():Void
Simulates mouse wheel "page jump" down
browser.mouseWheelPageDown();
mouseWheelPageRight
mouseWheelPageRight():Void
Simulates mouse wheel "page jump" right
browser.mouseWheelPageRight();
getMeta
getMeta(name:String):String
Returns value of given meta tag from current page.
if (browser.getMeta('viewport') == 'user-scalable=no') return;
reload
reload():Void
Reloads the current page.
browser.reload();
back
New (>= 7.0)
back():Void
Navigate back in history
browser.back();
forward
New (>= 7.0)
forward():Void
Navigate forward
browser.forward();
historyLength
New (>= 7.0)
historyLength():Integer
Returns the amount of entries in history
if (browser.historyLength() != 1) return;
focusNext
New (>= 7.0)
focusNext():Void
Set the focus on the next element (tab order)
browser.focusNext();
focusPrev
New (>= 7.0)
focusPrev():Void
Set the focus on the prev element (tab order)
browser.focusPrev();
stop
New (>= 7.0)
stop():Void
Stops the current page from loading.
browser.stop();
lastUrl
New (>= 7.0)
lastUrl():String
Returns a string with the last URL visited (from history)
browser.lastUrl();
nextUrl
New (>= 7.0)
nextUrl():String
If exists - the next url in history is returned
if (browser.nextUrl()) browser.forward();
invalidate
New (>= 7.0)
invalidate():Void
Redraws the browser page
browser.invalidate();
setUserAgent
New (>= 7.0)
setUserAgent(userAgent:String):Void
Sets the User Agent.
browser.setUserAgent('Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0) Gecko/20100101 Firefox/4.0');
getWidth
New (>= 7.0)
getWidth():Integer
Returns the width of the browser.
browserWidth = browser.getWidth();
getHeight
New (>= 7.0)
getHeight():Integer
returns the height of the browser
browserHeight = browser.getHeight();


playerState

Variables

canSeek
New (>= 7.0)
canSeek:Boolean
Enable seek.
playerState.canSeek = true;
canPause
New (>= 7.0)
canPause:Boolean
Enable pause/play.
playerState.canPause = true;
isPaused
New (>= 7.0)
isPaused:Boolean
Tells the Boxee OSD the current player state (player can be paused in mouse mode. in that case - this is the only way for boxee to know about it)
playerState.isPaused = false;
canSetFullScreen
New (>= 7.0)
canSetFullScreen:Boolean
Show the 'one-click' fullscreen button on the OSD. When this button is clicked, boxee will attempt to auto choose the correct video.
playerState.canSetFullScreen = true;
time
New (>= 7.0)
time:Float
The time in seconds that has elapsed.
playerState.time = 135.45;
duration
New (>= 7.0)
duration:Float
Specify the length of the video. in seconds.
playerState.duration = 1485;
progress
New (>= 7.0)
progress:Integer
This is automatically computed if both time and duration are specified. If not this sets the percentage of the video that has been completed.
playerState.progress = 50;
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox