Closed Bug 472495 Opened 11 years ago Closed 11 years ago

Windows Media Player Plugin not showing video if any JS Content Policy is present

Categories

(Core :: DOM: Core & HTML, defect, P2)

x86
Windows XP
defect

Tracking

()

RESOLVED DUPLICATE of bug 475299

People

(Reporter: mao, Assigned: jst)

References

()

Details

On latest trunk, if a JS content policy is registered (either NoScript, GreaseMonkey, AdBlock Plus or even a NOP shouldLoad = shouldProcess = function() { return 1 }) the WMP plugin doesn't show any video, but still streams the audio at
http://www.nasa.gov/multimedia/nasatv/index.html

AdBlock Plus does something, probably from
http://hg.mozdev.org/adblockplus/file/cb7fddd4663d/src/chrome/content/policy.js#l122
on, which prevents this bug from be triggered, but I can't tell what (I suspect causing some early initialization).

Anyway if you whitelist the page ("Disable on this page only"), which should make ABP return before that line, the bug appears.
GreaseMonkey and NoScript show the bug in their default configuration.

Steps to reproduce:
1) Install latest AdBlock Plus dev build from http://adblockplus.org/devbuilds/
2) Install http://port25.technet.com/pages/windows-media-player-firefox-plugin-download.aspx
3) Go to http://www.nasa.gov/multimedia/nasatv/index.html (video and audio should play normally)
4) Click on the AdBlock Plus toolbar drop-down and select "Disable on this page only"
5) Reload the page

Expected result: video and audio should play
Actual result: video is blank, while audio is still present

BuildId:
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2a1pre) Gecko/20090106 Firefox/3.1b2pre ID:20090106034601

Microsoft® Windows Media Player Firefox Plugin 1.0.0.8
Just verified that the same symptoms are reproducible on Shiretoko, therefore nominating for 1.9.1.
Flags: blocking1.9.1?
What exactly is this Media Player Firefox Plugin? I see Windows Media Player Plug-in Dynamic Link Library 3.0.2.629 in plug-in list, that is certainly part of the Media Player itself. Tried Minefield build 20090105 and 20090106 on Windows XP, works fine regardless of Adblock Plus settings.

I would suspect that "Show tabs on Flash and Java" option is what "cures" that issue, it inserts an element before the object which forces a reflow.
(In reply to comment #2)
> What exactly is this Media Player Firefox Plugin? 
It's apparently the most recent WMP plugin, and the one recommended for Windows Media Player >= 10 here:
https://addons.mozilla.org/en-US/firefox/browse/type:7

> I would suspect that "Show tabs on Flash and Java" option is what "cures" that
> issue, it inserts an element before the object which forces a reflow.

I suspected that too, and disabled that option before submitting this bug with no change, sorry for not including this observation in my report. Also referencing aContext.ownerDocument.defaultView.(top.)location.href on the window (which is the only other relevant DOM thing you do after the whitelist check) doesn't suffice to prevent the breakage.

Also notice that the stable ABP version (1.0+...) seems to hide the bug no matter the settings (even if the page is whitelisted).
(In reply to comment #3)
> Also notice that the stable ABP version (1.0+...) seems to hide the bug no
> matter the settings (even if the page is whitelisted).

That's strange, the only changes since Adblock Plus 1.0 that might have an effect here are two small object tab changes.
You're right, ABP 1.0 breaks the movie just like ABP 1.1 as soon as I whitelist the page and reload, no matter if the object tab preference is checked or not... Any idea?
@Wladimir:
I narrowed the "bug shadow" effect to something you do in the DataContainer.getDataForWindow(wnd) from processNode().
Consider that match is a WhitelistFilter for a .gov site, objTab is false per my option, and even commenting the "var nodeData =" assignment the shadowing effect still happens. As soon as I eliminate the getDataForWindow() call (and make up for the missing data variable) the effect disappear and the bug is shown.

Still investigating, unless you've got a new idea.
OK, believe it or not, the mere presence of your DOMNodeRemoved listener (no
matter the code inside the handler itself, it can be empty) causes the bug to
be shadowed. Just failing to register it causes the bug to be shown.
This plugin object does NOT get removed (nor, obviously, passed to the event
handler), BTW.

Tempted to register my own dummy DOMNodeRemoved listener as a cheap (?)
work-around, but has somebody any clue about what's going on there?

My guess is that this has something to do with the video placeholder image
being removed by Nasa's JavaScript as the movie start playing...
Oh, I have a DOMNodeRemoved listener? That's anything but cheap, I should check whether I can get rid of it...
WMP not working with several of our most popular extensions is bad. Marking this a blocker.
Assignee: nobody → jst
Flags: blocking1.9.1? → blocking1.9.1+
Priority: -- → P2
This turned out to be a dupe of bug 475299.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 475299
No longer blocks: abp
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.