videoscreen.lzx
<library>
<include href="extensions/av/mediastream.lzx"/>
<include href="extensions/av/videoview.lzx"/>
<class name="videoscreen" bgcolor="0x000000" visible="${(this.width > 1) && (this.height > 1)}">
<attribute name="debug" value="false
"/>
<attribute name="starttime" value="0
" type="number"/>
<attribute name="type" type="string" value="http
"/>
<attribute name="url" type="string" value="
"/>
<attribute name="autoplay" value="false
"/>
<attribute name="capturing" value="false
"/>
<attribute name="volume" value="1.0
"/>
<attribute name="borderLeft" value="5
"/>
<attribute name="borderRight" value="5
"/>
<attribute name="borderTop" value="5
"/>
<attribute name="borderBottom" value="5
"/>
<attribute name="aspectRatio" value="$once{ 4 / 3}"/>
<attribute name="videoWidth" value="${ Math.min(this.innerWidth, this.innerHeight * this.aspectRatio)}"/>
<attribute name="videoHeight" value="${ Math.min(this.innerHeight, this.innerWidth / this.aspectRatio)}"/>
<attribute name="innerWidth" value="${ this.width - (this.borderLeft + this.borderRight)}"/>
<attribute name="innerHeight" value="${ this.height - (this.borderTop + this.borderBottom)}"/>
<mediastream name="ms" autoplay="${classroot.autoplay}" type="${classroot.type}" url="${classroot.url}" debug="${parent.debug}"/>
<videoview name="vv" x="${parent.borderLeft + (parent.innerWidth-parent.videoWidth)/2}" y="${parent.borderTop + (parent.innerHeight-parent.videoHeight)/2}" width="${parent.videoWidth}" height="${parent.videoHeight}" stream="$once{classroot.ms}" visible="${parent.visible && (this.width > 1) && (this.height > 1)}" playvolume="${classroot.volume}" starttime="${classroot.starttime}" debug="${parent.debug}">
</videoview>
</class>
</library>
Cross References
Includes
Classes