mirror of
https://github.com/burrow-dev/burrow-server.git
synced 2026-11-21 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,68 @@
|
||||
package org.osmf.captioning.model
|
||||
{
|
||||
import flash.errors.IllegalOperationError;
|
||||
import org.osmf.metadata.TimelineMarker;
|
||||
import org.osmf.utils.OSMFStrings;
|
||||
|
||||
public class Caption extends TimelineMarker
|
||||
{
|
||||
|
||||
private var _id:uint;
|
||||
|
||||
private var _captionText:String;
|
||||
|
||||
private var _formats:Vector.<CaptionFormat>;
|
||||
|
||||
public function Caption(param1:uint, param2:Number, param3:Number, param4:String)
|
||||
{
|
||||
var _loc5_:Number = param3 > 0 ? param3 - param2 : NaN;
|
||||
super(param2,_loc5_);
|
||||
this._id = param1;
|
||||
this._captionText = param4;
|
||||
}
|
||||
|
||||
public function addCaptionFormat(param1:CaptionFormat) : void
|
||||
{
|
||||
if(this._formats == null)
|
||||
{
|
||||
this._formats = new Vector.<CaptionFormat>();
|
||||
}
|
||||
this._formats.push(param1);
|
||||
}
|
||||
|
||||
public function get numCaptionFormats() : int
|
||||
{
|
||||
var _loc1_:int = 0;
|
||||
if(this._formats != null)
|
||||
{
|
||||
_loc1_ = int(this._formats.length);
|
||||
}
|
||||
return _loc1_;
|
||||
}
|
||||
|
||||
public function getCaptionFormatAt(param1:int) : CaptionFormat
|
||||
{
|
||||
if(this._formats == null || param1 >= this._formats.length || param1 < 0)
|
||||
{
|
||||
throw new IllegalOperationError(OSMFStrings.getString(OSMFStrings.INVALID_PARAM));
|
||||
}
|
||||
return this._formats[param1];
|
||||
}
|
||||
|
||||
public function get text() : String
|
||||
{
|
||||
return this._captionText;
|
||||
}
|
||||
|
||||
public function get clearText() : String
|
||||
{
|
||||
var _loc1_:String = "";
|
||||
if(this._captionText != null && this._captionText.length > 0)
|
||||
{
|
||||
_loc1_ = this._captionText.replace(/<(.|\n)*?>/g,"");
|
||||
}
|
||||
return _loc1_;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
package org.osmf.captioning.model
|
||||
{
|
||||
public class CaptionFormat
|
||||
{
|
||||
|
||||
public static const UNDEFINED_INDEX:int = -1;
|
||||
|
||||
private static const MISSING_STYLE_ERROR_MSG:String = "CaptionStyle is required for CaptionFormat objects";
|
||||
|
||||
private var _startIndex:int;
|
||||
|
||||
private var _endIndex:int;
|
||||
|
||||
private var _style:CaptionStyle;
|
||||
|
||||
public function CaptionFormat(param1:CaptionStyle, param2:int = -1, param3:int = -1)
|
||||
{
|
||||
super();
|
||||
if(param1 == null)
|
||||
{
|
||||
throw new ArgumentError(MISSING_STYLE_ERROR_MSG);
|
||||
}
|
||||
this._startIndex = param2;
|
||||
this._endIndex = param3;
|
||||
this._style = param1;
|
||||
}
|
||||
|
||||
public function get startIndex() : int
|
||||
{
|
||||
return this._startIndex;
|
||||
}
|
||||
|
||||
public function get endIndex() : int
|
||||
{
|
||||
return this._endIndex;
|
||||
}
|
||||
|
||||
public function get style() : CaptionStyle
|
||||
{
|
||||
return this._style;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,140 @@
|
||||
package org.osmf.captioning.model
|
||||
{
|
||||
public class CaptionStyle
|
||||
{
|
||||
|
||||
private var _id:String;
|
||||
|
||||
private var _backgroundColor:Object;
|
||||
|
||||
private var _backgroundColorAlpha:Object;
|
||||
|
||||
private var _textColor:Object;
|
||||
|
||||
private var _textColorAlpha:Object;
|
||||
|
||||
private var _fontFamily:String;
|
||||
|
||||
private var _fontSize:int;
|
||||
|
||||
private var _fontStyle:String;
|
||||
|
||||
private var _fontWeight:String;
|
||||
|
||||
private var _textAlign:String;
|
||||
|
||||
private var _wrapOption:Boolean;
|
||||
|
||||
public function CaptionStyle(param1:String)
|
||||
{
|
||||
super();
|
||||
this._id = param1;
|
||||
}
|
||||
|
||||
public function get id() : String
|
||||
{
|
||||
return this._id;
|
||||
}
|
||||
|
||||
public function get backgroundColor() : Object
|
||||
{
|
||||
return this._backgroundColor;
|
||||
}
|
||||
|
||||
public function set backgroundColor(param1:Object) : void
|
||||
{
|
||||
this._backgroundColor = param1;
|
||||
}
|
||||
|
||||
public function get backgroundColorAlpha() : Object
|
||||
{
|
||||
return this._backgroundColorAlpha;
|
||||
}
|
||||
|
||||
public function set backgroundColorAlpha(param1:Object) : void
|
||||
{
|
||||
this._backgroundColorAlpha = param1;
|
||||
}
|
||||
|
||||
public function get textColor() : Object
|
||||
{
|
||||
return this._textColor;
|
||||
}
|
||||
|
||||
public function set textColor(param1:Object) : void
|
||||
{
|
||||
this._textColor = param1;
|
||||
}
|
||||
|
||||
public function get textColorAlpha() : Object
|
||||
{
|
||||
return this._textColorAlpha;
|
||||
}
|
||||
|
||||
public function set textColorAlpha(param1:Object) : void
|
||||
{
|
||||
this._textColorAlpha = param1;
|
||||
}
|
||||
|
||||
public function get fontFamily() : String
|
||||
{
|
||||
return this._fontFamily;
|
||||
}
|
||||
|
||||
public function set fontFamily(param1:String) : void
|
||||
{
|
||||
this._fontFamily = param1;
|
||||
}
|
||||
|
||||
public function get fontSize() : int
|
||||
{
|
||||
return this._fontSize;
|
||||
}
|
||||
|
||||
public function set fontSize(param1:int) : void
|
||||
{
|
||||
this._fontSize = param1;
|
||||
}
|
||||
|
||||
public function get fontStyle() : String
|
||||
{
|
||||
return this._fontStyle;
|
||||
}
|
||||
|
||||
public function set fontStyle(param1:String) : void
|
||||
{
|
||||
this._fontStyle = param1;
|
||||
}
|
||||
|
||||
public function get fontWeight() : String
|
||||
{
|
||||
return this._fontWeight;
|
||||
}
|
||||
|
||||
public function set fontWeight(param1:String) : void
|
||||
{
|
||||
this._fontWeight = param1;
|
||||
}
|
||||
|
||||
public function get textAlign() : String
|
||||
{
|
||||
return this._textAlign;
|
||||
}
|
||||
|
||||
public function set textAlign(param1:String) : void
|
||||
{
|
||||
this._textAlign = param1;
|
||||
}
|
||||
|
||||
public function get wrapOption() : Boolean
|
||||
{
|
||||
return this._wrapOption;
|
||||
}
|
||||
|
||||
public function set wrapOption(param1:Boolean) : void
|
||||
{
|
||||
this._wrapOption = param1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,111 @@
|
||||
package org.osmf.captioning.model
|
||||
{
|
||||
import flash.errors.IllegalOperationError;
|
||||
import org.osmf.utils.OSMFStrings;
|
||||
|
||||
public class CaptioningDocument
|
||||
{
|
||||
|
||||
private var _title:String;
|
||||
|
||||
private var _desc:String;
|
||||
|
||||
private var _copyright:String;
|
||||
|
||||
private var _captions:Vector.<Caption>;
|
||||
|
||||
private var _styles:Vector.<CaptionStyle>;
|
||||
|
||||
public function CaptioningDocument()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
public function get title() : String
|
||||
{
|
||||
return this._title;
|
||||
}
|
||||
|
||||
public function set title(param1:String) : void
|
||||
{
|
||||
this._title = param1;
|
||||
}
|
||||
|
||||
public function get description() : String
|
||||
{
|
||||
return this._desc;
|
||||
}
|
||||
|
||||
public function set description(param1:String) : void
|
||||
{
|
||||
this._desc = param1;
|
||||
}
|
||||
|
||||
public function get copyright() : String
|
||||
{
|
||||
return this._copyright;
|
||||
}
|
||||
|
||||
public function set copyright(param1:String) : void
|
||||
{
|
||||
this._copyright = param1;
|
||||
}
|
||||
|
||||
public function addStyle(param1:CaptionStyle) : void
|
||||
{
|
||||
if(this._styles == null)
|
||||
{
|
||||
this._styles = new Vector.<CaptionStyle>();
|
||||
}
|
||||
this._styles.push(param1);
|
||||
}
|
||||
|
||||
public function get numStyles() : int
|
||||
{
|
||||
var _loc1_:int = 0;
|
||||
if(this._styles != null)
|
||||
{
|
||||
_loc1_ = int(this._styles.length);
|
||||
}
|
||||
return _loc1_;
|
||||
}
|
||||
|
||||
public function getStyleAt(param1:int) : CaptionStyle
|
||||
{
|
||||
if(this._styles == null || param1 >= this._styles.length)
|
||||
{
|
||||
throw new IllegalOperationError(OSMFStrings.getString(OSMFStrings.INVALID_PARAM));
|
||||
}
|
||||
return this._styles[param1];
|
||||
}
|
||||
|
||||
public function addCaption(param1:Caption) : void
|
||||
{
|
||||
if(this._captions == null)
|
||||
{
|
||||
this._captions = new Vector.<Caption>();
|
||||
}
|
||||
this._captions.push(param1);
|
||||
}
|
||||
|
||||
public function get numCaptions() : int
|
||||
{
|
||||
var _loc1_:int = 0;
|
||||
if(this._captions != null)
|
||||
{
|
||||
_loc1_ = int(this._captions.length);
|
||||
}
|
||||
return _loc1_;
|
||||
}
|
||||
|
||||
public function getCaptionAt(param1:int) : Caption
|
||||
{
|
||||
if(this._captions == null || param1 >= this._captions.length)
|
||||
{
|
||||
throw new IllegalOperationError(OSMFStrings.getString(OSMFStrings.INVALID_PARAM));
|
||||
}
|
||||
return this._captions[param1];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user