<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Die Welt ist gar nicht so. &#187; alternativlos</title>
	<atom:link href="http://blog.dieweltistgarnichtso.net/tag/alternativlos/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.dieweltistgarnichtso.net</link>
	<description>Sie ist ganz anders.</description>
	<lastBuildDate>Mon, 23 Sep 2013 15:41:20 +0000</lastBuildDate>
	<language>de-DE</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.0.35</generator>
	<item>
		<title>Ogg Opus richtig verwenden im HTML-Audio-Element</title>
		<link>http://blog.dieweltistgarnichtso.net/ogg-opus-richtig-verwenden-im-html-audio-element</link>
		<comments>http://blog.dieweltistgarnichtso.net/ogg-opus-richtig-verwenden-im-html-audio-element#comments</comments>
		<pubDate>Sun, 07 Oct 2012 19:09:19 +0000</pubDate>
		<dc:creator><![CDATA[erlehmann]]></dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[alternativlos]]></category>
		<category><![CDATA[fefe]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[ogg]]></category>
		<category><![CDATA[opus]]></category>
		<category><![CDATA[vorbis]]></category>

		<guid isPermaLink="false">http://blog.dieweltistgarnichtso.net/?p=5473</guid>
		<description><![CDATA[Lacher des Tages: Den Podcast Alternativlos gibt es jetzt auch im Audioformat Opus und Fefe erzählt dazu Folgendes: Die Browser-Integration funktioniert im Moment nur in Firefox 15 und neuer, und die Selektion innerhalb des Audio-Tags funktioniert nicht, und außerdem haben &#8230; <a href="http://blog.dieweltistgarnichtso.net/ogg-opus-richtig-verwenden-im-html-audio-element">Weiterlesen <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>
Lacher des Tages: Den Podcast <a href="http://www.alternativlos.org/"><i>Alternativlos</i></a> gibt es jetzt auch im Audioformat <a href="http://de.wikipedia.org/wiki/Opus_(Audioformat)"><i>Opus</i></a> und <a href="http://blog.fefe.de/?ts=ae8e92f9"><i>Fefe</i> erzählt dazu Folgendes</a>:
</p>
<blockquote cite="http://blog.fefe.de/?ts=ae8e92f9">
<p>
Die Browser-Integration funktioniert im Moment nur in Firefox 15 und neuer, und die Selektion innerhalb des Audio-Tags funktioniert nicht, und außerdem haben auch noch Ogg Vorbis und Ogg Opus den gleichen MIME-Type, daher sah ich mich gezwungen, eine stinkende Javascript-Browserweiche für Firefox 15 einzubauen.
</p>
</blockquote>
<p>
Da hat wohl jemand <del>das Memo</del> <ins>die Doku</ins> nicht gelesen! <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#attr-source-type">Laut <abbr title="Hypertext Markup Language">HTML</abbr>-Standard</a> und <a href="http://tools.ietf.org/html/rfc4281"><abbr title="Request For Comments">RFC</abbr> 4281</a> kann man hier nämlich durchaus unterscheiden – in diesem Fall gehört ins <code>type</code>-Attribut der <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#the-source-element"><code>&lt;source&gt;</code>-Elemente</a> <code>audio/ogg; codecs=vorbis</code> (<a href="http://tools.ietf.org/html/rfc5334#page-4"><abbr title="Request For Comments">RFC</abbr> 5334</a>) oder <code>audio/ogg; codecs=opus</code> (<a href="http://tools.ietf.org/html/draft-terriberry-oggopus-01#section-8"><i>Opus</i>-<abbr title="Internet Engineering Task Force">IETF</abbr>-Draft</a>). <strong><a href="http://daten.dieweltistgarnichtso.net/src/audio-element-test/">Hier ist die Demo.</a></strong>
</p>
<span id="more-5473"></span>
<ins datetime="2012-10-08T09:39:39+00:00">
<p>
Nur fürs Protokoll, so geht das:
</p>
<code>&lt;audio&gt;
    &lt;source src=opus.opus type="audio/ogg; codecs=opus"&gt;
    &lt;source src=vorbis.oga type="audio/ogg; codecs=vorbis"&gt;
    &lt;source src=mp3.mp3 type="audio/mpeg"&gt;
&lt;/audio&gt;
</code>
</ins>
<p>
Bei <a href="http://alternativlos.org/27/"><i>Alternativlos</i> 27</a> sieht das übrigens so aus:
</p>
<blockquote cite="http://alternativlos.org/27/">
<code>&lt;script&gt;
var codec="ogg"
if (/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent) &#038;&#038; RegExp.$1&gt;=15)
  codec="opus"
&lt;/script&gt;

&lt;audio controls preload=none style="padding-top:70px"&gt;
&lt;script&gt;
  document.write('&lt;source src="http://alternativlos.cdn.as250.net/alternativlos-27.',codec,'" type="audio/ogg"&gt;')
&lt;/script&gt;
&lt;noscript&gt;
  &lt;source src="http://alternativlos.cdn.as250.net/alternativlos-27.ogg" type="audio/ogg"&gt;
&lt;/noscript&gt;
  &lt;source src="http://alternativlos.cdn.as250.net/alternativlos-27.mp3" type="audio/mp3"&gt;
  [Browser zu antik]
&lt;/audio&gt;</code>
</blockquote>
<ins datetime="2012-10-08T09:39:39+00:00">
<p>
Warum das schlecht ist, liegt vor Allem an der <a href="http://de.wikipedia.org/wiki/Browserweiche">Browserweiche</a>: <i>Firefox</i> 15 ist nicht der einzige Browser mit <i>Opus</i>-Unterstützung, <a href="http://tech.velmont.net/supporting-audio-codec-opus-in-opera-12/"><i>Opera</i> 12 kann das auch</a>; wegen <a href="http://zipmeme.com/meme/86317/">solcher Fälle</a> sollte man Daten <a href="http://www.teialehrbuch.de/Kostenlose-Kurse/HTML/3262-Deklaratives-Markup.html">deklarativ</a> abliefern. Nebenbei: Für die Ermittlung unterstützter Formate existiert <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#dom-navigator-canplaytype"><code>canPlayType()</code></a>.
</p>
</ins>
<p>
Mit den <a href="http://en.wikiquote.org/wiki/Jamie_Zawinski#Attributed">Worten von <i>Jamie Zawinski</i></a>:
</p>
<blockquote cite="http://en.wikiquote.org/wiki/Jamie_Zawinski#Attributed">
<p>
Some people, when confronted with a problem, think &#8220;I know, I&#8217;ll use regular expressions.&#8221; Now they have two problems. 
</p>
</blockquote>]]></content:encoded>
			<wfw:commentRss>http://blog.dieweltistgarnichtso.net/ogg-opus-richtig-verwenden-im-html-audio-element/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
<enclosure url="http://alternativlos.cdn.as250.net/alternativlos-27.ogg" length="59730046" type="audio/ogg" />
<enclosure url="http://alternativlos.cdn.as250.net/alternativlos-27.mp3" length="112305435" type="audio/mpeg" />
		</item>
	</channel>
</rss>
