summaryrefslogtreecommitdiff
path: root/doc/context/sources/general/manuals/start/en/sounds-001.tex
blob: 7d1428113a91140ffbee3ccfc5537d8559afc113 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
\definerenderingwindow
  [example]
  [width=0pt,height=0pt,frame=off]

\setupinteraction[state=start]

\useexternalrendering
  [mysound]
  [audio/mpeg] % audio/x-mp3
  [akkerman.mp3]
  []

\definereference [StartSoundTrack] [StartRendering{mysound}]
\definereference [StopSoundTrack]  [StopRendering{mysound}]

\definelayer[resources][width=\paperwidth,height=\paperheight]

\setupbackgrounds[page][background=resources]

\starttext

    \setlayer[resources]{\placerenderingwindow[example][mysound]} % once

    \startTEXpage
        \button{start}[StartSoundTrack]
        \button{stop}[StopSoundTrack]
    \stopTEXpage

    \startTEXpage
        \button{start}[StartSoundTrack]
        \button{stop}[StopSoundTrack]
    \stopTEXpage

\stoptext