mirror of
https://github.com/burrow-dev/burrow-server.git
synced 2026-11-20 01:37:50 -05:00
Brought up to date with the private repository (feea4c7)
This commit is contained in:
1 parent
1aa738d692
commit
1b1df1ae48
7925 files changed
+2617237
-20
No files matched your search
@@ -0,0 +1,28 @@
|
||||
package org.osmf.net.httpstreaming.dvr
|
||||
{
|
||||
public class DVRInfo
|
||||
{
|
||||
|
||||
public var id:String;
|
||||
|
||||
public var url:String;
|
||||
|
||||
public var beginOffset:uint = 0;
|
||||
|
||||
public var endOffset:uint = 0;
|
||||
|
||||
public var offline:Boolean;
|
||||
|
||||
public var isRecording:Boolean;
|
||||
|
||||
public var curLength:Number;
|
||||
|
||||
public var startTime:Number = NaN;
|
||||
|
||||
public function DVRInfo()
|
||||
{
|
||||
super();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
package org.osmf.net.httpstreaming.dvr
|
||||
{
|
||||
import flash.net.NetConnection;
|
||||
import org.osmf.events.DVRStreamInfoEvent;
|
||||
import org.osmf.net.httpstreaming.HTTPNetStream;
|
||||
import org.osmf.traits.DVRTrait;
|
||||
|
||||
public class HTTPStreamingDVRCastDVRTrait extends DVRTrait
|
||||
{
|
||||
|
||||
private var _connection:NetConnection;
|
||||
|
||||
private var _stream:HTTPNetStream;
|
||||
|
||||
private var _dvrInfo:DVRInfo;
|
||||
|
||||
public function HTTPStreamingDVRCastDVRTrait(param1:NetConnection, param2:HTTPNetStream, param3:DVRInfo)
|
||||
{
|
||||
_connection = param1;
|
||||
_stream = param2;
|
||||
_dvrInfo = param3;
|
||||
_stream.addEventListener("DVRStreamInfo",onDVRStreamInfo);
|
||||
super(param3.isRecording);
|
||||
}
|
||||
|
||||
private function onDVRStreamInfo(param1:DVRStreamInfoEvent) : void
|
||||
{
|
||||
_dvrInfo = param1.info as DVRInfo;
|
||||
setIsRecording(_dvrInfo == null ? false : _dvrInfo.isRecording);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
package org.osmf.net.httpstreaming.dvr
|
||||
{
|
||||
import flash.events.NetStatusEvent;
|
||||
import flash.net.NetConnection;
|
||||
import org.osmf.events.DVRStreamInfoEvent;
|
||||
import org.osmf.net.httpstreaming.HTTPNetStream;
|
||||
import org.osmf.traits.TimeTrait;
|
||||
|
||||
public class HTTPStreamingDVRCastTimeTrait extends TimeTrait
|
||||
{
|
||||
|
||||
private var _connection:NetConnection;
|
||||
|
||||
private var _stream:HTTPNetStream;
|
||||
|
||||
private var _dvrInfo:DVRInfo;
|
||||
|
||||
public function HTTPStreamingDVRCastTimeTrait(param1:NetConnection, param2:HTTPNetStream, param3:DVRInfo)
|
||||
{
|
||||
super(NaN);
|
||||
_connection = param1;
|
||||
_stream = param2;
|
||||
_dvrInfo = param3;
|
||||
_stream.addEventListener("DVRStreamInfo",onDVRStreamInfo);
|
||||
_stream.addEventListener("netStatus",onNetStatus);
|
||||
}
|
||||
|
||||
override public function get duration() : Number
|
||||
{
|
||||
if(_dvrInfo == null)
|
||||
{
|
||||
return NaN;
|
||||
}
|
||||
return _dvrInfo.curLength;
|
||||
}
|
||||
|
||||
override public function get currentTime() : Number
|
||||
{
|
||||
return _stream.time;
|
||||
}
|
||||
|
||||
private function onDVRStreamInfo(param1:DVRStreamInfoEvent) : void
|
||||
{
|
||||
_dvrInfo = param1.info as DVRInfo;
|
||||
setDuration(_dvrInfo.curLength);
|
||||
}
|
||||
|
||||
private function onNetStatus(param1:NetStatusEvent) : void
|
||||
{
|
||||
var _loc2_:* = param1.info.code;
|
||||
if("NetStream.Play.UnpublishNotify" === _loc2_)
|
||||
{
|
||||
signalComplete();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user