Closed Bug 99063 Opened 23 years ago Closed 23 years ago

OBJECT tag support is completely buggy!

Categories

(Core Graveyard :: Plug-ins, defect, P2)

defect

Tracking

(Not tracked)

VERIFIED FIXED
mozilla0.9.5

People

(Reporter: spamcop, Assigned: peterlubczynski-bugs)

References

()

Details

(Whiteboard: [PDT+])

Attachments

(1 file)

From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.3) Gecko/20010801
BuildID:    2001080110

Okay, two URLs are involved:
http://tgos.org/object/index.html and
http://tgos.org/object/index2.html

On the server are 3 RealMedia files:
1. test1.rm, a RealAudio file, 33kb/s mono
2. test2.rm, a RealAudio file, 44kb/s stereo
3. test.rpm, a RealPlayer plugin file, that contains the full URL to test2.rm



Reproducible: Always

Steps to Reproduce:
When you go to the index.html page once with IE and once with Mozilla, you will
notice that they don't play the same file. IE plays the MONO file, which was
embedded using OBJECT tag, using the CLASSID paramter and giving all other
parameters with PARAM tags. When you visit tihs page with Mozilla, you hear the
stereo file, meaning the EMBED tag was used (which is *NO* official tag, it's
not even present in the HTML4 specification!). In case of the EMBED tag I need
this RPM file, because when I directly refer to the RM file, it won't work! The
RealPlayer plugin seems to expect a RPM file.

Now visit the index2.html page. The first way to embed an object, using classid
doesn't work at all. The second and third one don't work either, because the
PARAM tag content is NOT forwarded to the plugin, it's ignored!

The 4th and 5th example look as if they would work, but they don't work as
although once test1.rm and once test.rpm is given in the data paramter of the
object tag, in both cases the plugin can't find the file. Further those two are
NOT valid HTML code, because the 'console' and 'controls' paramter where given
directly in the OBJECT tag, but those parameter don't exist according to
specification, one would have to give them via PARAM tag (which was done in the
2nd and 3rd example and as you can see, it didn't work!).

In the last example even the SRC parameter was given in the OBJECT tag and now
it works, but such a paramter doesn't exist either according to HTML4 specification.


Actual Results:  The last one plays, all other either don't find the file (4 and
5), ignore the PARAM tags (2 and 3) or don't start the plugin at all (1).

Expected Results:  The first 3 one should work, all others are no valid HTML4
code and should be ignored.

I hate this multmedia crap, but either Mozilla is a real HTML4 browser or it's
not and if it is, it must support the OBJECT tag the way it was defined.
Forget to mention that: Mozilla treats the OBJECT tag like the EMBED tag, where
all paramters are giving directly with the tag, but it should be treated like
the APPLET tag where all paramters are provided via PARAM tags.
bug 46569 ?
I don't know, only the first example is as bug 46569, the other ones aren't and
the ignored PARAM tags aren't mentioned in this bug at all.

This is how it works with IE:

<object id="player1" classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA"
 height="26" width="44">
	<param name="controls" value="PlayButton">
	<param name="console" value="clip1">
	<param name="src" value="test1.rm">
</object>

However, according to bug 46569 Mozilla doesn't understand classid (also I
wonder why, because this *IS* valid according to HTML4 specification), but on my
page there's also the other example:

<object id="player2" data="test.rpm" type="audio/x-pn-realaudio-plugin"
 height="26" width="44">
	<param name="controls" value="PlayButton">
	<param name="console" value="clip2">
</object>

This doesn't work either and DATA as well as TYPE are specified. It should work
this way, but it doesn't, because the two PARAM tags are ignored. Why?

Okay, now look at this:

<object id="player4" data="test1.rm" type="audio/x-pn-realaudio-plugin"
 height="26" width="44" console="clip4" controls="PlayButton">
</object>

This creates the buttons correctly, but I use two illegal arguments CONSOLE and
CONTROLS, which only RealPlayer understands, they are not generetic OBJECT
paramters and thus should be provided by PARAM tags. However that way it looks
like it works, but it doesn't. The plugin can't find the file. The only code
that works is:

<object id="player5" data="test.rpm" type="audio/x-pn-realaudio-plugin"
 height="26" width="44" console="clip6" controls="PlayButton" src="test1.rm">
</object>

Because now I even added the SRC parameter, which should be given via PARAM. SRC
is also not allowed for OBJECTS, that's what DATA is for, but DATA seems to be
ignored as well. So while the above code works, it will never pass the W3C HTML4
validation, not even the loose one.

On IE5.5 even the following works:

<object id="player1" type="audio/x-pn-realaudio-plugin"
 height="26" width="44">
	<param name="controls" value="PlayButton">
	<param name="console" value="clip1">
	<param name="src" value="test1.rm">
</object>

So no classid is necessary, but if the PARAM tags are ignored it can't work in
Mozilla and that is the case. However, I'm not allowed if the DATA parameter can
be omitted.
Bug 96580 and bug 99047 suggest that we have some support for "data" and
"param".  I'm not sure why it isn't working in this case.
Component: Browser-General → Plug-ins
Keywords: html4
In case of bug 99047 it's an APPLET tag, not an OBJECT tag. Maybe APPLET does
not ignore the PARAM tags, but OBJECT does. And in case of bug 99047 no PARAM
tags are used, just OBJECT together with DATA and TYPE parameter.
Keywords: html4
BTW, please pay attention to the example code I posted to bug 46569 as well as
look at the following page: http://tgos.org/object/index4.html

This page works with Mozilla, but again, the OBJECT tag contains invalid
arguments and even worse, it contains not DATA paramter at all, just a not valid
SRC paramter (OBJECT has no SRC paramter). I guess that's because the plugin
expect a value named SRC that contains the URL to the file and usually one would
provided this through the PARAM tag. In case of IE it also works to just specify
the TYPE attribute, no DATA attribute and then give the file name via PARAM tag.
-> plugins
Assignee: asa → av
QA Contact: doronr → shrir
I don't think that this is the problem of the plugin. The problem is that
Mozilla does not forward the value of the PARAM source tag to the plugin. If the
value is in the OBJECT tag itself, it /is/ forwarded. Or are you talking about
the plugin-implementation code on Mozilla's side?
tgos is absolutely right about how OBJECT seems to handle parameters. Just tried
this with a Flash object:

<object data="test.swf" type="application/x-shockwave-flash">
    <param name=bgcolor value="#cccccc">
</object>

does not change the background colour (it should), whereas

<object data="test.swf" type="application/x-shockwave-flash"
    bgcolor"#cccccc">
</object>

does change the background colour (it shouldn't).
Blocks: html4.01
Attaching a patch to correct the handling of <OBJECT> parameters.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: patch
The patch is only of use for pre-xpcom plugins - I've tested this with a Flash
plugin and an older RealPlayer plugin (nppl3260.dll version 6.0.5.27). However,
the latest RealPlayer plugin (version 6.0.8.1024) seems to think it is an xpcom
plugin, and still fails the test cases. Am I missing something, or is this
plugin broken?
(Yes, I did copy nppl3260.dll and nppl3260.xpt to the components directory)
Keywords: review
The latest Real Player is a true xpcom plugin.
Good. What I am saying is that the RealPlayer plugin seems to have the same
problem as Mozilla - it is taking its parameters from the OBJECT's attributes
(GetAttributes) when its should be getting them from the PARAM elements
(GetParameters). Am I missing something? Should this be an evangelism bug?
I think that may be a bug in the Real xpcom plugin. Your patch looks fine to me
r=peterl
Keywords: nsbranch
OS: Windows 98 → All
Hardware: PC → All
Attachment #49323 - Flags: review+
Comment on attachment 49323 [details] [diff] [review]
Patch to fix <OBJECT> parameters

sr=attinasi
Attachment #49323 - Flags: superreview+
patch in trunk
Assignee: av → peterlubczynski
Priority: -- → P2
Whiteboard: [patch in trunk]
Target Milestone: --- → mozilla0.9.5
Since this has a fix, review and super review, we should determine if should
have PDT+ marking for Netscape branch check in.  Please mark as nsbranch+ if
you're ready for PDT to look at this.
ready for PDT
Status: NEW → ASSIGNED
Keywords: nsbranchnsbranch+
Whiteboard: [patch in trunk] → [patch in trunk][PDT]
Patch looks very straightforward assuming there can only ever be embed and
object tags.  What testing has been done to ensure this always works?  I'm
giving PDT+ on the assumption you've fully tested and can prove it :-)
Whiteboard: [patch in trunk][PDT] → [patch in trunk][PDT+]
Well actually, there also applet tags. They would use GetParameters too if they
ever came this way. In fact, the java plugin does this stuff itself, so they
don't. This patch is only for pre-xpcom plugins. Tested and works with Flash and
older RealPlayer plugins. The latest RP plugin is xpcom-enabled and should be
doing this stuff itself, but doesn't. I'm afraid this patch won't get fully
tested until we drop support for the embed tag :-)
patch checked into branch, marking FIXED
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Whiteboard: [patch in trunk][PDT+] → [PDT+]
*** Bug 101833 has been marked as a duplicate of this bug. ***
on today's branch on win (1001), I can see that the 'index.html' is fixed since 
both IE and 6.x play the same file. However, I do not see any change in 
'index2/html' tests. Still seeing what the reporter mentioned initially...
tgos can you comment?
Shrir, this fix is for 4.x-style plugins only.

With XPCOM plugins like Real, it is the plugin's choice if it wants tag
attributes or param tag values. Unfortunatly, Real always choose attributes and
there is nothing I can do about that.
Sorry, I can't test this fix right now. Could someone please visit
http://tgos.org/object/index3.html and check whether the file plays correctly?
And if not, does Peter's post mean that it it's the fault of Real Networks that
it doesn't play in Mozilla, while it does play in IE5 and IE6?

The code to embed the file on index3.html is:

<object id="player1" type="audio/x-pn-realaudio-plugin"
 height="26" width="44">
	<param name="controls" value="PlayButton">
	<param name="console" value="clip1">
	<param name="src" value="test1.rm">
</object>

It's probably the best way to implement plugins, because you only need to know
the MIME type, not the CLASSID.
marking verif based on peter's comment. However, index3.html does not play in 
4.x as well as 6.x. 
Status: RESOLVED → VERIFIED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: