1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 """Translates into an HTML5 C{<audio>} element."""
17
18 from muntjac.ui.abstract_media import AbstractMedia
19
20
21 -class Audio(AbstractMedia):
22 """The Audio component translates into an HTML5 C{<audio>} element and as
23 such is only supported in browsers that support HTML5 media markup.
24 Browsers that do not support HTML5 display the text or HTML set by calling
25 L{setAltText}.
26
27 A flash-player fallback can be implemented by setting HTML content allowed
28 (L{setHtmlContentAllowed} and calling L{setAltText} with the flash player
29 markup. An example of flash fallback can be found at the <a href=
30 "https://developer.mozilla.org/En/Using_audio_and_video_in_Firefox#Using_Flash"
31 >Mozilla Developer Network</a>.
32
33 Multiple sources can be specified. Which of the sources is used is selected
34 by the browser depending on which file formats it supports. See <a
35 href="http://en.wikipedia.org/wiki/HTML5_video#Table">wikipedia</a> for a
36 table of formats supported by different browsers.
37
38 @author: Vaadin Ltd
39 @author: Richard Lincoln
40 """
41
42 CLIENT_WIDGET = None
43
44 - def __init__(self, caption='', source=None):
53