Tim Retout's www presence

Mon, 19 Jul 2010

Gnash and BBC glow

One thing I noticed having started to use gnash is that the BBC's iPlayer website (UK-only, I believe) gives a message like "You do not have Flash player installed" - not merely complaining about the version, but actually not recognising gnash as a Flash player at all.

Cue some digging. The BBC's pages use glow, an in-house JavaScript library (available under the Apache 2.0 License) to detect whether Flash is installed. The documentation was really easy to follow - I had a test page going quicker than you can say "Hello, World!"

The bottom line is, glow uses this regex:

var regexFLASH_VERSION = /^Shockwave Flash\s*(\d+)\.(\d+)\s*\w(\d+)$/;

and gnash uses a description like this:

Shockwave Flash 10.1 r999.
Gnash trunk, the GNU SWF Player. Copyright (C) 2006, 2007, 2008, 2009,
2010 Free Software Foundation, Inc.
Gnash comes with NO WARRANTY, to the extent permitted by law. You may
redistribute copies of Gnash under the terms of the GNU General Public
License. For more information about Gnash, see
http://www.gnu.org/software/gnash.
Compatible Shockwave Flash 10.1 r999.

Note the dollar sign at the end of the regex. Indeed, rebuilding gnash without all the notices at the end of the description lets you see the iPlayer UI. (It doesn't actually play anything, don't get your hopes up.)

Interestingly, different parts of iPlayer require different minimum versions of Flash. Clips of radio programmes tend to be more liberal with what they will accept - right down to version 7. Most TV streams and clips require at least version "9.0 r115", and I've heard they use SWF verification. I'm not sure how legal it is to implement that, although apparently code exists.

Posted: 19 Jul 2010 22:34 | Tags: , , | Comments (3)

Sat, 17 Jul 2010

Gnash

Adobe aren't supporting their flash player on amd64 right now. The cognitive dissonance gets a little draining, anyway, and I've seen the hoops I'd have to jump through to get the 32-bit version running. So I'm going to try tracking gnash trunk for a while.

First impressions: gnash seems easier to build than it used to be (or maybe I just read the instructions this time). I chose the AGG graphics backend, with gstreamer and gtk. I also chose to install the browser plugins system-wide. The bzr repository ships copies of the necessary Mozilla libraries, which I'd usually frown upon as a packager, but it did mean I didn't have to worry about them.

So the whole process looked like:

bzr branch http://bzr.savannah.gnu.org/r/gnash/trunk
cd trunk
./autogen.sh
./configure --enable-renderer=agg \
            --enable-media=GST \
            --enable-gui=gtk \
            --with-plugins-install=system
make
sudo make install
sudo make install-plugins

The README file was very helpful, as was the configure script output.

So, off to youtube... "An error has occurred, please try again later." Hmpf. Off to read the mailing list... there was a problem discussed a while ago about cookies that YouTube has started sending. I checked the patch discussed at the time, and a version of it seems to be in trunk, but the symptoms are still happening for me. But... disable all cookies in the browser, and it starts working. (There's a chance that libcurl might not be configured properly.) I'll have to report the problem or track it down further, but for now, I'm sitting back and declaring success.

Co-incidentally, the video was discussing another cookie problem. ("Put pinky down. Down pinky. Good.")

Posted: 17 Jul 2010 19:39 | Tags: | Comments (5)

< July 2010 >
SuMoTuWeThFrSa
     1 2 3
4 5 6 7 8 910
11121314151617
18192021222324
25262728293031

Contact

Tim Retout tim@retout.co.uk
JabberID: tim@retout.co.uk

List of non-fail

Copyright © 2007, 2008, 2009 Tim Retout