<?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>Softcore software development &#187; html5</title>
	<atom:link href="http://tea.cesaroliveira.net/archives/tag/html5/feed" rel="self" type="application/rss+xml" />
	<link>http://tea.cesaroliveira.net</link>
	<description>It&#039;s all about the cycles</description>
	<lastBuildDate>Tue, 24 Jan 2012 04:31:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Beatport and Beatport5</title>
		<link>http://tea.cesaroliveira.net/archives/301</link>
		<comments>http://tea.cesaroliveira.net/archives/301#comments</comments>
		<pubDate>Mon, 22 Aug 2011 04:10:15 +0000</pubDate>
		<dc:creator>Cesar</dc:creator>
				<category><![CDATA[beatport5]]></category>
		<category><![CDATA[beatport]]></category>
		<category><![CDATA[html5]]></category>

		<guid isPermaLink="false">http://tea.cesaroliveira.net/?p=301</guid>
		<description><![CDATA[Beatport has recently unveiled their HTML version of their website. They then proceeded to launch a quasi job recruitment video explaining the benefits of the new website. Some of the points are valid (the site load time has really improved), but other points are really stretched or moot or misleading. For example they made a [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://beatport.com/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/beatport.com/?referer=');">Beatport</a> has <a href="https://twitter.com/#!/beatport/status/91603983810039808" onclick="pageTracker._trackPageview('/outgoing/twitter.com/_/beatport/status/91603983810039808?referer=');">recently</a> unveiled their HTML version of their website. They then proceeded to launch a <a href="http://www.youtube.com/watch?v=dNVjf8nOtMM" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.youtube.com/watch?v=dNVjf8nOtMM&amp;referer=');">quasi job recruitment video explaining the benefits of the new website</a>. Some of the points are valid (the site load time has really improved), but other points are really stretched or moot or misleading. For example they made a point of the new website containing the <acronym title="Beats per Minute">BPM</acronym> of a track. That&#8217;s just silly because their <a href="http://api.beatport.com/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/api.beatport.com/?referer=');">API</a> has that information, so there is no technical reason why they cannot have it on their flash website. Interestingly, the BPM only appears on the JSON version of the API and not the XML version and that&#8217;s just terrible. I expected more from people sporting impressive facial hair.</p>
<p>Overall I do like their new website. It is fast, clean, <a href="https://twitter.com/#!/Quextal/status/91867897806327809" target="_blank" onclick="pageTracker._trackPageview('/outgoing/twitter.com/_/Quextal/status/91867897806327809?referer=');">hackable</a>. I thought they were using the audio tag and doing some neat stuff to get the <a href="http://en.wikipedia.org/wiki/Waveform" target="_blank" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Waveform?referer=');">waveform</a> but it turned out that was an image and they are still using flash. Which is probably the wisest thing to do but not very HTML5ish <img src='http://tea.cesaroliveira.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Having a HTML version of the website was also something I thought would be an interesting project (back when they only had a flash-only site). A few weeks ago, I decided to do one anyways, and launched <a href="http://beatport5.cesaroliveira.net/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/beatport5.cesaroliveira.net/?referer=');">beatport5</a> &#8211; a HTML5 version of the website (I may end up renaming it). It has a few caveats:</p>
<ul>
<li>It&#8217;s pretty much not optimized for screens with a resolution under 1920&#215;1080 oops</li>
<li>It works best in Gecko browsers, needs improvement for webkit, and pretty terrible under trident browsers. Don&#8217;t even ask about anything under IE8</li>
<li>The playlist is not working yet</li>
<li>The search functionality is very simple. You can search for tracks, releases, artists or a global search. But you are not able to search for x track by y artist.</li>
<li>The landing page needs improvements</li>
<li>I am not working on this full-time</li>
</ul>
<p>Some interesting stuff:</p>
<ul>
<li>We both use DOM local storage. They seems to use it for their playlist queue. Neat!</li>
</ul>
<p>Some wishlist that I need to put on their mailing list:</p>
<ol>
<li>I would like to avoid hitting my server, so it would be great if their website enabled <a href="https://developer.mozilla.org/En/HTTP_access_control" target="_blank" onclick="pageTracker._trackPageview('/outgoing/developer.mozilla.org/En/HTTP_access_control?referer=');">HTTP access controls</a> for their API and mp3 files</li>
<li>Maybe a way to add stuff to their shopping cart?</li>
<li>There&#8217;s more but I&#8217;m drawing a blank&#8230;</li>
</ol>
<p>I haven&#8217;t really worked in what value I would add that isn&#8217;t already in the beatport site. I would like to incorporate the <a href="http://tea.cesaroliveira.net/archives/256">beatport flac converter</a> somehow. Likely anything meaningful I want to do would have to stored on my server. One experiment I would like to attempt is a way to discover music, much like the beatbot, but maybe less like it, and more awesome.</p>
<p>Why release this now? Release early, release often! It&#8217;s not complete, but I hope to spend time on it and be useful to me and others as well. My main concern right now is making this work cross-browser. Next is screen resolution fix, and an appropriate landing page.</p>
]]></content:encoded>
			<wfw:commentRss>http://tea.cesaroliveira.net/archives/301/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Uncovering the underlying metadata</title>
		<link>http://tea.cesaroliveira.net/archives/54</link>
		<comments>http://tea.cesaroliveira.net/archives/54#comments</comments>
		<pubDate>Thu, 22 Jan 2009 18:28:43 +0000</pubDate>
		<dc:creator>Cesar</dc:creator>
				<category><![CDATA[hugs]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[extension]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[seneca]]></category>
		<category><![CDATA[sleep]]></category>

		<guid isPermaLink="false">http://www.cesaroliveira.net/?p=53</guid>
		<description><![CDATA[A few weeks ago, I wanted to do some C++ Mozilla coding to make sure I wasn&#8217;t going soft. But I didn&#8217;t really know what to do. I left it for a bit until I found something weird about the HTML5 spec &#8211; there was a method of testing whether metadata has been loaded, but [...]]]></description>
			<content:encoded><![CDATA[<p>A few weeks ago, I wanted to do some C++ Mozilla coding to make sure I wasn&#8217;t going soft. But I didn&#8217;t really know what to do. I left it for a bit until I found something <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#dom-media-have_metadata" onclick="pageTracker._trackPageview('/outgoing/www.whatwg.org/specs/web-apps/current-work/multipage/video.html_dom-media-have_metadata?referer=');">weird about the HTML5 spec</a> &#8211; there was a method of testing whether metadata has been loaded, but no way to expose the metadata (eg. song title, artist, album, etc) to the user such as through page info.</p>
<p>I think this will be useful. As media starts being embedded into the web browser, it would make sense to start exposing this to the user. I know there have been a few instances where I was listening to something on the radio, but there was little hint of what the song was called (I usually tried to remember a few lyrics and did a Google search. Mixed success).</p>
<p>I brought this up in the whatwg irc channel, and apparently this is being considered for the next version of the spec. Which is understandable, because the server can always display the metadata. But often, media may not be central to the website. For example, background music.</p>
<p>I started look at the Audio/Video backend stuff that moz uses. It got confusing real quick (it doesn&#8217;t help that the <a href="http://mxr.mozilla.org/mozilla-central/source/content/html/content/src/nsHTMLAudioElement.cpp" onclick="pageTracker._trackPageview('/outgoing/mxr.mozilla.org/mozilla-central/source/content/html/content/src/nsHTMLAudioElement.cpp?referer=');">audio code</a> itself is completely empty). Plus I was in a hurry. So I decided to implement it as an extension.</p>
<p>It was a lovely experience. I had a few problems, including finding out that audio/video wasn&#8217;t actually being saved to the cache (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=469446" onclick="pageTracker._trackPageview('/outgoing/bugzilla.mozilla.org/show_bug.cgi?id=469446&amp;referer=');">bug 469446</a>). It was checked-in like 2 days after I found it out. Also, I hate string very much. The string guide helped, but it is still awful. And I made firefox crash a few times because I&#8217;m a nsCOMPtr n00b.</p>
<p>Right now, this extension is working only with ogg vorbis files. Which is stupid because &lt;audio /&gt; is rarely used anywhere, and if it is used, only with certain conditions (wikimedia commons uses the audio tag, but not really. Apparently, the video/audio tags start automatically downloading the media even if it isn&#8217;t under autoplay. This is a mess if you have dozens of audio tags in one page. <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=464272" onclick="pageTracker._trackPageview('/outgoing/bugzilla.mozilla.org/show_bug.cgi?id=464272&amp;referer=');">bug 464272</a>). It is so rarely used, that I had to create a <a href="/files/2009-01-22/audio">audio demo page</a> for testing purposes.</p>
<p>Using it is very simple. Right-clicking on a audio tag brings up the context menu. I decided to use the context menu over Page Info because the media tab of the Page info dialog is very much geared towards images, and that code has to be changed in the firefox source (it&#8217;s not easy/pretty to overlay).</p>
<div style="text-align:center;"><img src="/files/2009-01-22/context.png" alt="audio context menu"/></div>
<p>Which brings up the audio&#8217;s metadata</p>
<div style="text-align:center"><img src="/files/2009-01-22/properties.png" alt="audio properties"/></div>
<p>While a lot of metadata is displayed, some isn&#8217;t. For example, iTunes has support for cover art as a COVERART header. While you can put that in vorbis, it should be noted that it isn&#8217;t <a href="http://wiki.xiph.org/index.php/VorbisComment#Unofficial_.22COVERART.22_field" onclick="pageTracker._trackPageview('/outgoing/wiki.xiph.org/index.php/VorbisComment_Unofficial_.22COVERART.22_field?referer=');">widely supported</a>. So I decided to put in only the <a href="http://www.xiph.org/vorbis/doc/v-comment.html" onclick="pageTracker._trackPageview('/outgoing/www.xiph.org/vorbis/doc/v-comment.html?referer=');">standard headers</a> for now.</p>
<p>This is dealing with C++ code. Which is much more dangerous than javascript code because NS_ERROR_OMGWTF doesn&#8217;t appear in your error console when I try to free an uninitialized pointer. I made basic checks so hopefully nothing bad will happen. But I didn&#8217;t do extensive checking in case we have a bad ogg file or something.</p>
<p>Well, to be fair to me, I always save the function&#8217;s return value. I just didn&#8217;t check whether it passed nor did anything about it. And this won&#8217;t just crash at any time. It&#8217;ll crash if you try to load the metadata (I&#8217;m very nice like that).</p>
<p>The name of the <a href="https://addons.mozilla.org/en-US/firefox/addon/10465" onclick="pageTracker._trackPageview('/outgoing/addons.mozilla.org/en-US/firefox/addon/10465?referer=');">extension is saraswati</a>, named after the <a href="http://en.wikipedia.org/wiki/Saraswati" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Saraswati?referer=');">hindu God of music and knowledge</a> (really, a Google search helped out a lot here). Please enjoy! (Linux x86, x86-64 and Windows x86 only right now)</p>
]]></content:encoded>
			<wfw:commentRss>http://tea.cesaroliveira.net/archives/54/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Now for something completely different</title>
		<link>http://tea.cesaroliveira.net/archives/42</link>
		<comments>http://tea.cesaroliveira.net/archives/42#comments</comments>
		<pubDate>Fri, 31 Oct 2008 05:41:31 +0000</pubDate>
		<dc:creator>Cesar</dc:creator>
				<category><![CDATA[hugs]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[ria]]></category>

		<guid isPermaLink="false">http://www.cesaroliveira.net/?p=42</guid>
		<description><![CDATA[This post is a mashup of a few things I have been tinkering with over the last week that I think is fun to share. So if it seems I have been unfocused or whatever, this is pretty much why. The first project I started doing for fun was working on canvas. This was different [...]]]></description>
			<content:encoded><![CDATA[<p>This post is a mashup of a few things I have been tinkering with over the last week that I think is fun to share. So if it seems I have been unfocused or whatever, this is pretty much why.</p>
<p>The first project I started doing for fun was working on canvas. This was different then some canvas stuff I have done <a href="http://www.cesaroliveira.net/tea/archives/37" onclick="pageTracker._trackPageview('/outgoing/www.cesaroliveira.net/tea/archives/37?referer=');">in the past</a>, The interesting people at <a href="http://www.nihilogic.dk/" onclick="pageTracker._trackPageview('/outgoing/www.nihilogic.dk/?referer=');">nihilogic</a> did a <a href="http://www.nihilogic.dk/labs/imagefx/" onclick="pageTracker._trackPageview('/outgoing/www.nihilogic.dk/labs/imagefx/?referer=');">sepia filter</a> using canvas. I wondered if it was possible to do filter so you can see an image with a red-green colour blindness. After some substandard research, I finally managed to do it. Though the quality is poor because it tends to be inaccurate. YMMV.</p>
<p>I wondered if you can do something like this for an entire webpage. So I moved the Javascript to an extension so I can use canvas&#8217; drawWindow() method and take a picture of the entire website. Though I noticed that doing this on large image was computationally expensive and locking up the UI for an unreasonable amount of time.</p>
<p>I then tried to move all the calculations out of the main thread into a <a href="http://www.whatwg.org/specs/web-workers/current-work/" onclick="pageTracker._trackPageview('/outgoing/www.whatwg.org/specs/web-workers/current-work/?referer=');">DOM worker thread</a>. It was an interesting experience. I noticed though that while the main thread (and therefore, the UI) did not lock up, it was still sluggish and impractical to use. So I decided not to develop the extension further.</p>
<p><img src="/files/2008-10-29/firefox-transfer.png" alt="Image under Deuteranopia colour-blindness" /><br />
You can see the full demo <a href="http://www.cesaroliveira.net/samples/blindness/" onclick="pageTracker._trackPageview('/outgoing/www.cesaroliveira.net/samples/blindness/?referer=');">here</a>.</p>
<p>I then thought about what this would look like on other browsers. I didn&#8217;t expect anything requiring DOM worker threads to work on Safari/Opera. And sure enough, it didn&#8217;t. But I found out that DOM worker threads was based off of <a href="http://code.google.com/apis/gears/api_summary.html" onclick="pageTracker._trackPageview('/outgoing/code.google.com/apis/gears/api_summary.html?referer=');">Google gears</a>! So I looked into that and made a separate webpage that uses gears. Unfortunately, I found out that my efforts were largely wasted, as it only increased support to Firefox 2 and Mac Safari (Gears isn&#8217;t compatible with Windows Safari or Opera, and IE doesn&#8217;t have canvas support).</p>
<p>Either way, I made the Gears version available <a href="http://www.cesaroliveira.net/samples/blindness-gears/" onclick="pageTracker._trackPageview('/outgoing/www.cesaroliveira.net/samples/blindness-gears/?referer=');">here</a>.</p>
<p>Going away from canvas, I spent most of another day working on <a href="http://code.google.com/apis/maps/documentation/introduction.html" onclick="pageTracker._trackPageview('/outgoing/code.google.com/apis/maps/documentation/introduction.html?referer=');">Google Maps API</a>. The problem I was trying to solve was to see if I can highlight a 1 square kilometre radius from a pinpoint. This was difficult, as points on a map had a latitude, longitude co-ordinate, and I had to blindly figure out how much to reposition for a half-kilometre. Finding the distance between two points was also helpful, but hard getting a <a href="http://www.movable-type.co.uk/scripts/latlong.html" onclick="pageTracker._trackPageview('/outgoing/www.movable-type.co.uk/scripts/latlong.html?referer=');">good formula</a> for.</p>
<p><iframe src="/samples/gmaps-distance/" width="600px" height="410px"></iframe><br />
Of course, I am highlighting all the accomplishments and not mentioning the frustrating obstacles. There were  several lessons learn on the way. Including a lot about incompatibility and how much I still don&#8217;t know how to do the kind of algorithmic research that you sometimes need. I&#8217;m starting to wonder if the BSD course taught me more than just to be a code monkey with a business touch, and made me wonder whether the theoretical/mathematical part will ever stop me doing something because “I just won&#8217;t get it”. Though, at the same time, I wasn&#8217;t willing to put the time and effort of research into pet projects. So this will probably be a problem for almost everyone, and not just me (honestly, mapping out longitude and latitude to distance is not something you learn anywhere).</p>
]]></content:encoded>
			<wfw:commentRss>http://tea.cesaroliveira.net/archives/42/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

