Generating certificates for push notifications? Don’t use Chrome!

November 3rd, 2010 § Comments Off on Generating certificates for push notifications? Don’t use Chrome! § permalink

Thank you again Stack Overflow, for telling me why the Apple Push Notification service SSL Certificate Assistant (on the iOS Provisioning Portal) kept rejecting my certificate signing request.

It turns out that for whatever reason, if you try uploading your certificate signing request using Chrome, it will fail with an error (Chrome bug? site bug?). So: use Safari (or Firefox, apparently, based on the comments)!

Bing search plugin

June 1st, 2009 § Comments Off on Bing search plugin § permalink

UPDATE: Bing now has its own official search plugin. Just click “Add Bing to your browser” at the top-right of the Bing homepage.


Bing, Microsoft’s new search engine, has launched. I am going to try it as my default search engine for the next little while to see how that goes.

Meanwhile, I could not find a Firefox search plugin for Bing, so I made one. I’ve never made a search plugin before, so there are no guarantees! I’ve only tested this on Firefox 3.0.10.

To install it, head on over to my Install Bing Search Plugin page.

iPhone VR: Viewing 3D panoramas in Safari using JavaScript and -webkit-transform

October 13th, 2008 § 4 comments § permalink

Apple’s 2.0 iPhone update brought some interesting enhancements to Mobile Safari, including 3-D perspective and access to multitouch events. Armed with the documentation (of varying quality) from Apple’s Web Apps Dev Centre, and invaluable information from blog articles such as Idean’s “Spin the Bottle”, SitePen’s “Touching and Gesturing on the iPhone” and Paul Bakaus’s “3D CSS Transforms on the iPhone”, I put together a simple web app that displays a cubic panorama in Mobile Safari. Look left, right, up and down by dragging your finger across the display. No zoom, currently, though. It was pretty straightforward, but I did learn a few things while creating it.

Go ahead, take a look :D Visit http://tinyurl.com/iphonevr on your iPhone or iPod Touch.

The images used for the panorama are taken from one of the QuickTime VR movies in Apple’s Cubic VR gallery. I extracted the images from the movie using the procedure explained here (in French, but it’s easy to follow).

I may write a full tutorial on this eventually, but for now I will just share a few notes (and the source code):

  • It’s a lot easier to get the 3-d transforms right if the elements you want to transform start out centred in their containing block (so that they start at (0, 0, 0), essentially). I did this with regular CSS, but I suppose this could also be done as part of the transform.
  • The above also applies (especially) to any DIV that contains nothing but other DIVs. At first my cube was spinning around its top edge, instead of its centre, because its children (the cube faces) were absolute-positioned, and thus the “cube” DIV itself had no height! Giving it an explicit width and height solved this.
  • Touch events on 3-D transformed elements seemed to be little bit unreliable. I worked around this by putting a normal transparent DIV on top of the whole thing and listened to events on that instead.

Download the source code (MIT Licence).

SWFFix releases public alpha!

July 28th, 2007 § 2 comments § permalink

SWFFix logoI was excited to see SWFFix announce the release of a public alpha. I had begun to fear that the project was moribund. SWFFix is from the developers of SWFObject, UFO and the Flash player detection kit, joining forces to create what one hopes will be the best Flash-embedding method yet.

I haven’t tried it yet, but based on reading the documentation, it seems they’ve come up with a clever approach, one that’s different than both SWFObject and UFO (although you can also use it in a SWFObject/UFO-like manner if you want to).

Instead of using JavaScript to write the Flash object or embed tags, you instead use regular W3C-compliant markup to add the Flash content to your page. Then the SWFFix JavaScript library steps in and fixes the issues that can arise on different browsers and platforms. For example, it fixes Internet Explorer’s “click-to-activate” mechanism. It can also optionally adds enhancements like ExpressInstall.

I think it’s a great approach. If JavaScript is disabled, for example, the Flash content will still play (unlike what happens with SWFObject and UFO). I will have to try it out soon.

Learn something new every day

July 25th, 2007 § 2 comments § permalink

Until today, I did not realize that any HTTP requests made by a Flash movie (including LoadVars.load(), MovieClip.loadMovie(), Sound.loadSound(), etc) includes cookies — the cookies that would normally be sent by the browser anyway. In retrospect, this makes sense and is perhaps even obvious: since the Flash player asks the browser to make the connection, then it really is the browser doing the requests, so why wouldn’t the browser send and receive cookies as normal? For some reason, though, it was a surprise to me.

What does this mean? It means that it’s much easier for a widget to work in conjuction with PHP sessions, for example: I had been putting the session ID in FlashVars so that the Flash movie could add the cookie manually with addRequestHeader(), but it turns out that that is unnecessary.

New MySpace embed rewriting “breaks” Flash preloaders

January 26th, 2007 § 7 comments § permalink

I did a very quick test, and it does appear that the way MySpace uses the <object> tag prevents Flash preloaders from appearing as expected in Internet Explorer (tested versions 6 and 7 for Windows). This is the issue that the Flash Satay article reports on. I will attempt to explain it below, as well, and how it applies to MySpace in particular:

In normal situations, the Flash plugin or ActiveX control will start playing a Flash movie as soon as it has loaded the first frame. Flash movies often put up a progress bar that lets the user now how much longer they will have to wait for the movie to finish loading.

On MySpace, Flash movies now only show a generic graphic icon until the entire Flash movie is loaded, instead of starting immediately. This means that the Flash movie has no opportunity to display its own progress bar to indicate loading status (or to just start playing if preloading is not necessary).

Before

how it used to work This is the way it is expected to look, and how it does work in Firefox (or in IE when embed or IE’s preferred object tag is used).

After

how it looks now This is the way Flash movies look on MySpace in IE now, before they have finished loading. Obviously, this is much less attractive and gives no feedback to the user. Worse, if a movie does not require a preloader and expects to be able to stream and play its content as it loads, it is unable to do so.

If MySpace wants to rewrite embeds so drastically, I wish they would just use Geoff Stearns’ SWFObject instead. Not only would that solve the preloading problem above, but it would also fix the Eolas “click-to-active” issue that is still present when viewing user-embedded Flash movies on MySpace with IE.

Appendix

Here is the way Internet Explorer “prefers” to see the object tag, and is the way that the Flash IDE by default writes out the object tag. However, I believe it is not W3C-standards-compliant (and is also not compatible with Firefox, Safari, etc). When this form of the object tag is used, Flash preloaders work as expected:

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="320" height="200" id="objectloadingtest" align="middle">
<param name="movie" value="http://bunnyherolabs.com/misc/objectloadingtest.swf" />
...

This is the way MySpace rewrites the object tag, and causes the preload problem. It is (I believe) W3C-standards-compliant.

<object type="application/x-shockwave-flash" data="http://bunnyherolabs.com/misc/objectloadingtest.swf" height="200" width="320" align="middle">
<param name="movie" value="http://bunnyherolabs.com/misc/objectloadingtest.swf" />
...

MySpace changes their Flash/embed filtering again

January 18th, 2007 § 16 comments § permalink

Mashable reports on MySpace’s new <embed> tag changes. It looked like MySpace was disabling all embed tags, but it seems that they were rolling out this big change. It’s explained better in Chris Bennet’s comment to that post, which I reproduce below (I hope he doesn’t mind):

14. Chris Bennett – January 18, 2007

Before:
MySpace required embed tags to embed Flash content. The preferred method was to embed via the object tag, but that was completely stripped out by MySpace.

This morning:
MySpace began rolling out a change that would block embed tags, but allow object tags for embedded content. This caused some users to report stickers as “not working.”

This morning + n hours:
MySpace finished the change that converted a user’s embed tags to properly formatted object tags and therefore allowed.

Soon, all embedded objects on MySpace will be using object instead of embed. The previous restrictions such as “allownetworking = internal”, “allowScriptAccess = never”, “enableJSURL = false”, and “enableHREF = false” all remain. One new FlashVar I do not recognize is “saveEmbedTags = true” which is probably an internal flag to MySpace.

This is probably part of a larger, more-intelligent Flash filtering solution that would lend itself to a situation where MySpace acts as a gatekeeper to Flash stickers (as discussed).

I wrote about some of MySpace’s previous changes to embedding code in my old tech blog.

I am wondering about the possible technical implications of this change. According to Drew McLennan’s Flash Satay article, the form of the <object> tag that MySpace is using does not stream large Flash movies! To quote the article:

After testing with some largish movies, I noticed something amiss. While every other browser was getting it right, IE/Windows was not streaming—it was waiting for the entire movie to download before playing it. This is fine for small movies, but for anything serious, the lack of streaming is unacceptable.

I haven’t tested this to see if this is still true with the latest versions of IE6 and IE7. If so, this kind of sucks :( Progress bars will not work in such a world, unless everything is “satayed” as described in McLennan’s article.

I guess we shall see what other effects this might have, and what other changes MySpace might make in the near future. If the past is any indication, there will be zero official word from MySpace about this.

PlayStation 3 Flash and browser info

December 21st, 2006 § Comments Off on PlayStation 3 Flash and browser info § permalink

The “About Flash” page reports that the PS3 is running Flash Player 7.0.70.0.

The User-Agent is reported as “Mozilla/5.0 (PLAYSTATION 3; 1.00)”.

For what it’s worth :)

I have not run any Javascript or rendering tests or anything like that. I should see if anyone else has already.

EDIT: Aha! Someone has, and seems to have done quite an exhaustive job of it. Very handy, bookmarking now :)

PlayStation 3 web browser: technical specs anywhere?

October 20th, 2006 § 4 comments § permalink

Yesterday, at Sony’s Gamers Day in San Francisco, Sony demonstrated the PlayStation 3’s web browser (which will be included free with the PS3), including the viewing of movie clips on YouTube. I am assuming that this means the PS3 browser has full Flash player capabilities.

I’ve done some quick googling but haven’t been able to find any details about the PS3 web browser (unlike the Wii’s browser, which is based on Opera). If it’s based on Mozilla (or some other existing, known browser source), it would make our jobs as web developers much easier. If not, it will be another platform to target, especially if the PS3 browser becomes a major player. I’m also curious about what version of Flash is running on it.

Where Am I?

You are currently browsing the Browsers category at bunnyhero dev.