Comment 23 for bug 278388

Revision history for this message
Andrew Starr-Bochicchio (andrewsomething) wrote :

Here's what I'm going to go with, at least for now:

Open the url in the gconf key and check to make sure it's the flash player:

+ try:
+ site = urllib2.urlopen(pandurl)
+ meta=site.info()
+ if meta['Content-Type'] == 'application/x-shockwave-flash':

If it is, load it. If it isn't return an error:

+ self.moz.load_url(pandurl)
+ else:
+ return Error

If the url can't be opened or isn't a flash application, get the url and set the key:

+ except:
+ pandurl=self.returnurl()
+ self.applet.settings["url"] = pandurl
+ self.moz.load_url(pandurl)

I'm going to go ahead and push to trunk. Feel free to hack on it Mike.