Thursday, November 04, 2004

ActiveX in Firefox?

UPDATE: Simple solution posted by Yahoo! for Launch.com at ActiveX in Mozilla Firefox. Please remember that you have to run Firefox as an administrator for this to work. If you are logged in as a regular user then use RunAs in Microsoft Windows 2000/XP.

Full Step-By-Step Guide: Embedded Windows Media & Launch.com in Firefox 1.0

WARNING!! Before you begin, if you use the Adblock Extension, you must make sure that the setting for OBJ-TABS is disabled. Otherwise, your system will run almost any ActiveX control. See Note 5.

Unless edited to say otherwise, this guide only applies to Firefox 1.0 under Windows.

For Firefox 1.0PR and 0.9.x (also under Windows), see the previous version of this guide: http://forums.mozillazine.org/viewtopic.php?t=140828 but post any questions about it here - stating which versions of Firefox and ActiveX you are using.

This method has not been tested with Firefox 1.0RC1 and 1.0RC2.

-------------------------------------------------------------

Firefox and ActiveX
There are ActiveX plugins avaliable for Firefox and Mozilla, to add ActiveX support. This topic will tell you how to install ActiveX in Firefox, and how to view streaming video on Launch.com, which requires additional work.

-------------------------------------------------------------

Background
Some Embedded/Streaming Media (such as those on launch.com) uses an ActiveX Control to invoke Windows Media Player. ActiveX is what Internet Explorer uses, instead of the plugin system adopted by Netscape. ActiveX can be thought of as a universal plugin. Many of the ActiveX Controls allow websites to execute code on the user's computer. This can be a big security risk, and is one of the more serious security vulnerabilities in IE. Partly for this reason, Firefox does not come with ActiveX support installed. Fortunately, this ActiveX plugin comes pre-configured to only run the WMP controls - and so to be secure. WMP does provide a plugin that Firefox will use, but ActiveX works far better and on more media than the plugin does.

-------------------------------------------------------------

ActiveX Installation - Firefox 1.0
Step 1. IMPORTANT. If you use the Adblock Extension, you must make sure that the setting for OBJ-TABS is disabled. Otherwise, your system will run almost any ActiveX control. See Note 5.

Step 2. Download Adam Lock's ActiveX Plugin for Firefox 1.0 from here: http://www.iol.ie/~locka/mozilla/plugin.htm#download
Click 'Download the xpi'. DO NOT click 'Click Here'.

Step 3. Install the plugin: Open firefox, then drag the mozactivex-ff-10.xpi file you just downloaded into the Firefox window.
The xpi will install all of the files that make up the plugin into Firefox when you do this.
While installing, the plugin will appear in the Extensions window. Then it will vanish - this is because even though it installs the same way, this is not an extension.

Step 4. When the installation is complete, restart Firefox.

Step 5. You can test the ActiveX installation here: http://www.accuradio.com/#. If the radio loads and plays, ActiveX is installed correctly. If not, try applying the registry patch in Note 7.

End

-------------------------------------------------------------

Viewing Media on Launch.com
On top of ActiveX, launch.com employs a Browser Detection Script, so it can know which browser you are using. If you are using anything but Internet Explorer or certain versions of Netscape, it will not let you see the video's.
The Browser Detection Script works by reading your browser's User Agent. In Firefox, if you click 'Help>About Mozilla Firefox', the User Agent is the two lines of text at the bottom of the 'About Mozilla Firefox' window. It contains the name and version of the browser you are using, and other information like your Operating System.

To view video's on Launch.com, you need to trick the Browser Detection Script into thinking you are using Netscape 7.1. To do this, we need an extension called User Agent Switcher. It allows you to set several User Agents youself, and then let's you switch between them. The following is a guide to installing and configuring the User Agent Switcher Extension.

(Installation)
Step 1. Install the User Agent Switcher Extension from here: https://update.mozilla.org/extensions/moreinfo.php?application=firefox&id=59&vid=617
You will have to restart Firefox to complete the installation.

(Configuration)
Step 2.
Click 'Tools>User Agent Switcher>Options>Options...'

Step 3.
On the left of this options window, select 'User Agents'. You should now see a list of User Agents.

Step 4.
Click the 'Add' button. In the new window that pops up:
Under Description, type: Netscape 7.1 (Windows XP)
Under User Agent, type: Mozilla/5.0 (Windows; U; Win98; en-US; Localization; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)
Under App Name, type: Netscape 7.1
Under App Version, type: 7.1 [en] (Windows NT 5.1; U)
Under Platform, type: Win32
Click Ok.

Step 5. You should now be back at the list of user agents. There should be a new one at the bottom called 'Netscape 7.1 (Windows XP)'
Click Ok to exit the User Agent Swticher Options.

(Use)
Step 6. Whenever you want to watch a video on Launch.com, before you go to the site click 'Tools>User Agent Switcher>Netscape 7.1 (Windows XP)'
That will set your User Agent to Netscape 7.1. This will trick Launch.com into thinking that you are using Netscape 7.1, and will let you see the video's.

Remember, you still need to install ActiveX to see the Launch.com video's.

-------------------------------------------------------------

Notes
Note 1. With certain versions of ActiveX installed, sometimes the Flash plugin will not load unless it was previously loaded.
A work-around is to refresh your plugins (type about:plugins in your address bar) when starting FireFox, under those circumstances everything loads normally.

Note 2. AnonEmoose and I have tested these methods of installing ActiveX with many sites that use ActiveX to stream video (including launch.com video, cjob.com Listen Live, startrek.com video and others) with no problems. However, this does not guarantee that this will allow Firefox to view all embedded/streaming video - for example, some also use IE-only javascript in the embedded players.

Note 3. AnonEmoose has tested Yahoo/Launch Radio, and believes it does NOT work with Firefox

Note 4. For previous versions of this guide, you were told to edit the activex.js file, to set the plugin to only run the WMP ActiveX controls. Doing this made the plugin secure, since all it could do is invoke WMP. Adam Lock's new Firefox 1.0 ActiveX plugin comes with an activeX.js file that has already been so edited. If you want to run ActiveX controls other than the WMP ones, you will have to edit this file as necessary.

Note 5. For previous versions of this guide, you were told that if you used the Adblock Extension and had the setting OBJ-TABS enabled, then ActiveX would run almost any ActiveX control - not just the ones listed in activex.js. I don't know yet if this applies to Adam Lock's new ActiveX plugin for Firefox 1.0, so I highly reccomend that if you have this extension, that OBJ-TABS is disabled prior to installing ActiveX. Better to be safe than sorry.

Note 6. IE has a function whereby if you are downloading a video file (such as through a link), it can have WMP play the file as it is downloading. Firefox cannot do this, but the Download With Extension can be configured to do this: It is an extension that allows Firefox to specify another program to do the job of downloading a file. If you add a WMP entry, WMP can download the file - and, of course, play the file as it is downloading. It can even be configured to do it automatically.

Note 7. Some users may need to apply this registry patch: http://plugindoc.mozdev.org/resources/wmp9.reg
It solves the problem of Firefox trying to use the WMP 6.4 plugin, instead of the WMP 9/10 one.
To apply this registry patch, download the file to your desktop and then double-click it. A pop-up will ask if you want to add the information in it to the registry - click Yes.

(Reprinted from http://forums.mozillazine.org/viewtopic.php?t=167260&sid=29929fba10eb39c1529039ac89e444a1 for my own personal reference. Please refer to original for more details.)