mirror of
https://github.com/burrow-dev/burrow-server.git
synced 2026-11-21 17: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,96 @@
|
||||
package org.osmf.traits
|
||||
{
|
||||
import org.osmf.events.BufferEvent;
|
||||
|
||||
public class BufferTrait extends MediaTraitBase
|
||||
{
|
||||
|
||||
private var _buffering:Boolean = false;
|
||||
|
||||
private var _bufferLength:Number = 0;
|
||||
|
||||
private var _bufferTime:Number = 0;
|
||||
|
||||
public function BufferTrait()
|
||||
{
|
||||
super(MediaTraitType.BUFFER);
|
||||
}
|
||||
|
||||
public function get buffering() : Boolean
|
||||
{
|
||||
return this._buffering;
|
||||
}
|
||||
|
||||
public function get bufferLength() : Number
|
||||
{
|
||||
return this._bufferLength;
|
||||
}
|
||||
|
||||
public function get bufferTime() : Number
|
||||
{
|
||||
return this._bufferTime;
|
||||
}
|
||||
|
||||
public function set bufferTime(param1:Number) : void
|
||||
{
|
||||
if(isNaN(param1) || param1 < 0)
|
||||
{
|
||||
param1 = 0;
|
||||
}
|
||||
if(param1 != this._bufferTime)
|
||||
{
|
||||
this.bufferTimeChangeStart(param1);
|
||||
this._bufferTime = param1;
|
||||
this.bufferTimeChangeEnd();
|
||||
}
|
||||
}
|
||||
|
||||
final protected function setBufferLength(param1:Number) : void
|
||||
{
|
||||
if(param1 != this._bufferLength)
|
||||
{
|
||||
this.bufferLengthChangeStart(param1);
|
||||
this._bufferLength = param1;
|
||||
this.bufferLengthChangeEnd();
|
||||
}
|
||||
}
|
||||
|
||||
final protected function setBuffering(param1:Boolean) : void
|
||||
{
|
||||
if(param1 != this._buffering)
|
||||
{
|
||||
this.bufferingChangeStart(param1);
|
||||
this._buffering = param1;
|
||||
this.bufferingChangeEnd();
|
||||
}
|
||||
}
|
||||
|
||||
protected function bufferingChangeStart(param1:Boolean) : void
|
||||
{
|
||||
}
|
||||
|
||||
protected function bufferingChangeEnd() : void
|
||||
{
|
||||
dispatchEvent(new BufferEvent(BufferEvent.BUFFERING_CHANGE,false,false,this._buffering));
|
||||
}
|
||||
|
||||
protected function bufferLengthChangeStart(param1:Number) : void
|
||||
{
|
||||
}
|
||||
|
||||
protected function bufferLengthChangeEnd() : void
|
||||
{
|
||||
dispatchEvent(new BufferEvent(BufferEvent.BUFFER_LENGTH_CHANGE,false,false,false,NaN,this._bufferLength));
|
||||
}
|
||||
|
||||
protected function bufferTimeChangeStart(param1:Number) : void
|
||||
{
|
||||
}
|
||||
|
||||
protected function bufferTimeChangeEnd() : void
|
||||
{
|
||||
dispatchEvent(new BufferEvent(BufferEvent.BUFFER_TIME_CHANGE,false,false,false,this._bufferTime));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user