如何玩EPUB Media Overlays 3.0

时间:2012-11-01 14:15:11

标签: overlay media smil

媒体覆盖的所有教程中是否缺少这些内容还是我错过了?

要制作MediaOverlay,所有教程都说我们应该:

    xhtml中的
  1. 包含texte;

    <header><h1><span class="audio" id="c001s0000">Chapter 1. Loomings.</span></h1></header>
    <p>
    <span class="audio" id="c001s0001">Call me Ishmael.</span> 
    <span class="audio" id="c001s0002">Some years ago—never mind how long precisely—having little or no money in my purse, and nothing particular to interest me on shore, I thought I would sail about a little and see the watery part of the world.</span> 
    

    ...

  2. 关联的.smil
  3. ;

    <seq id="id1" epub:textref="chapter_001.xhtml" epub:type="bodymatter chapter">
    <par id="sentence0">
        <text src="chapter_001.xhtml#c001s0000"/>
        <audio src="audio/mobydick_001_002_melville.mp4" clipBegin="0:00:21" clipEnd="0:00:28"/>
    </par>
    <par id="sentence1">
        <text src="chapter_001.xhtml#c001s0001"/>
        <audio src="audio/mobydick_001_002_melville.mp4" clipBegin="0:00:28" clipEnd="0:00:30"/>
    </par>
    <par id="sentence2">
           <text src="chapter_001.xhtml#c001s0002"/>
        <audio src="audio/mobydick_001_002_melville.mp4" clipBegin="0:00:30" clipEnd="0:00:44"/>
    </par>
    
  4. 音频(.mp4)保存在应有的位置。 (音频/ mobydick_001_002_melville.mp4)

  5. 4 / .xhtml和.smil之间的关联在opf文件中完成,部分:

    <item id="xchapter_001" href="chapter_001.xhtml" media-type="application/xhtml+xml" media-overlay="chapter_001_overlay"/>
    <item id="chapter_001_overlay" href="chapter_001_overlay.smil" media-type="application/smil+xml"/>
    <item id="xchapter_002" href="chapter_002.xhtml" media-type="application/xhtml+xml" media-overlay="chapter_002_overlay"/>
    <item id="chapter_002_overlay" href="chapter_002_overlay.smil" media-type="application/smil+xml"/>
    
    好的,我们完成了所有这些,但问题是如何播放媒体叠加?如何启动音频文件并突出显示文本?这个按钮“开始阅读”iBooks应用程序的作用是什么? enter image description here

2 个答案:

答案 0 :(得分:0)

这是一个非常迟到的回复,但其他人要知道,&#34;开始阅读&#34;按钮将从smil文件中按顺序获取项目并处理它们。因此,第一个动作是从0:00:21开始播放音频文件并突出显示&#34;叫我Ishmael&#34;来自文本。

答案 1 :(得分:-1)

请在你的css(样式表)中添加一个样式:


    .-epub-media-overlay-active {
        color: #dc4c37;
    }