YouTube Player API

Posted by Ian / January 14, 2010, 7:07 pm

player

The YouTube ActionScript Player API allows you to play videos hosted on YouTube in your own custom player or as part of a larger Flash site. We’re currently working on a project for Diesel which involves a recruitment phase to source participants for a music video slash online experience. This utilises a video hosted on YouTube and the API presented a great option to avoid duplicating the video resource, while also being able to customise the player design to match brand guidelines.

The API is pleasingly simple, yet no classes or interfaces are provided. This essentially means that you have to cast the loaded player to the dynamic Object class and access methods and properties as dynamic members. This is not particularly nice or easy to work with, as you have to rely heavily on documentation and your code will be highly vulnerable to runtime errors. As the player API looked like something we’d be likely to use again I coded a reusable wrapper to manage it and stored values for states, event types and video quality as constants.

Feel free to reuse the code. Download the source on our new Google code repository at http://code.google.com/p/stinkdigital-flash/. For usage example see http://code.google.com/p/stinkdigital-flash/wiki/YouTubePlayer.

You can see the player in action on diesel.com at http://recruit.diesel.com/.

Project Natal

Posted by Mark / June 2, 2009, 3:44 pm

E3 is on and Microsoft is going on the offensive with Project Natal. The demo is impressive but the Lionhead tech demo (above) suggests new possibilities for future marketing activites. Can you imagine what this could do for storytelling and branding? (Of course it would have to actually work first by recognizing Welsh accents and everyones need to live in a loft, but aside from that, it’s all good.)

http://www.xbox.com/en-US/live/projectnatal/

Cinema 21:9 is FWA SOTD!

Posted by Ian / April 20, 2009, 10:30 am

cinema219_sotd

I’m proud to announce (and not too ashamed to openly boast about) Stink Digital’s first FWA SOTD award for our new site for Philips – Cinema 21:9.

Big-ups to everyone at Stink Digital and Tribal DDB Amsterdam for working so hard to create an amazing piece of advertising which is capturing the imagination of so many people. And special shout out to my fellow Flashers Jamie (”FWA is so cool it’s uncool”) Copeland and Matt Sweetman.

Let’s make it number one of many – we know we’ve got some catching up to do compared to some of our longer established friends in the industry, but this is our first major Flash project and we’re totally thrilled to have set the bar so high with our initial attempt.

And as if that wasn’t good enough, yesterday we got major props from Kanye West on his blog and got tweeted to APlusK’s 1,200,000 followers! How cool is that?

Zend_Search_Lucene with a Synonym Filter

Posted by Marcel / March 25, 2009, 5:39 pm

As part of a current project, I’ve implemented a Synonym Filter for our Zend Search Lucene build. I based it on Kenny Katzgrau’s really good Stemming code, which explained in this post on his blog and available here.

The idea is simple: if you want to search for ‘kylie minogue‘, but you mistakenly type in ‘kykie‘, your search query won’t match the tokens in the search index, and you won’t get any results. If you have a Synonym filter, and if someone’s gone to the trouble of entering a piece of information to the effect that ‘kykie‘ should be read as ‘kylie‘, then your search will return results after all.

I’ve made my code available here as the latest version, here as version 0.1 (currently the same thing) as a zip archive, and included Kenny’s code – mostly because it’s really useful.

I think I might have been a bit oversimplistic, but I started out trying to write a new tokenizer method in a custom Analyzer, so that all the synonyms would be tokenized in the same way.

It then occurred to me that a much simpler way to achieve the same result would be to pre-process the search queries, adjusting any synonyms before running the rest of the query, and so that’s what my code does. It’s written as a Token Filter so that it can easily be added into the queue of filters used when the index is being built, but I’m not sure that’s even necessary.

Current limitations I’ll be working to improve are that the synonyms need to be entered into the class itself rather than being imported from another source (which would be easier to update), and that there is no automatic guessing for synonyms (like an algorithm to figure out that the term is not in a dictionary but is only 1 letter away).

Let me know if you find this of any use, or if you have any feedback!

iPhone OS 3.0 Beta – Initial impressions

Posted by Marcel / March 24, 2009, 12:56 pm

I’ve been playing with the new beta of Apple’s iPhone software after being wowed by the announcement. I’ve previously posted on my personal blog about all the features the iPhone developers annoyingly managed to miss out on – none of these were game changers certainly, but for me they were no-brainer opportunities to give the iPhone features that every other phone on the market has as a matter of course.

The new OS seemed to address about 70% of those annoyances and give a lot more (and the new APIs are certainly exciting from a developer point of view; we’re going to be seeing some great new apps that’ll cleverly get a load more money out of us) – so I downloaded it as soon as I could.

My initial impressions are slightly disappointing. I’m so used to living with the lacking features that I haven’t really noticed some of them being back in place; and others are still missing.

Something that is really noticeable is the extra load it’s placed on the hardware – my phone has visibly slowed (sometimes to such a crawl that I have to keep restarting the app in question as I can’t tell if it’s crashed or not) – and the extra hit my battery life has taken.

It’s hard to measure battery life properly, and it may just be down to my most recent addiction (Eliss), but it certainly feels like a day is at the outer limits of battery, whereas I could usually squeeze two days out of it before if my usage was low.

I’ve also found a couple of really small bugs (this is a beta after all) but let’s hope the performance gets a massive boost before launch in the summer….

Is this a Checkout or a Billboard?

Posted by Vincent / March 12, 2009, 11:37 am

Shopping TrolleyHaving been invited repeatedly to renew a domain name I own and manage at networksolutions.com, I finally succumbed and moved to actually make the renewal. The emails from Netsol themselves are fine: no thrills, and provide the requisite information, but they mask the reality of the actual renewal process itself.

To my mind, the act of turning a renewal / checkout process from one step into four or five is pretty devious. And when you provide buttons that add products to the final total when the “no thanks” option is merely a small text link to the right or below the button, that’s even more questionable. For me, it’s nothing more than plain annoying to have to navigate this veritable assault course of unnecessary web pages, but for a non-technical person the completely unnecessary step-by-step process could really hit them where it hurts, in their pocket, inadvertently buying useless WHOIS advertising, transferring web hosts and whatever other crafty schemes Network Solutions can use to juice you. As if it wasn’t bad enough that their year renewal fees are about three times too expensive!

When designing a process, you should aim to make it as streamlined as possible, reduce the number of steps and the number of required fields, reduce the hurdles as much as possible, and create a clean, concise and uncluttered interface. Web users thrive on low input, non-intrusive forms that ask for nothing more than the bare minimum, and that quickly and easily answer the questions in their mind when they’re stuck. Use the conventions that people are used to with forms. With web 2.0 and the surge of web applications such as blogs, content management systems and business applications, there is plenty of fodder out there in terms of best practices to draw on. Reinventing the wheel for every project needn’t and shouldn’t be an option.

And if inviting a user to checkout, simply put, let them do it.

Flash Camp Fun

Posted by Ian / February 27, 2009, 1:44 pm

Flash Camp came to Shoreditch today, so I took the opportunity to detach my head from coding for the afternoon to check it out. I heard some interesting talks on Flash animation, Pixel Bender, and Air, but when Seb Lee Delisle of Plug-in Media stepped up, I was really listening.

Like all of us at Stink Digital, and much of the ActionScript community, he’s deeply passionate about the fun stuff – I’m talking about things like Papervision3D, particle systems, webcam interactivity and augmented reality. You have to play to find new ways of doing things and Seb entertained the several hundred strong audience with various toys and experiments, such as interactive particle-generated fireworks projected onto large buildings, an augmented reality wormhole and even 3D Pong, which the Flash Camp crowd controlled via web cam by waving our arms in the air.

The most lasting impression, however, was left by a groundbreaking new Papervision3D site for CBeebies. What’s most absorbing about it for me is the level of detail in everything you can do and the soft, gentle feel they’ve managed to achieve – something quite tricky to accomplish in Flash 3D. At this time, the second half of the site is still a couple of weeks from launch, but promises to be pretty special. Check out http://www.bbc.co.uk/cbeebies/bigandsmall/ for more.

An Error Needn’t Be A Dead End

Posted by Vincent / February 20, 2009, 7:23 pm

Nothing hits a site visitor dead in the eye like a message for lost content, or worse, an error message that says the error message format file itself cannot be found. While, as a developer, you never expect to present your clients or users with errors, it is best practice to anticipate the worst and actually turn a negative into a positive.

At Last.fm, back in the day, howls of “TEA!” used to reverberate around the office whenever the database went down or became overloaded. (Our error page told users to go away and make some tea before returning to attempt another refresh of the page.) I always maintained that they should set a browser cookie with each page reload and encourage users to drink a progression of increasingly alcoholic drinks, say tea > coffee > irish coffee > gin and tonic > double whisky on the rocks, but that’s another story, and probably has more to do with my Scottish heritage than the steadfastly “English” persona of this uniquely British, or rather European startup.

Back on topic, this little story reflects the need to rise above the negative and help visitors out of a potential dead end. At the very least, alert the user to the error and provide them with links to the home page, alternate content or equivalent content, or better yet, a search box.

Many a geek has been seen to inject humour into a 404 error page with games of space invader or insider techy jokes. Just yesterday, Marcel leaned over to show me the Revver.com 500 Error page which included words to the effect of: ‘our crack squad of coders has been alerted to this error and their game of virtua fighter put on hold to find a solution.’ That being said your target audience isn’t necessarily going to be a bunch of geeks, so what can you do?

Past best practice has shown that there are lots of ways to turn the error page into a sort of feature: you can use striking imagery, get lyrical and weave a poem, be apologetic and sincere, show some emotion, and humanize what is essentially a purely technology induced scenario.
In the end, I suppose, do whatever you want to do, just don’t make it boring.

BBC News Error Page

Zend Framework – some pros and cons

Posted by Marcel / , 7:17 pm

We’re using Zend Framework as our PHP framework, to help us turn projects around quickly without sacrificing stability. We ended up choosing this over the likes of CakePHP, Symphony, CodeIgniter, etc. for a few reasons.

Firstly, we wanted to be sure to choose a framework that supported configuration over convention, as we don’t like the idea of having to learn and work by somebody else’s rules.

Secondly, the modular, flexible approach was really attractive – the nice thing about ZF is that even if you don’t use it you can still grab and use individual bits of it.

Thirdly, it’s full-featured – it has a very large set of functions and classes, and embraces design patterns throughout, so it’s really stable too (in general).

Now that we’ve been using it for a few months, we’ve used the majority of its features and have a lot more to say about it – both good and bad. We use the MVC configuration (which slightly invalidates the first reason above), and have extended an awful lof of the framework for our own shared library. That’s because it’s coded to be SO flexible that you end up having to set a lot of options every time you use any of the classes; and as soon as you do that a few times you realise you’re better off extending the ZF class to include your defaults.

Once you start making your own extension to the library, you find that you can kick off a new project and be looking at forms related to database fields, all covered by 3-level one way secure logins, all within 30 minutes of getting the repository going. Which is pretty amazing.

On the other hand, the Zend_Form output code is pretty naff (every element is within a DD tag and every label within a related DT tag), and modifying this is painful but ultimately rewarding. The default layout system doesn’t observe what we think as the crucial split between design and code. The image upload code (for forms) is pretty comprehensive in its aims, but not yet finished (and the manual is not in sync with the project’s progress).

Despite all this, the main downside to ZF is the documentation. It’s often poorly written, doesn’t go into enough detail and doesn’t give context for its examples – what use is

$this->getRequest();

when you don’t know what scope $this is? It isn’t always in sync with the most recent version, and the site it’s presented on is painfully slow! This all adds up to a steep learning curve being lightly greased, so that it takes longer than it should to find out how to use what are actually great components (often looking into the source is the only way to find out what’s going on).

Having said that, overall we’re massively happy with it, but we’ve found it takes a while to get a new bit of functionality working at all, then a bit longer before it works the way you want it to, but once you have it right it works very well and incredibly powerfully. We would (and do) recommend it to anyone willing to invest some time into making something that’ll pay dividends in the long run.

The Perfect(ly working) App

Posted by Tim / February 9, 2009, 12:55 pm

Software companies/developers – The predicament.

To the end user, it feels like decisions are easily made between the addition of new shiny features over drab bug fixing. The marketing vs. a fully functioning app.

How excited would the design and media world be if a bug-free creative collection was realised and released? Doing so would improve workflow and creativity many more times than a re-skin and add-ons that are sporadically used.

Product catalogues should be slim-lined (i.e. working towards v10.4 over a ‘major update’ after 10.02), and implement a two/three year product release cycle over an obviously rushed yearly renewal to shift as many £299 upgrades as possible. Products would be solid and brand images strong.

Our days are lived through these apps. Our creative blocks should be our own creative limits, not from the ‘boom’ of an unexpected error.

A solution!

A solution!