In order to use a camera in an LZX application, the visible and allowed attributes must be set to true. The visible indicates the program's intent and the allowed attribute indicates the user's permission. To protect privacy, camera operation must be explicitly approved by the user.
<canvas height="100">
<camera id="rtc" src="rtmp://localhost/test" autoconnect="false"/>
<text text="${rtc.status}"/>
<button onclick="rtc.connect()">Click to Connect</button>
</canvas>| Name (CSS property) | Type (tag) | Type (js) | Default | Category |
|---|---|---|---|---|
bandwidth
|
expression | any | 16384 | read/write |
| Camera bandwidth (in bytes per second). | ||||
favorsize
|
expression | any | false | read/write |
| Often several capture modes are available per camera device. These modes will allow capturing at a specific size (width/height) and framerate. If you specify both fps and width and height for this camera, this attribute will control which capturing mode for the camera device will be used. | ||||
fps
|
expression | any | null | read/write |
| The number of frames per second that will be captured by the camera. | ||||
height
|
expression | any | null | read/write |
| The height (resolution) that will be captured by the camera. | ||||
picturequality
|
expression | any | 0 | read/write |
| Camera picture quality: a value between 0 and 1, where 1 represents the highest quality (no compression). When 0 is passed, this indicates to use highest quality that fits into the available bandwidth | ||||
show
|
expression | any | false | read/write |
| If true, show camera on immediateparent videoview. | ||||
width
|
expression | any | null | read/write |
| The width (resolution) that will be captured by the camera. | ||||
classroot, cloneManager, data, datapath, defaultplacement, id, ignoreplacement, immediateparent, inited, initstage, name, nodeLevel, options, parent, placement, styleclass, subnodes, transition
Methods
| destroy() |
|---|
| getCameraNames() |
|---|
| setMode() |
|---|
| setQuality() |
|---|
| startDevice() |
|---|
animate, applyConstraintMethod, applyData, childOf, completeInstantiation, construct, createChildren, dataBindAttribute, destroy, determinePlacement, getOption, getUID, init, lookupSourceLocator, releaseConstraint, releaseConstraintMethod, searchImmediateSubnodes, searchSubnodes, setOption, setSelected, updateData
Events
Copyright © 2002-2010 Laszlo Systems, Inc. All Rights Reserved. Unauthorized use, duplication or distribution is strictly prohibited. This is the proprietary information of Laszlo Systems, Inc. Use is subject to license terms.