Hi everyone, i need to embed a RealPlayer (yes, RealPlayer!) player in a webpage. I'm running into some cross-browser issues and all the stuff i'm Googling seems to be very outdated (Real's official documentation still refers to Netscape 4, for example).
I got my player working with two tags, across all browsers. (Imagine the {url}, {width} and {height} are filled with something) :
<embed src="{url}"
width="{width}"
height="{height}"
type="audio/x-pn-realaudio-plugin"
autostart="true"
controls="imagewindow"
maintainaspect="true"
console="video">
</embed>
<embed type="audio/x-pn-realaudio-plugin"
width="{width}"
height="60"
autostart="true"
controls="all"
console="video">
</embed>
This works across all browsers but has one flaw: you can't do any fallback content as you can with the <object>
tag, like a message that people should download Realplayer. So i constructed a new version that uses <object>
instead of <embed>
:
<object
classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA"
width="{width}"
height="{height}">
<param name="src" value="{url}">
<param name="type" value="audio/x-pn-realaudio-plugin">
<param name="autostart" value="true">
<param name="controls" value="imagewindow">
<param name="maintainaspect" value="true">
<param name="console" value="video">
<p>Download realplayer to view this movie!</p>
</object>
<object classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" width="{width}" height="60">
<param name="type" value="audio/x-pn-realaudio-plugin">
<param name="autostart" value="true">
<param name="controls" value="all">
<param name="console" value="video">
</object>
This works in all browsers except Firefox!. I can't really figure out why because Firefox is supposed to understand the <object>
tag and also works with Silverlight content that is embedded using <object>
without any <embed>
tags. Re-adding the <embed>
tags again lets the player works in Firefox, but removes the 'Download realplayer' message, which was the reason to use this whole set-up.
Does anybody know a solution that solves this problem?