mirror of
https://github.com/burrow-dev/burrow-server.git
synced 2026-11-19 09: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_);
|
||||
_id = param1;
|
||||
_captionText = param4;
|
||||
}
|
||||
|
||||
public function addCaptionFormat(param1:CaptionFormat) : void
|
||||
{
|
||||
if(_formats == null)
|
||||
{
|
||||
_formats = new Vector.<CaptionFormat>();
|
||||
}
|
||||
_formats.push(param1);
|
||||
}
|
||||
|
||||
public function get numCaptionFormats() : int
|
||||
{
|
||||
var _loc1_:int = 0;
|
||||
if(_formats != null)
|
||||
{
|
||||
_loc1_ = int(_formats.length);
|
||||
}
|
||||
return _loc1_;
|
||||
}
|
||||
|
||||
public function getCaptionFormatAt(param1:int) : CaptionFormat
|
||||
{
|
||||
if(_formats == null || param1 >= _formats.length || param1 < 0)
|
||||
{
|
||||
throw new IllegalOperationError(OSMFStrings.getString("invalidParam"));
|
||||
}
|
||||
return _formats[param1];
|
||||
}
|
||||
|
||||
public function get text() : String
|
||||
{
|
||||
return _captionText;
|
||||
}
|
||||
|
||||
public function get clearText() : String
|
||||
{
|
||||
var _loc1_:String = "";
|
||||
if(_captionText != null && _captionText.length > 0)
|
||||
{
|
||||
_loc1_ = _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("CaptionStyle is required for CaptionFormat objects");
|
||||
}
|
||||
_startIndex = param2;
|
||||
_endIndex = param3;
|
||||
_style = param1;
|
||||
}
|
||||
|
||||
public function get startIndex() : int
|
||||
{
|
||||
return _startIndex;
|
||||
}
|
||||
|
||||
public function get endIndex() : int
|
||||
{
|
||||
return _endIndex;
|
||||
}
|
||||
|
||||
public function get style() : CaptionStyle
|
||||
{
|
||||
return _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();
|
||||
_id = param1;
|
||||
}
|
||||
|
||||
public function get id() : String
|
||||
{
|
||||
return _id;
|
||||
}
|
||||
|
||||
public function get backgroundColor() : Object
|
||||
{
|
||||
return _backgroundColor;
|
||||
}
|
||||
|
||||
public function set backgroundColor(param1:Object) : void
|
||||
{
|
||||
_backgroundColor = param1;
|
||||
}
|
||||
|
||||
public function get backgroundColorAlpha() : Object
|
||||
{
|
||||
return _backgroundColorAlpha;
|
||||
}
|
||||
|
||||
public function set backgroundColorAlpha(param1:Object) : void
|
||||
{
|
||||
_backgroundColorAlpha = param1;
|
||||
}
|
||||
|
||||
public function get textColor() : Object
|
||||
{
|
||||
return _textColor;
|
||||
}
|
||||
|
||||
public function set textColor(param1:Object) : void
|
||||
{
|
||||
_textColor = param1;
|
||||
}
|
||||
|
||||
public function get textColorAlpha() : Object
|
||||
{
|
||||
return _textColorAlpha;
|
||||
}
|
||||
|
||||
public function set textColorAlpha(param1:Object) : void
|
||||
{
|
||||
_textColorAlpha = param1;
|
||||
}
|
||||
|
||||
public function get fontFamily() : String
|
||||
{
|
||||
return _fontFamily;
|
||||
}
|
||||
|
||||
public function set fontFamily(param1:String) : void
|
||||
{
|
||||
_fontFamily = param1;
|
||||
}
|
||||
|
||||
public function get fontSize() : int
|
||||
{
|
||||
return _fontSize;
|
||||
}
|
||||
|
||||
public function set fontSize(param1:int) : void
|
||||
{
|
||||
_fontSize = param1;
|
||||
}
|
||||
|
||||
public function get fontStyle() : String
|
||||
{
|
||||
return _fontStyle;
|
||||
}
|
||||
|
||||
public function set fontStyle(param1:String) : void
|
||||
{
|
||||
_fontStyle = param1;
|
||||
}
|
||||
|
||||
public function get fontWeight() : String
|
||||
{
|
||||
return _fontWeight;
|
||||
}
|
||||
|
||||
public function set fontWeight(param1:String) : void
|
||||
{
|
||||
_fontWeight = param1;
|
||||
}
|
||||
|
||||
public function get textAlign() : String
|
||||
{
|
||||
return _textAlign;
|
||||
}
|
||||
|
||||
public function set textAlign(param1:String) : void
|
||||
{
|
||||
_textAlign = param1;
|
||||
}
|
||||
|
||||
public function get wrapOption() : Boolean
|
||||
{
|
||||
return _wrapOption;
|
||||
}
|
||||
|
||||
public function set wrapOption(param1:Boolean) : void
|
||||
{
|
||||
_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 _title;
|
||||
}
|
||||
|
||||
public function set title(param1:String) : void
|
||||
{
|
||||
_title = param1;
|
||||
}
|
||||
|
||||
public function get description() : String
|
||||
{
|
||||
return _desc;
|
||||
}
|
||||
|
||||
public function set description(param1:String) : void
|
||||
{
|
||||
_desc = param1;
|
||||
}
|
||||
|
||||
public function get copyright() : String
|
||||
{
|
||||
return _copyright;
|
||||
}
|
||||
|
||||
public function set copyright(param1:String) : void
|
||||
{
|
||||
_copyright = param1;
|
||||
}
|
||||
|
||||
public function addStyle(param1:CaptionStyle) : void
|
||||
{
|
||||
if(_styles == null)
|
||||
{
|
||||
_styles = new Vector.<CaptionStyle>();
|
||||
}
|
||||
_styles.push(param1);
|
||||
}
|
||||
|
||||
public function get numStyles() : int
|
||||
{
|
||||
var _loc1_:int = 0;
|
||||
if(_styles != null)
|
||||
{
|
||||
_loc1_ = int(_styles.length);
|
||||
}
|
||||
return _loc1_;
|
||||
}
|
||||
|
||||
public function getStyleAt(param1:int) : CaptionStyle
|
||||
{
|
||||
if(_styles == null || param1 >= _styles.length)
|
||||
{
|
||||
throw new IllegalOperationError(OSMFStrings.getString("invalidParam"));
|
||||
}
|
||||
return _styles[param1];
|
||||
}
|
||||
|
||||
public function addCaption(param1:Caption) : void
|
||||
{
|
||||
if(_captions == null)
|
||||
{
|
||||
_captions = new Vector.<Caption>();
|
||||
}
|
||||
_captions.push(param1);
|
||||
}
|
||||
|
||||
public function get numCaptions() : int
|
||||
{
|
||||
var _loc1_:int = 0;
|
||||
if(_captions != null)
|
||||
{
|
||||
_loc1_ = int(_captions.length);
|
||||
}
|
||||
return _loc1_;
|
||||
}
|
||||
|
||||
public function getCaptionAt(param1:int) : Caption
|
||||
{
|
||||
if(_captions == null || param1 >= _captions.length)
|
||||
{
|
||||
throw new IllegalOperationError(OSMFStrings.getString("invalidParam"));
|
||||
}
|
||||
return _captions[param1];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user