Unexpected behaviour - embedded Flash abc.net.au
-
- Senior Member
- Posts: 240
- Joined: Fri Jul 03, 2009 7:20 am
Unexpected behaviour - embedded Flash abc.net.au
A heads-up about unexpected embedded flash video placeholder behaviour.
NS 1.9.9.11, all defaults except - block all "Embedded" on trusted.
abc.net.au whitelisted.
Steps to show unexpected behaviour:
Navigate to
http://www.abc.net.au/news/video/2009/10/14/2714488.htm,
Flash placeholder displays, choose Temp Allow blocked embedded, only audio plays. Expect video presentation, so refresh page.
Video presentation plays.
A variation of this isolated audio is on this page
http://www.abc.net.au/news/stories/2009 ... 714431.htm
Steps to show:
Choose Video link in the page
Flash placeholder is then displayed.
Choose Temp Allow Flash Embedded, audio but no video plays.
Refreshing page (or the video link - either is the same behaviour) reverts status to no placeholder. Refreshing again shows video playing as expected.
Refreshing page reverts to no video.
Refreshing page shows video as expected
Repeat ad infinitum.
Sorry I can't be around to follow up but I thought these examples were notable.
NS 1.9.9.11, all defaults except - block all "Embedded" on trusted.
abc.net.au whitelisted.
Steps to show unexpected behaviour:
Navigate to
http://www.abc.net.au/news/video/2009/10/14/2714488.htm,
Flash placeholder displays, choose Temp Allow blocked embedded, only audio plays. Expect video presentation, so refresh page.
Video presentation plays.
A variation of this isolated audio is on this page
http://www.abc.net.au/news/stories/2009 ... 714431.htm
Steps to show:
Choose Video link in the page
Flash placeholder is then displayed.
Choose Temp Allow Flash Embedded, audio but no video plays.
Refreshing page (or the video link - either is the same behaviour) reverts status to no placeholder. Refreshing again shows video playing as expected.
Refreshing page reverts to no video.
Refreshing page shows video as expected
Repeat ad infinitum.
Sorry I can't be around to follow up but I thought these examples were notable.
Last edited by Grumpy Old Lady on Sat Oct 24, 2009 5:09 am, edited 1 time in total.
Mozilla/5.0 (X11; U; Linux i686; en-AU; rv:1.9.0.14) Gecko/2009090216 Ubuntu/9.04 (jaunty) Firefox/3.0.14
Re: Unexpected behaviour - embedded Flash abc.net.au
Both working as expected for me. Getting both audio & video, first time.
SeaMonkey 1.1.18, NoScript 1.9.9.10, Win XP.
EDIT: No issue with NoScript 1.9.9.11 either.
(Can't test SeaMonkey 2 at the moment.)
SeaMonkey 1.1.18, NoScript 1.9.9.10, Win XP.
EDIT: No issue with NoScript 1.9.9.11 either.
(Can't test SeaMonkey 2 at the moment.)
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball NoScript FlashGot AdblockPlus
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090825 SeaMonkey/1.1.18
-
- Ambassador
- Posts: 1586
- Joined: Fri Mar 20, 2009 4:47 am
- Location: Colorado, USA
Re: Unexpected behaviour - embedded Flash abc.net.au
Confirmed.Grumpy Old Lady wrote:http://www.abc.net.au/news/video/2009/10/14/2714488.htm,
Flash placeholder displays, choose Temp Allow blocked embedded, only audio plays. Expect video presentation, so refresh page.
Video presentation plays.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3
NoScript 1.9.9.11
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3
- Giorgio Maone
- Site Admin
- Posts: 9454
- Joined: Wed Mar 18, 2009 11:22 pm
- Location: Palermo - Italy
- Contact:
Re: Unexpected behaviour - embedded Flash abc.net.au
It's the expected behavior, unluckily.
The size of the player is set to 0 pixels initially, and only adjusted as soon as the page finishes to load.
When you click the placeholder is already too late, and player's height sticks to 0.
However, NoScript the Almighty (TM) will save your day again, thanks to its powerful surrogate scripts.
Just open about:config and create the following two string preferences:
noscript.surrogate.abc_video.sources
@*.abc.net.au
noscript.surrogate.abc_video.replacement
if (!document.getElementById("inpageplayerObject")) document.addEventListener("DOMContentLoaded", function() { document.documentElement.firstChild.appendChild(document.createElement("style")).innerHTML = "#inpageplayerObject: { height: 338px !important}"; }, false);
The size of the player is set to 0 pixels initially, and only adjusted as soon as the page finishes to load.
When you click the placeholder is already too late, and player's height sticks to 0.
However, NoScript the Almighty (TM) will save your day again, thanks to its powerful surrogate scripts.
Just open about:config and create the following two string preferences:
noscript.surrogate.abc_video.sources
@*.abc.net.au
noscript.surrogate.abc_video.replacement
if (!document.getElementById("inpageplayerObject")) document.addEventListener("DOMContentLoaded", function() { document.documentElement.firstChild.appendChild(document.createElement("style")).innerHTML = "#inpageplayerObject: { height: 338px !important}"; }, false);
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729)
Re: Unexpected behaviour - embedded Flash abc.net.au
NoScript the Almighty (TM)
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball NoScript FlashGot AdblockPlus
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090825 SeaMonkey/1.1.18
Re: Unexpected behaviour - embedded Flash abc.net.au
Now with SeaMonkey 2, I see what you're saying.
Surrogates aside, IMO the behavior is wrong.
Going to the site for the first time (as I did today), I did not know what to expect.
And could quite easily have missed entirely that there was a video on that page (in the first example).
And once I clicked the placeholder & nothing further happened, at that point, I may have just given up, figuring it to be a bum page.
The second example still worked for me.
With SeaMonkey 1.1.18, & NP-MSWMP.dll, the video played, embedded in the browser window.
With SeaMonkey 2, & npdsplay.dll, the video played, opening externally into Windows Media Player.
Surrogates aside, IMO the behavior is wrong.
Going to the site for the first time (as I did today), I did not know what to expect.
And could quite easily have missed entirely that there was a video on that page (in the first example).
And once I clicked the placeholder & nothing further happened, at that point, I may have just given up, figuring it to be a bum page.
The second example still worked for me.
With SeaMonkey 1.1.18, & NP-MSWMP.dll, the video played, embedded in the browser window.
With SeaMonkey 2, & npdsplay.dll, the video played, opening externally into Windows Media Player.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball NoScript FlashGot AdblockPlus
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.4pre) Gecko/20091007 SeaMonkey/2.0pre
- Giorgio Maone
- Site Admin
- Posts: 9454
- Joined: Wed Mar 18, 2009 11:22 pm
- Location: Palermo - Italy
- Contact:
Re: Unexpected behaviour - embedded Flash abc.net.au
The only approach I can try to mitigate this and similar cases without using a surrogate is checking the size and visibility of the object as soon as I restore it and, if it's too small (<= 1px) or invisible, automatically refresh the page.
Will test this in next dev build.
Will test this in next dev build.
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729)
-
- Senior Member
- Posts: 240
- Joined: Fri Jul 03, 2009 7:20 am
Re: Unexpected behaviour - embedded Flash abc.net.au
Ah, the old Zero Pixel trick ;-) I can live with that.
I can now see that the second example is a nice way for the site to attempt to "roll up" the video until it's needed. Oh well, at least they're trying to be cool and hip etc :-)
However, for completeness, I tested your mighty sword, oh Great One®, and it failed :-( With your surrogate string in config, there was no change in the behaviour reported in my original post.
I copied/pasted all from your post, so typos are eliminated as an error source.
But this result, for me, is just feeding back fyi; I'm not that fussed about adding a surrogate for abc.net.au videos because I don't really mind hitting refresh occasionally.
I can now see that the second example is a nice way for the site to attempt to "roll up" the video until it's needed. Oh well, at least they're trying to be cool and hip etc :-)
However, for completeness, I tested your mighty sword, oh Great One®, and it failed :-( With your surrogate string in config, there was no change in the behaviour reported in my original post.
I copied/pasted all from your post, so typos are eliminated as an error source.
But this result, for me, is just feeding back fyi; I'm not that fussed about adding a surrogate for abc.net.au videos because I don't really mind hitting refresh occasionally.
Mozilla/5.0 (X11; U; Linux i686; en-AU; rv:1.9.0.14) Gecko/2009090216 Ubuntu/9.04 (jaunty) Firefox/3.0.14
-
- Senior Member
- Posts: 240
- Joined: Fri Jul 03, 2009 7:20 am
Re: Unexpected behaviour - embedded Flash abc.net.au
Quoth therube
http://www.abc.net.au/news/wa/default.htm
See the block of thumbs around 2/3 down the page with the title "Video"
- so the user is already looking for video when they arrive at the first example.
Well, it's a little bit less than magic-meatery, because these links are all reached via buttons entitled "video" or similar - as in this kind of pageSurrogates aside, IMO the behavior is wrong.
Going to the site for the first time (as I did today), I did not know what to expect.
And could quite easily have missed entirely that there was a video on that page (in the first example).
http://www.abc.net.au/news/wa/default.htm
See the block of thumbs around 2/3 down the page with the title "Video"
- so the user is already looking for video when they arrive at the first example.
I agree that a novice NS user would be stretched at this point.And once I clicked the placeholder & nothing further happened, at that point, I may have just given up, figuring it to be a bum page.
Mozilla/5.0 (X11; U; Linux i686; en-AU; rv:1.9.0.14) Gecko/2009090216 Ubuntu/9.04 (jaunty) Firefox/3.0.14
Re: Unexpected behaviour - embedded Flash abc.net.au
I was curious why it is working in 1.8.1. There is a resize functionGiorgio Maone wrote:It's the expected behavior, unluckily.
Code: Select all
function resize16x9 (element) {
if (typeof element == 'undefined') return;
if (typeof element == 'string') {
if (element = document.getElementById(element));
else return;
}
width = element.clientWidth;
height = Math.round((width/16)*9);
element.style.height = height+'px';
}
Code: Select all
var so = new SWFObject(swfurl, inpageplayer+'Object', width, height, '8', '#000000', true);
so.addParam('allowFullScreen', 'true');
so.addVariable('mediaURL', url);
so.addVariable('autoPlay', autoplay);
so.write(inpageplayer);
resize16x9(inpageplayer+'Object');
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.20) Gecko/20081217 Firefox/2.0.0.20
- Giorgio Maone
- Site Admin
- Posts: 9454
- Joined: Wed Mar 18, 2009 11:22 pm
- Location: Palermo - Italy
- Contact:
Re: Unexpected behaviour - embedded Flash abc.net.au
Not specifically. I guess I could try to trace it back from http://mxr.mozilla.org, but I've got no time for this currently.al_9x wrote: The problem seems to be that while in 1.8.1 clientWidth returns the proper width, in 1.9.1 it returns 0. Do you know why?
Chalk it up to "layout differences between Gecko 1.8.x and Gecko 1.9.x, probably due to HTML 5 conformance".
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729)
Re: Unexpected behaviour - embedded Flash abc.net.au
In 1.9.9.12, the player is hidden when activated, and only appears when the page is resized.
Do you think you'll get a chance to investigate the root cause of this, why the dummy node doesn't return the right size? Script base instantiation seems to be getting more common, and therefore also post instantiation scripting of the dummy.
Do you think you'll get a chance to investigate the root cause of this, why the dummy node doesn't return the right size? Script base instantiation seems to be getting more common, and therefore also post instantiation scripting of the dummy.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.20) Gecko/20081217 Firefox/2.0.0.20
- Giorgio Maone
- Site Admin
- Posts: 9454
- Joined: Wed Mar 18, 2009 11:22 pm
- Location: Palermo - Italy
- Contact:
Re: Unexpected behaviour - embedded Flash abc.net.au
@al_9x:
this is a particular case, where the size of the object is set after it's inserted in the DOM (and blocked).
.12 and above work around by forcing a quick (cache) page reload if the object is not properly sized when inserted in the DOM.
This is working fine in 3.5, but apparently failed (checked after your report) in 3.0.
Investigating...
this is a particular case, where the size of the object is set after it's inserted in the DOM (and blocked).
.12 and above work around by forcing a quick (cache) page reload if the object is not properly sized when inserted in the DOM.
This is working fine in 3.5, but apparently failed (checked after your report) in 3.0.
Investigating...
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729)
Re: Unexpected behaviour - embedded Flash abc.net.au
I didn't try 3.0. Just verified it in a new profile, 3.5.4, 1.9.9.14, XP32 SP3. When I activate the placeholder, the player starts playing but is invisible (0 size, no space in the layout), it appears when you resize the page.Giorgio Maone wrote:This is working fine in 3.5, but apparently failed (checked after your report) in 3.0.
Investigating...
I'll drop this, but, the setting of the size after instantiation and insertion is not the problem, per se. Were it set to a non-zero value, I think it would be fine. The issue is that the hight is set to a 9/16 * clientWidth, and the clientWidth returns 0, starting with Fx3.Giorgio Maone wrote:this is a particular case, where the size of the object is set after it's inserted in the DOM (and blocked).
In cases when you are forcing a reload (I think there are other situations besides this) and "automatic reload" is off, it would be nice to have some sort of optional notification, since the reload is unexpected and you can't tell that it happened.Giorgio Maone wrote:work around by forcing a quick (cache) page reload
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.20) Gecko/20081217 Firefox/2.0.0.20
Re: Unexpected behaviour - embedded Flash abc.net.au
Heh. That's neat. (Confirmed.)the player starts playing but is invisible (0 size, no space in the layout), it appears when you resize the page
FWIW, https://bugzilla.mozilla.org/buglist.cg ... +disappear
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball NoScript FlashGot AdblockPlus
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.4) Gecko/20091017 SeaMonkey/2.0