After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 350861 - CNN Watch video complains about missing WM9 player
CNN Watch video complains about missing WM9 player
Status: RESOLVED DUPLICATE of bug 349014
Product: totem
Classification: Core
Component: Browser plugin (obsolete)
unspecified
Other Linux
: Normal normal
: ---
Assigned To: totem-browser-maint
totem-browser-maint
Depends on:
Blocks:
 
 
Reported: 2006-08-11 10:32 UTC by Christian Fredrik Kalager Schaller
Modified: 2006-08-11 14:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Screenshot of CNN website with relevant section highligted (211.95 KB, image/png)
2006-08-11 10:34 UTC, Christian Fredrik Kalager Schaller
Details
detect.exclude.html (6.71 KB, text/plain)
2006-08-11 11:48 UTC, Bastien Nocera
Details

Description Christian Fredrik Kalager Schaller 2006-08-11 10:32:50 UTC
On the frontpage of CNN.com there is a 'Watch Video' element. Pressing any of the items there brings me a new windows complaining about missing WM9 plugin.

I will attach a screenshot with the relevant section of the CNN website highlighted to this bugreport as there are various regional versions of the CNN website which might function differently from the one I am seeing.
Comment 1 Christian Fredrik Kalager Schaller 2006-08-11 10:34:20 UTC
Created attachment 70702 [details]
Screenshot of CNN website with relevant section highligted
Comment 2 Bastien Nocera 2006-08-11 11:34:05 UTC
They use "cnnVideo()" to launch the popups.
Which is defined in:
http://i.a.cnn.net/cnn/.element/ssi/js/1.3/main.js
Which launches:
cnnLaunchWebPlayer, cnnLaunchPipelineApp or cnnLaunchFreePlayer depending on the setup

The free player uses:
	if (detectWindowsMedia()) {
		var cnnPassedDetection = new String( WM_readCookie( 'cnnVidPlug' ) ).toLowerCase();
		if ( cnnPassedDetection == "activex" || cnnPassedDetection == "native" ) {
			openURL = playerURL;
		}
	}
	else {
		openURL = noplugURL;
	}
To detect the plugin:
function detectWindowsMedia() {
	pluginFound = detectPlugin( 'Windows Media' );
	// if not found, try to detect with VisualBasic
//	if ( !pluginFound && detectableWithVB ) {
//		pluginFound = detectActiveXControl( 'MediaPlayer.MediaPlayer.1' );
//	}
	if ( !pluginFound && detectWMPSupport() ) {
		pluginFound = true;
	}
	return pluginFound;
}

Changing the plugin name gets us further (bug 349014), to a warning that says:
"We were unable to determine the version of Windows Media Player installed."

Carrying on works fine. I think the warning is because we don't support ActiveX:
// Taken from Netscape's Devedge Site
//http://devedge-temp.mozilla.org/viewsource/2003/windows-media-in-netscape/index_en.html
function detectWMPSupport(){

    var wmp64 = "MediaPlayer.MediaPlayer.1";
    var wmp7 = "WMPlayer.OCX.7";
    if((window.ActiveXObject && navigator.userAgent.indexOf('Windows') != -1) || window.GeckoActiveXObject)
    {
        if(createActiveXObject(wmp7)){ 
            return true;

        }else{
            if(createActiveXObject(wmp64)){
                return true;
            }else{
                return false;
            }
        }
    }else{ 
        return false;
    }
}

which I'm not sure we can fake. Christian, ideas?
Comment 3 Bastien Nocera 2006-08-11 11:48:38 UTC
Created attachment 70704 [details]
detect.exclude.html

The HTML just before we get the warning.
Comment 4 Bastien Nocera 2006-08-11 11:53:13 UTC
This is the web page just before we get to the warning. From the code, you can see that we would either need ActiveX support, or have "Mac" in the platform, neither of which we can do.

You can use this as a work-around in the meanwhile:
Index: totem-mozilla-plugin.cpp
===================================================================
RCS file: /cvs/gnome/totem/src/totem-mozilla-plugin.cpp,v
retrieving revision 1.60
diff -u -p -r1.60 totem-mozilla-plugin.cpp
--- totem-mozilla-plugin.cpp    11 Aug 2006 10:52:24 -0000      1.60
+++ totem-mozilla-plugin.cpp    11 Aug 2006 11:50:34 -0000
@@ -704,7 +704,7 @@ totem_plugin_get_value (NPP instance, NP

        switch (variable) {
        case NPPVpluginNameString:
-               *((char **)value) = "Totem Web Browser Plugin";
+               *((char **)value) = "Totem Web Browser Plugin (Windows Media)";
                break;
        case NPPVpluginDescriptionString:
                *((char **)value) = totem_plugin_get_description();

So you get past the first warning.

Closing as a dupe.

*** This bug has been marked as a duplicate of 349014 ***
Comment 5 Christian Persch 2006-08-11 14:06:57 UTC
Yes, I don't think we can put "Windows" in the browser's platform string or support activeX, so this detection code will never be compatible with totem.