quikava04 / flowplayer-plugins

Automatically exported from code.google.com/p/flowplayer-plugins
0 stars 0 forks source link

Enhancement Suggestion: FlowPlayer Caption Support for SAMI file format #1

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I needed flowplayer to support the SMI captioning format... IE:

<SAMI>
  <head>...</head>
  <body>
     <sync start="0">
        <p class="ENCC">[phone rings]</p>
     </sync>
     <sync start="7541">
        <p class="ENCC">(Roy)<br />Hello, <br/> Roy Speaking.</p>
     </sync>
  </body>
</SAMI>

To address this I added
src/actionscript/org/flowplayer/captions/parsers/SMIParser.as

I also modified Caption.as function parseCuePoints...
else if (captionData && captionFile.substr(-3) == CaptionFileTypes.SAMI) 
{
  var smi:SMIParser = new SMIParser();
  smi.simpleFormatting = _config.simpleFormatting;
  smi.styles = _styles;
  clip.addCuepoints(smi.parse(XML(captionData)));
}

I modified CaptionFileTypes.as
  public static var SAMI:String = "smi";

I added the following function to NumberFormatter.as

public static function round(str:String, timeMultiplier:Number=1000): Number
{
   return Math.round(Number(str) * timeMultiplier /100) * 100;
}

Original issue reported on code.google.com by schmi...@gmail.com on 1 Apr 2009 at 4:04

Attachments:

GoogleCodeExporter commented 8 years ago
http://code.google.com/p/flowplayer-core/issues/detail?id=433 please see here, 
will close this. 

Original comment by dani...@electroteque.org on 29 Nov 2011 at 12:08