Commit 99ee1d66 authored by Anssi Piirainen's avatar Anssi Piirainen
Browse files

Chang default Timed Text XML namespace to be http://www.w3.org/ns/ttml This...

Chang default Timed Text XML namespace to be http://www.w3.org/ns/ttml  This can be overridden using a clip specific property 'ttNamespace'. The namespace of the old spec was http://www.w3.org/2006/10/ttaf1 Issue #35
parent fdb48ae3
......@@ -3,6 +3,9 @@ Version history:
3.2.10
------
- Added external methods showButton() and hideButton() that can be used for the CC button.
- Changed default Timed Text XML namespace to be http://www.w3.org/ns/ttml This can be overridden using a clip
specific property 'ttNamespace'. The namespace of the old spec was http://www.w3.org/2006/10/ttaf1 Issue #35
3.2.9
-----
......
......@@ -167,8 +167,7 @@ package org.flowplayer.captions {
parser = new JSONParser(_config.template);
} else if (parserType == "tt") {
parser = new TTXTParser(_config.template);
TTXTParser(parser).simpleFormatting = _config.simpleFormatting;
parser = new TTXTParser(_config.template, clip.getCustomProperty("ttNamespace") as String || "http://www.w3.org/ns/ttml", _config.simpleFormatting);
} else {
throw new Error("Unrecognized captions file extension");
......
......@@ -83,8 +83,7 @@ package org.flowplayer.captions
delete defaults[prop1];
}
}
}
}
}
......
......@@ -14,25 +14,21 @@ package org.flowplayer.captions.parsers {
import org.flowplayer.view.FlowStyleSheet;
public class TTXTParser extends AbstractCaptionParser {
private var _tt:Namespace = new Namespace("http://www.w3.org/2006/10/ttaf1");
private var _bodyStyle:String;
private var _simpleFormatting:Boolean = false;
private var _cueRow:int = 0;
internal static const SIMPLE_FORMATTING_PROPS:Array = ["fontStyle", "fontWeight", "textAlign"];
protected var log:Log = new Log(this);
private var _namespace:Namespace;
public function TTXTParser(textTemplate:String) {
public function TTXTParser(textTemplate:String, xmlNamespace:String, simpleFormatting:Boolean) {
super(textTemplate);
default xml namespace = _tt;
}
public function get simpleFormatting():Boolean {
return _simpleFormatting;
}
_namespace = new Namespace(xmlNamespace);
default xml namespace = _namespace;
public function set simpleFormatting(simpleFormatting:Boolean):void {
log.debug("using namespace " + xmlNamespace);
_simpleFormatting = simpleFormatting;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment