Table Of Contents

Previous topic

5.3. SocketEngine

Next topic

5.5. ButtonWidget

This Page

Section author: jo

5.4. AudioEngine

Section author: jo

Note

unvollständig

Audio-Engine: Grundidee ist, sich an der HTML5-Spezifikation zu orientieren http://dev.w3.org/html5/spec/Overview.html#audio

Noch mal nachdenken über AudioWidget: das controls-Attribut ist schon cool...

Achtung: Das ist obsolet. AudioEngine evtl. nur noch, um Eventsounds abzuspielen.

Engine allgemein

Während Widgets in einer Presentation stets als sichtbare Elemente auftauchen, sind Engines unsichtbare Funktionselemente der Presentation.

Sie werden im MAD-XML-Code an beliebiger Stelle definiert und können dann - wie Widgets - als Routingziele, für Lookups etc. verwendet werden. Engines werden - ebenfalls analog zu Widgets - mit Properties konfiguriert.

Es ist nicht erlaubt, innerhalb eines <engine>-Tags Widgets zu definieren.

AudioEngine jetzt aber

Erlaubt das Abspielen von Audio-Dateien und -Streams.

Unterstützte Formate:

  • MP3-Dateien über (HTTP- oder File-) URLs (audio/mpeg)
  • MP3-Livestreams über HTTP-URLs (audio/mpeg)
  • PLS-Dateien über (HTTP- oder File-) URLs, die MP3-Dateien oder -Livestreams referenzieren
<engine name="MyAudioPlayer" type="Audio">
        <property name="Source" value="[lazy http://www.domain.com/einfile.mp3]" />
        <property name="AutoPlay" value="false" />
        <property name="Loop" value="0" />
        <property name="Control" value="pause" />
</engine>

5.4.1. Properties

Source –analog HTML5 (src); HTML5 has multiple sources: <source> as child of <audio>

AutoPlay –analog HTML5

Loop –analog HTML5

Control

AutoBuffer – defaults to true <–> conflicts with Source Syntax ?!

CurrentTime –analog HTML5/JS

5.4.2. Signale

audio-loadstart oder media-

audio-load

audio-start

audio-pause

audio-end

audio-frame

5.4.3. Methoden

getFrame()

getTimecode()

?getBufferSize()

?setTime()

?setFrame()

?setTimeCode()

canPlayType() -- analog HTML5

5.4.4. JavaScript

MyAudioPlayer.Control = "play";