About Ed Moore

Ed is a front-end developer originally from Australia. He now lives and works in Singapore. He works mostly with Flash, actionscript, html, css, javascript and other web based technologies.

Issues with HTML5 video and the iPad

I have recently been creating a site that has a “lightbox” that opens a HTML5 video with a close button in the top right corner of it. The close button is meant to float above the video (see below). The lightbox just opens via the :target pseudo class. The close button just links to an empty hash tag.

HTML 5 Video Player

Now, the close button (beautifully designed I know) is just meant to close the lightbox and nothing else. It works fine on all the desktop browsers, on Android tablets and on the BlackBerry Playbook. However when I got around to testing the iPad I found that the close button was not working at all. I tried to set the z-index of the close button and the video player but that did not seem to help at all.

After searching around the web for a while I came across a Stack Overflow article that said to use -webkit-transform-style: preserve-3d on the video element. However that did not work either. I have attached the example code below.

CSS:

#video {
  position: absolute;
  top:0;
  left:0;
  width:940px;
  height:539px;
  background:#fff;
  display: none;
}
#video:target {
  display: block;
}
.btn-close {
  position: absolute;
  top:0;
  right:0;
  padding:20px;
  display: block;
  background-color: #fff;
}

HTML:

<p>
  <a href="#video" class="btn-cta">Watch Video Now</a>
</p>

<div id="video">
	<video width="940" height="539" controls>
	  <!-- MP4 must be first for iPad! -->
	  <source src="http://clips.vorwaerts-gmbh.de/VfE_html5.mp4" type="video/mp4"  /><!-- Safari / iOS, IE9 -->
	  <source src="http://clips.vorwaerts-gmbh.de/VfE.webm"      type="video/webm" /><!-- Chrome10+, Ffx4+, Opera10.6+ -->
	  <source src="http://clips.vorwaerts-gmbh.de/VfE.ogv"       type="video/ogg"  /><!-- Firefox3.6+ / Opera 10.5+ -->
	</video>
	<a class="btn-close" href="#">X</a>
</div>

I believe it has something to do with the way the iPad uses Quicktime to control HTML5 video.

Has anyone experienced this before? I would like some insight on this.

UPDATE: After a bit of research I have found out that if you have the default controls on a HTML5 video component, then the iPad overrides all touch events in that area. It seems that the only way around this issue is to create your own controls for the video player. A little annoying I must say, but it looks as though this is your only hope. :’(

Setting up code hinting for Adobe Air in FlashDevelop

FlashDevelop is my absolute favourite actionscript code editor. It has great code hinting for actionscript and some shortcuts so you don’t need to type so much code yourself. Now it does only work on Windows (Sorry to all the Mac and Linux people), however there are work arounds to get it work on other platforms. The only trouble is that out of the box it doesn’t have any code hinting for Adobe AIR. However it’s actually very easy to setup. Just follow along this simple tutorial and you will up and running in no time.
Continue reading

Installing Sublime Text 2 on Ubuntu (Update)

Well it’s been quite some time since my last blog post. I’ve been really busy with a lot of stuff as well as going on holiday :)

Anyway this week I thought I would install Ubuntu and try and get some apps setup that I just can’t live without. One of the programs that I have been using a lot recently and really really love is Sublime Text 2. If you haven’t tried it yet, you should. It really makes my programming life easier. Plus, it’s multi-platform so you can install it on Mac, Windows and Linux.

Although this tutorial is specifically for Ubuntu users, almost all of it can be used on both Mac and Windows too.
Continue reading

Hello world!

Hi everyone,.

Allow myself to introduce…myself. My name is Ed Moore. I am a Flash and Web developer originally from Australia, however I live and work in the small city/state/country of Singapore. I currently work at an advertising firm doing a range of different projects, with both flash and html.

My main aim of this blog is to provide information as well as some tutorials on a range of different topics in web development, including, html 5, css 3, javascript, jQuery, flash and actionscript. My plan is to also create some video tutorials down the line as I am really a visual learner, however I will try and provide a written “transcript” of the tutorial as well.

If anyone has any topics that you would like me to talk about please let me know.