blob: 90aae3ad72792de145ac3dce9eaa880f6f261caf [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<library>
<!---
View for recorded contents list.
When you select 'Recordings' on the top menu, this class shows the list.
-->
<class name="lzRecordingsViewAdapter" extends="view">
<attribute name="currentTime" value="0" type="number" />
<event name="onUpdateRecordingStreamTime" />
<event name="onTogglePlayRecordingStream" />
<event name="onRecordingStoppedAndDisconnected" />
<event name="onPlayComplete" />
<method name="getTime">
return this.currentTime;
</method>
<handler name="oninit">
var t = this;
canvas.videoComp_lc.stopRecordingStream = function() {
if ($debug) Debug.write("LC stopRecordingStream");
t.parent.parent.stopStream();
}
canvas.videoComp_lc.updateRecordingStreamTime = function(newTime) {
if ($debug) Debug.write("LC updateRecordingStreamTime ::",newTime);
t.currentTime = newTime;
t.onUpdateRecordingStreamTime.sendEvent();
}
canvas.videoComp_lc.togglePlayRecordingStream = function() {
if ($debug) Debug.write("LC togglePlayRecordingStream ::");
t.onTogglePlayRecordingStream.sendEvent();
}
canvas.videoComp_lc.recordingStoppedAndDisconnected = function() {
if ($debug) Debug.write("LC togglePlayRecordingStream ::");
t.onRecordingStoppedAndDisconnected.sendEvent();
}
</handler>
<method name="connect">
if ($debug) Debug.write("connect");
var tx = this.getAttributeRelative("x",canvas);
var ty = this.getAttributeRelative("y",canvas);
canvas.sendViaLocalConnection(canvas.rtmp_lc_name, "connectRecordingPlayer", [canvas.thishib.src, tx, ty, this.width, this.height]);
</method>
<method name="disconnect">
if ($debug) Debug.write("disconnect");
</method>
<method name="playStream" args="stream,delay">
var tx = this.getAttributeRelative("x",canvas);
var ty = this.getAttributeRelative("y",canvas);
this.currentTime = 0;
if ($debug) Debug.write("playRecordingStream ",stream, delay, tx, ty, this.width, this.height);
canvas.sendViaLocalConnection(canvas.rtmp_lc_name, "playRecordingStream", [stream, delay, tx, ty, this.width, this.height]);
</method>
<method name="updateRecordingVideoPosition">
canvas.sendViaLocalConnection(canvas.rtmp_lc_name, "updateRecordingVideoPosition", [this.width, this.height]);
</method>
<method name="seek" args="flvTime">
if ($debug) Debug.write("seek ",flvTime);
canvas.sendViaLocalConnection(canvas.rtmp_lc_name, "seekRecordingPlayback", [flvTime]);
</method>
<method name="pause" args="pauseBool">
if ($debug) Debug.write("lzRecordingsViewAdapter::pause value: ",pauseBool);
canvas.sendViaLocalConnection(canvas.rtmp_lc_name, "pauseRecordingPlayback", [pauseBool]);
</method>
<method name="stop">
if ($debug) Debug.write("SEND stop ");
canvas.sendViaLocalConnection(canvas.rtmp_lc_name, "stopRecordingStream", null);
</method>
<method name="stopAndCloseConnection">
if ($debug) Debug.write("SEND stopAndCloseConnection ");
canvas.sendViaLocalConnection(canvas.rtmp_lc_name, "stopAndCloseRecordingConnection", null);
</method>
</class>
</library>