MOPar¶
A Media Overlay <par> element.
Besides its own attributes, it should have
either a <text> (yael.motext.MOText
) child,
or
both a <text> (yael.motext.MOText
)
and an <audio> (yael.moaudio.MOAudio
) children.
-
class
yael.mopar.
MOPar
(internal_path=None, obj=None, string=None)[source]¶ Build a Media Overlay <par> element or parse it from obj or string.
-
add_child
(child)[source]¶ Add the given child to this <par>.
Parameters: child ( yael.moaudio.MOAudio
oryael.motext.MOText
) – the <text> or <audio> child to be added
-
children
¶ The children elements of this <par>.
Note: this is implemented as a list (instead of two instance variables, one for <audio> and one for <text>) to accommodate a bright future when the spec will allow multiple children elements, e.g. several <text> for each <audio>.
Return type: list of yael.moaudio.MOAudio
andyael.motext.MOText
-
has_audio_child
¶ True if this <par> has an <audio> child.
Return type: bool
-
v_epub_type
¶ The value of the epub:type attribute.
Return type: str
-
v_id
¶ The value of the id attribute.
Return type: str
-