Extensions :  K-Meleon Forum
All about K-Meleon extensions. 
Disable Windows Media Foundation (Flash Default Player)
Posted by: George_Hall
Date: June 07, 2016 08:44AM

This macro toggles off the pref media.windows-media-foundation.enabled so that the flash player will be the default player instead of the HTML5 Player.

# K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage2)
#
# ---------- WindowsMediaFoundation.kmm
# ---------- Disable Windows Media Foundation (Flash Default Player) ----------------
#
# Dependencies : main.kmm
# Resources :
# Preferences : "media.windows-media-foundation.enabled"
# Author : George_Hall
# Version : 0.1 2016-06-06
# -------------------------------------------------------------------------

_WindowsMediaFoundation_perfcheck {
$_WindowsMediaFoundation_PStatus = getpref(BOOL, "media.windows-media-foundation.enabled");
}

_WindowsMediaFoundation_toggle {
menuchecked=getpref( BOOL , "media.windows-media-foundation.enabled" )==false;
togglepref(BOOL, "media.windows-media-foundation.enabled") ;
}

_WindowsMediaFoundation_BuildMenu {
setmenu("&Edit", macro, _("Disable Windows Media Foundation (Flash Default Player)"), _WindowsMediaFoundation_toggle, -1);
}

$OnStartup=$OnStartup."_WindowsMediaFoundation_perfcheck;";
$OnInit=$OnInit."_WindowsMediaFoundation_BuildMenu;";
# -------------------------------------------------------------------------
$macroModules=$macroModules."WindowsMediaFoundation;";

I used macro by JamesD http://kmeleonbrowser.org/forum/file.php?9,file=822,filename=xpinstallext.kmm from

Re: Macro To Turn on and Off Firefox Extension Insttall http://kmeleonbrowser.org/forum/read.php?9,128836,129054#msg-129054

except that i removed the extra setmenu( from line below

_xpinstallext_BuildMenu {
setmenu(setmenu("&Edit", macro, _("Set FireFox extension install"), _xpinstallext_toggle, -1);
}

My macro It does not disable HTML5 Video it forces "Windows Media Player" Files to play using the Flash Player instead of the HTML5 Player

Attachments: WindowsMediaFoundation.kmm (1.2 KB)  
Options: ReplyQuote
Re: Disable Windows Media Foundation (Flash Default Player)
Posted by: George_Hall
Date: June 15, 2016 07:44AM

I updated WindowsMediaFoundation.kmm to test for Version of the Firefox (Gecko) Engine.

Now it can toggle Windows Media Prefs in K-Meleon 74.0, 75.0, 75.1, 76.0, and beyond.

# K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage2)
#
# ---------- WindowsMediaFoundation.kmm
# ---------- Disable Windows Media Foundation (Flash Default Player) ----------------
#
# Dependencies : main.kmm
# Resources :
# Preferences : "extensions.lastPlatformVersion"
# "media.windows-media-foundation.enabled"
# "media.windows-media-foundation.play-stand-alone"
# "media.windows-media-foundation.use-dxva"
# "media.wmf.enabled"
# Author : George_Hall
# Version : 1.0 2016-06-16
# -------------------------------------------------------------------------

_WindowsMediaFoundation_toggle {

if (getpref(STRING, "extensions.lastPlatformVersion" ) >= "44.0") {
menuchecked=getpref( BOOL , "media.wmf.enabled" )==false;
togglepref(BOOL, "media.wmf.enabled") ; } else {

if (getpref(STRING, "extensions.lastPlatformVersion" ) >= "38.0") {
menuchecked=getpref( BOOL , "media.windows-media-foundation.enabled" )==false;
togglepref(BOOL, "media.windows-media-foundation.enabled") ;
togglepref(BOOL, "media.windows-media-foundation.use-dxva") ; } else {

if (getpref(STRING, "extensions.lastPlatformVersion" ) < "38.0") {
menuchecked=getpref( BOOL , "media.windows-media-foundation.enabled" )==false;
togglepref(BOOL, "media.windows-media-foundation.enabled") ;
togglepref(BOOL, "media.windows-media-foundation.play-stand-alone") ;
togglepref(BOOL, "media.windows-media-foundation.use-dxva") ; }}

}

_WindowsMediaFoundation_BuildMenu {
setmenu("&Edit", macro, _("Disable Windows Media Foundation (Flash Default Player)"), _WindowsMediaFoundation_toggle, -1);
}

$OnStartup=$OnStartup."_WindowsMediaFoundation_perfcheck;";
$OnInit=$OnInit."_WindowsMediaFoundation_BuildMenu;";
# -------------------------------------------------------------------------
$macroModules=$macroModules."WindowsMediaFoundation;";

The Line if (getpref(STRING, "extensions.lastPlatformVersion" ) >= "44.0") {
menuchecked=getpref( BOOL , "media.wmf.enabled" )==false;
togglepref(BOOL, "media.wmf.enabled") ; } else {

tests if we are using Firefox 44.0 and above.

I added this line so when Dorian updates K-Meleon engine beyond beyond 38.x ESR
so the macro would work when that change is made.

This change was needed becuase "media.wmf.enabled" replaced "media.windows-media-foundation.enabled" in Firefox 44.0.

Also, "media.windows-media-foundation.play-stand-alone" and "media.windows-media-foundation.use-dxva" were removed in Firefox 44.0



Edited 3 time(s). Last edit at 06/16/2016 12:44PM by George_Hall.

Attachments: WindowsMediaFoundation.kmm (1.9 KB)  
Options: ReplyQuote
Re: Disable Windows Media Foundation (Flash Default Player)
Posted by: thomase13
Date: June 29, 2016 03:35AM

Hi George,

Do you know if this solves the problem using Twitter and other sites' video playback in Windows XP or earlier?

Thanks,
Thomas

Options: ReplyQuote
Re: Disable Windows Media Foundation (Flash Default Player)
Posted by: Baaa
Date: August 12, 2016 06:25PM

Hi! Good job! But you should make these prefs to false for full blocking of HTML5:

user_pref("media.autoplay.enabled";false);
user_pref("media.fragmented-mp4.enabled";false);
user_pref("media.ogg.enabled";false);
user_pref("media.wave.enabled";false);
user_pref("media.webm.enabled";false);
user_pref("media.windows-media-foundation.enabled";false);

Options: ReplyQuote
Re: Disable Windows Media Foundation (Flash Default Player)
Posted by: George_Hall
Date: August 18, 2016 02:15AM

Quote
Baaa
Hi! Good job! But you should make these prefs to false for full blocking of HTML5:

user_pref("media.autoplay.enabled";false);
user_pref("media.fragmented-mp4.enabled";false);
user_pref("media.ogg.enabled";false);
user_pref("media.wave.enabled";false);
user_pref("media.webm.enabled";false);
user_pref("media.windows-media-foundation.enabled";false);

I did not block all of HTML5 on purpose becuase videos sites wont work with the flash player. This just allows the ones that do to use the flash player as default.

If i wanted to block HTML5 entirely i would call HTML5 On/Off or something.

Options: ReplyQuote
Re: Disable Windows Media Foundation (Flash Default Player)
Posted by: George_Hall
Date: September 23, 2016 11:33AM

Quote
George_Hall
I updated WindowsMediaFoundation.kmm to test for Version of the Firefox (Gecko) Engine.

Now it can toggle Windows Media Prefs in K-Meleon 74.0, 75.0, 75.1, 76.0, and beyond.

# K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage2)
#
# ---------- WindowsMediaFoundation.kmm
# ---------- Disable Windows Media Foundation (Flash Default Player) ----------------
#
# Dependencies : main.kmm
# Resources :
# Preferences : "extensions.lastPlatformVersion"
# "media.windows-media-foundation.enabled"
# "media.windows-media-foundation.play-stand-alone"
# "media.windows-media-foundation.use-dxva"
# "media.wmf.enabled"
# Author : George_Hall
# Version : 1.0 2016-06-16
# -------------------------------------------------------------------------

_WindowsMediaFoundation_toggle {

if (getpref(STRING, "extensions.lastPlatformVersion" ) >= "44.0") {
menuchecked=getpref( BOOL , "media.wmf.enabled" )==false;
togglepref(BOOL, "media.wmf.enabled") ; } else {

if (getpref(STRING, "extensions.lastPlatformVersion" ) >= "38.0") {
menuchecked=getpref( BOOL , "media.windows-media-foundation.enabled" )==false;
togglepref(BOOL, "media.windows-media-foundation.enabled") ;
togglepref(BOOL, "media.windows-media-foundation.use-dxva") ; } else {

if (getpref(STRING, "extensions.lastPlatformVersion" ) < "38.0") {
menuchecked=getpref( BOOL , "media.windows-media-foundation.enabled" )==false;
togglepref(BOOL, "media.windows-media-foundation.enabled") ;
togglepref(BOOL, "media.windows-media-foundation.play-stand-alone") ;
togglepref(BOOL, "media.windows-media-foundation.use-dxva") ; }}

}

_WindowsMediaFoundation_BuildMenu {
setmenu("&Edit", macro, _("Disable Windows Media Foundation (Flash Default Player)"), _WindowsMediaFoundation_toggle, -1);
}

$OnStartup=$OnStartup."_WindowsMediaFoundation_perfcheck;";
$OnInit=$OnInit."_WindowsMediaFoundation_BuildMenu;";
# -------------------------------------------------------------------------
$macroModules=$macroModules."WindowsMediaFoundation;";

The Line if (getpref(STRING, "extensions.lastPlatformVersion" ) >= "44.0") {
menuchecked=getpref( BOOL , "media.wmf.enabled" )==false;
togglepref(BOOL, "media.wmf.enabled") ; } else {

tests if we are using Firefox 44.0 and above.

I added this line so when Dorian updates K-Meleon engine beyond beyond 38.x ESR
so the macro would work when that change is made.

This change was needed becuase "media.wmf.enabled" replaced "media.windows-media-foundation.enabled" in Firefox 44.0.

Also, "media.windows-media-foundation.play-stand-alone" and "media.windows-media-foundation.use-dxva" were removed in Firefox 44.0

I added "media.fragmented-mp4.enabled"
and "media.fragmented-mp4.exposed" becuase K-Meleon 76 RC did not play some mp4 files with the flash player.

# K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage2)
#
# ---------- WindowsMediaFoundation.kmm
# ---------- Disable Windows Media Foundation (Flash Default Player) ----------------
#
# Dependencies : main.kmm
# Resources :
# Preferences : "extensions.lastPlatformVersion"
# "media.fragmented-mp4.enabled"
# "media.fragmented-mp4.exposed"
# "media.windows-media-foundation.enabled"
# "media.windows-media-foundation.play-stand-alone"
# "media.windows-media-foundation.use-dxva"
# "media.wmf.enabled"
# Author : George_Hall
# Version : 2.0 2016-09-22
# -------------------------------------------------------------------------

_WindowsMediaFoundation_toggle {

if (getpref(STRING, "extensions.lastPlatformVersion" ) >= "44.0") {
menuchecked=getpref( BOOL , "media.wmf.enabled" )==false;
togglepref(BOOL, "media.wmf.enabled") ; } else {

if (getpref(STRING, "extensions.lastPlatformVersion" ) >= "38.0") {
menuchecked=getpref( BOOL , "media.windows-media-foundation.enabled" )==false;
togglepref(BOOL, "media.fragmented-mp4.enabled") ;
togglepref(BOOL, "media.fragmented-mp4.exposed") ;
togglepref(BOOL, "media.windows-media-foundation.enabled") ;
togglepref(BOOL, "media.windows-media-foundation.use-dxva") ; } else {

if (getpref(STRING, "extensions.lastPlatformVersion" ) < "38.0") {
menuchecked=getpref( BOOL , "media.windows-media-foundation.enabled" )==false;
togglepref(BOOL, "media.windows-media-foundation.enabled") ;
togglepref(BOOL, "media.windows-media-foundation.play-stand-alone") ;
togglepref(BOOL, "media.windows-media-foundation.use-dxva") ; }}

}

_WindowsMediaFoundation_BuildMenu {
setmenu("&Edit", macro, _("Disable Windows Media Foundation (Flash Default Player)"), _WindowsMediaFoundation_toggle, -1);
}

$OnStartup=$OnStartup."_WindowsMediaFoundation_perfcheck;";
$OnInit=$OnInit."_WindowsMediaFoundation_BuildMenu;";
# -------------------------------------------------------------------------
$macroModules=$macroModules."WindowsMediaFoundation;";

Attachments: WindowsMediaFoundation.kmm (2.1 KB)  
Options: ReplyQuote
Re: Disable Windows Media Foundation (Flash Default Player)
Posted by: George_Hall
Date: September 23, 2016 05:50PM

Quote
George_Hall

I added "media.fragmented-mp4.enabled"
and "media.fragmented-mp4.exposed" becuase K-Meleon 76 RC did not play some mp4 files with the flash player.

# K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage2)
#
# ---------- WindowsMediaFoundation.kmm
# ---------- Disable Windows Media Foundation (Flash Default Player) ----------------
#
# Dependencies : main.kmm
# Resources :
# Preferences : "extensions.lastPlatformVersion"
# "media.fragmented-mp4.enabled"
# "media.fragmented-mp4.exposed"
# "media.windows-media-foundation.enabled"
# "media.windows-media-foundation.play-stand-alone"
# "media.windows-media-foundation.use-dxva"
# "media.wmf.enabled"
# Author : George_Hall
# Version : 2.0 2016-09-22
# -------------------------------------------------------------------------

_WindowsMediaFoundation_toggle {

if (getpref(STRING, "extensions.lastPlatformVersion" ) >= "44.0") {
menuchecked=getpref( BOOL , "media.wmf.enabled" )==false;
togglepref(BOOL, "media.wmf.enabled") ; } else {

if (getpref(STRING, "extensions.lastPlatformVersion" ) >= "38.0") {
menuchecked=getpref( BOOL , "media.windows-media-foundation.enabled" )==false;
togglepref(BOOL, "media.fragmented-mp4.enabled") ;
togglepref(BOOL, "media.fragmented-mp4.exposed") ;
togglepref(BOOL, "media.windows-media-foundation.enabled") ;
togglepref(BOOL, "media.windows-media-foundation.use-dxva") ; } else {

if (getpref(STRING, "extensions.lastPlatformVersion" ) < "38.0") {
menuchecked=getpref( BOOL , "media.windows-media-foundation.enabled" )==false;
togglepref(BOOL, "media.windows-media-foundation.enabled") ;
togglepref(BOOL, "media.windows-media-foundation.play-stand-alone") ;
togglepref(BOOL, "media.windows-media-foundation.use-dxva") ; }}

}

_WindowsMediaFoundation_BuildMenu {
setmenu("&Edit", macro, _("Disable Windows Media Foundation (Flash Default Player)"), _WindowsMediaFoundation_toggle, -1);
}

$OnStartup=$OnStartup."_WindowsMediaFoundation_perfcheck;";
$OnInit=$OnInit."_WindowsMediaFoundation_BuildMenu;";
# -------------------------------------------------------------------------
$macroModules=$macroModules."WindowsMediaFoundation;";

I updated the macro for K-Meleon 75.0 and 75.1 which use Gecko 31 ESR with "media.fragmented-mp4.enabled" without "media.fragmented-mp4.exposed" because "media.fragmented-mp4.exposed" is disabled by default.

While K-Meleon 76 with uses Gecko 38 ESR, both "media.fragmented-mp4.enabled"
and "media.fragmented-mp4.exposed" are enabled by default.

# K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage2)
#
# ---------- WindowsMediaFoundation.kmm
# ---------- Disable Windows Media Foundation (Flash Default Player) ----------------
#
# Dependencies : main.kmm
# Resources :
# Preferences : "extensions.lastPlatformVersion"
# "media.fragmented-mp4.enabled"
# "media.fragmented-mp4.exposed"
# "media.windows-media-foundation.enabled"
# "media.windows-media-foundation.play-stand-alone"
# "media.windows-media-foundation.use-dxva"
# "media.wmf.enabled"
# Author : George_Hall
# Version : 2.0.1 2016-09-23
# -------------------------------------------------------------------------

_WindowsMediaFoundation_toggle {

if (getpref(STRING, "extensions.lastPlatformVersion" ) >= "44.0") {
menuchecked=getpref( BOOL , "media.wmf.enabled" )==false;
togglepref(BOOL, "media.wmf.enabled") ; } else {

if (getpref(STRING, "extensions.lastPlatformVersion" ) >= "38.0") {
menuchecked=getpref( BOOL , "media.windows-media-foundation.enabled" )==false;
togglepref(BOOL, "media.fragmented-mp4.enabled") ;
togglepref(BOOL, "media.fragmented-mp4.exposed") ;
togglepref(BOOL, "media.windows-media-foundation.enabled") ;
togglepref(BOOL, "media.windows-media-foundation.use-dxva") ; } else {

if (getpref(STRING, "extensions.lastPlatformVersion" ) < "38.0") {
menuchecked=getpref( BOOL , "media.windows-media-foundation.enabled" )==false;
togglepref(BOOL, "media.fragmented-mp4.enabled") ;
togglepref(BOOL, "media.windows-media-foundation.enabled") ;
togglepref(BOOL, "media.windows-media-foundation.play-stand-alone") ;
togglepref(BOOL, "media.windows-media-foundation.use-dxva") ; }}

}

_WindowsMediaFoundation_BuildMenu {
setmenu("&Edit", macro, _("Disable Windows Media Foundation (Flash Default Player)"), _WindowsMediaFoundation_toggle, -1);
}

$OnStartup=$OnStartup."_WindowsMediaFoundation_perfcheck;";
$OnInit=$OnInit."_WindowsMediaFoundation_BuildMenu;";
# -------------------------------------------------------------------------
$macroModules=$macroModules."WindowsMediaFoundation;";



Edited 1 time(s). Last edit at 09/24/2016 07:10AM by George_Hall.

Attachments: WindowsMediaFoundation.kmm (2.2 KB)  
Options: ReplyQuote


K-Meleon forum is powered by Phorum.