使用 Timed Text 字幕FLVPlaybackCaptioning 组件通过下载 Timed Text (TT) XML 文件来为关联的 FLVPlayback 组件实现字幕显示功能。有关 Timed Text 格式的详细信息,请查看 www.w3.org. 上的 AudioVideo Timed Text 信息。 本节简要介绍了受支持的 Timed Text 标签和必需的字幕文件标签,并且提供了一个 Timed Text XML 文件范例。有关所有受支持 Timed Text 标签的详细信息,请参阅 Timed Text 标签。 FLVPlaybackCaptioning 组件支持以下 Timed Text 标签:
FLVPlaybackCaptioning 组件与 FLV 文件的时间代码相匹配。每个字幕必须有一个 begin 属性,以确定字幕应该在什么时间显示。如果字幕没有 dur 或 end 属性,则显示下一个字幕或 FLV 文件结束时该字幕将消失。 以下是一个 Timed Text XML 文件的示例。该文件 (caption_video.xml) 为 caption_video.flv 文件提供字幕。可从以下位置访问上述文件:www.helpexamples.com/flash/video/caption_video.flv 和 www.helpexamples.com/flash/video/caption_video.xml。 <?xml version="1.0" encoding="UTF-8"?> <tt xml:lang="en" xmlns="http://www.w3.org/2006/04/ttaf1"xmlns:tts="http://www.w3.org/2006/04/ttaf1#styling"> <head> <styling> <style id="1" tts:textAlign="right"/> <style id="2" tts:color="transparent"/> <style id="3" style="2" tts:backgroundColor="white"/> <style id="4" style="2 3" tts:fontSize="20"/> </styling> </head> <body> <div xml:lang="en"> <p begin="00:00:00.00" dur="00:00:03.07">I had just joined <span tts:fontFamily="monospaceSansSerif,proportionalSerif,TheOther"tts:fontSize="+2">Macromedia</span> in 1996,</p> <p begin="00:00:03.07" dur="00:00:03.35">and we were trying to figure out what to do about the internet.</p> <p begin="00:00:06.42" dur="00:00:03.15">And the company was in dire straights at the time.</p> <p begin="00:00:09.57" dur="00:00:01.45">We were a CD-ROM authoring company,</p> <p begin="00:00:11.42" dur="00:00:02.00">and the CD-ROM business was going away.</p> <p begin="00:00:13.57" dur="00:00:02.50">One of the technologies I remember seeing was Flash.</p> <p begin="00:00:16.47" dur="00:00:02.00">At the time, it was called <span tts:fontWeight="bold" tts:color="#ccc333">FutureSplash</span>.</p> <p begin="00:00:18.50" dur="00:00:01.20">So this is where Flash got its start.</p> <p begin="00:00:20.10" dur="00:00:03.00">This is smart sketch running on the <span tts:fontStyle="italic">EU-pin computer</span>,</p> <p begin="00:00:23.52" dur="00:00:02.00">which was the first product that FutureWave did.</p> <p begin="00:00:25.52" dur="00:00:02.00">So our vision for this product was to</p> <p begin="00:00:27.52" dur="00:00:01.10">make drawing on the computer</p> <p begin="00:00:29.02" dur="00:00:01.30" style="1">as <span tts:color="#ccc333">easy</span> as drawing on paper.</p> </div> </body> </tt> Timed Text 标签FLVPlaybackCaptioning 组件支持用于字幕 XML 文件的 Timed Text 标签。有关音频视频 Timed Text 标签的详细信息,请查看 www.w3.org 上的信息。下表列出了支持和不支持的标签。
|
![]() |