SecondScreenHost Class
src/secondscreen-host.js:110
SecondScreenHost global entry object, accessible on the browser through window.secondscreenHost.noConflict().
Copyright (c) 2013 Infrared5
Item Index
Properties
Methods
allDevices
()
Function
Returns proxy to Device API on all devices.
see device.Device
Returns:
Proxy on full Device API
getDeviceById
-
id
Returns associated Device with id if connected. Returns undefined if Device not found.
see device.Device
Parameters:
-
id
StringAssociated unique identifier for connected Device
Returns:
getVisibility
()
Boolean
Returns visibility of this Host instance on the registry.
Returns:
setLogLevel
-
level
Define the log level for printing messages from the Host to the console.
Parameters:
-
level
IntEnumeration value from
setVisibility
-
value
Sets visibility/accessibility of this Host instance on the registry. If set to false, the Host is not considered registered and available to connect to from a Client device.
Parameters:
-
value
BooleanFlag of visibility.
start
-
config
-
forceFlash
Starts a SecondScreen Host session. Attempts to register host on target registryUrl defined in configuration.
Parameters:
-
config
ObjectConfiguration for host.
-
forceFlash
BooleanFlag to force flash fallback usage. Otherwise, determined on browser capabilities.
Example:
var host = window.secondscreenHost.noConflict();
host.start({
name: "SDK Examples",
registryUrl: "ws://54.82.36.3:6262/secondscreen",
appId: "secondscreen",
controlMode: host.ControlModes.HTML,
controlsUrl: "scheme/basic-scheme.html"
});
stop
()
Stops a SecondScreen Host session. Unregisters host from remote/local registry and shuts down all connections.
Example:
var host = window.secondscreenHost.noConflict();
host.start({
name: "SDK Examples",
registryUrl: "ws://54.82.36.3:6262/live",
appId: "secondscreen",
controlMode: host.ControlModes.HTML,
controlsUrl: "scheme/basic-scheme.html"
});
...
host.stop();
versionStr
()
String
Returns the current version in prety print String
Returns:
Properties
SlotColors
Array
List of designated Slot Colors in registry.