<mediastream>
allows applications to stream video from HTTP or RTMP servers. Classes like <videoview>
use mediastreams to handle the connection to the server.
<canvas
>
<mediastream
name
="ms
" autoplay
="true
" type
="http
" url
="http://www.archive.org/download//JudgeMediaTestVideoFile_0/video.flv
"/>
<videoview
type
="http
" autoplay
="true
" width
="320
" height
="240
" stream
="canvas.ms
"/>
</canvas
>
Name (CSS property) | Type (tag) | Type (js) | Default | Category |
---|---|---|---|---|
autoplay
|
boolean | Boolean | false | read/write |
If true, video will start playing as soon as url is set. | ||||
autoplayLength
|
expression | String | 'end' | read/write |
Autoplay length argument passed to mediastream.play(). See the mediastream.play documentation for its values. | ||||
autoplayPause
|
boolean | Boolean | false | read/write |
Autoplay pause argument passed to mediastream.play(). See the mediastream.play documentation for its values. | ||||
autoplayReset
|
expression | Boolean | true | read/write |
Autoplay reset argument passed to mediastream.play(). See the mediastream.play documentation for its values. | ||||
autoplayStart
|
expression | String | 'either' | read/write |
Autoplay start argument passed to mediastream.play(). See the mediastream.play documentation for its values. | ||||
autorewind
|
boolean | Boolean | true | read/write |
If true, video will automatically rewind to the beginning (and remain in a paused state) when playback ends. | ||||
broadcasting
|
expression | Boolean | (this.mode == 'broadcasting') || (this.mode == 'recording') | readonly |
True if broadcasting right now. | ||||
buffertime
|
number | Number | 0.1 | read/write |
Amount of time (in seconds) to buffer before starting to display the stream. For a publishing stream, bufferTime specifies how long the outgoing buffer can grow before the application starts dropping frames. | ||||
cam
|
expression | lz.camera | null | readonly |
A reference to the camera. This must be set if broadcasting. This is set automatically if the stream is a child of a videoview. | ||||
debug
|
expression | Boolean | false | read/write |
When true, print extra info to the debugger. | ||||
fps
|
number | Number | 0 | read/write |
The current frames per second for playing video. | ||||
mic
|
expression | lz.microphone | null | readonly |
A reference to the microphone. This must be set if broadcasting. This is set automatically if the stream is a child of a videoview. | ||||
mode
|
string | String | read/write | |
Mode: "" if doing nothing, "playing" if playing, "broadcasting" if can be received, "recording" if recording. Recording also implies can be received, i.e., broadcasting. Pausing does not affect the mode, unlike stopping. | ||||
muteaudio
|
expression | Boolean | false | readonly |
True iff audio is muted. | ||||
mutevideo
|
expression | Boolean | false | readonly |
True iff video is muted. | ||||
paused
|
boolean | Boolean | false | read/write |
True to pause playback. Named this way to pun with paused for animators. | ||||
playing
|
expression | Boolean | (this.mode == 'playing') && (!this.paused) | readonly |
True if playing right now. | ||||
progress
|
number | Number | 0 | read/write |
Progress of mediastream currently downloading. (from 0 for none to 1 for all). | ||||
recording
|
expression | Boolean | this.mode == 'recording' | readonly |
True if recording right now. | ||||
rtmp
|
expression | lz.rtmpconnection | null | read/write |
The rtmp connection to use (defaults to the first one created). | ||||
streamname
|
string | String | read/write | |
The rtmp streamname (without .flv suffix). | ||||
time
|
number | Number | 0 | readonly |
Current time of mediastream currently playing or recording (in seconds) | ||||
totaltime
|
number | Number | 0 | readonly |
Total length (in seconds) of mediastream currently playing. | ||||
type
|
string | String | http | read/write |
Protocol "rtmp" or "http". | ||||
url
|
string | String | read/write | |
The url of the mediastream, maybe be relative URL, for example: http://localhost/myvideo.flv, or simply myvideo.flv when type="rtmp" the url is always relative to the rtmpconnection. |
classroot, cloneManager, data, datapath, defaultplacement, id, ignoreplacement, immediateparent, inited, initstage, name, nodeLevel, options, parent, placement, styleclass, subnodes, transition
Methods
broadcast() |
---|
close() |
---|
pause() |
---|
play() |
---|
record() |
---|
seek() |
---|
stop() |
---|
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.