Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 83162 - mplayerplug-in.xpt not installed
Summary: mplayerplug-in.xpt not installed
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-24 02:31 UTC by Alastair Burt
Modified: 2005-04-14 14:14 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alastair Burt 2005-02-24 02:31:56 UTC
The Javascript interface to the plugin does not work. 

Reproducible: Always
Steps to Reproduce:
Try browsing this:

<HTML>
<HEAD>
<TITLE>Simple Plug-in Test</TITLE>
</HEAD>
<BODY>

<center>
<h1> XPConnect Scriptable Sample Plug-in </h1>
</center>

This page contains a testcase which demonstrates the work of scriptable
plug-in with Mozilla. This example plug-in has no native GUI and does not
draw anything in the plugin window. Clicking on the button will result in calling
native plugin method from JavaScript. Show Version will instruct the plug-in
to retrieve the Mozilla user agent string and return it to JavaScript to show
in the alert box.

<br><br>

<center>

<embed onMediaComplete="NewFile();" type="application/x-mplayer2" width=500 height=400 autostart=0 filename="file:///home/kdekorte/Movies/duality.divx"><br>

<script>
var embed = document.embeds[0];

function complete()
{
  alert("Media Complete");
}

function Play()
{
  embed.Play();
}

function CPlay()
{
  embed.controls.play();
}

function CPause()
{
  embed.controls.pause();
}

function CStop()
{
  embed.controls.stop();
}

function Pause()
{
  embed.Pause();
}

function DoPlay()
{
  embed.DoPlay();
}

function DoPause()
{
  embed.DoPause();
}

function Stop()
{
  embed.Stop();
}

function Quit()
{
  embed.quit();
}

function FastForward()
{
  embed.FastForward();
}

function FastReverse()
{
  embed.FastReverse();
}

function PlayState()
{
   alert(embed.playState);
}

function OrigFile()
{
	embed.filename = "09_Holiday.mp3";
	embed.play();
}

function NewFile()
{
	embed.filename = "sexy.mpg";
	embed.Play();
}

function File()
{
	alert(embed.filename);
}

function gTime()
{
	alert(embed.getTime());
}
function gDuration()
{
	alert(embed.getDuration());
}
function gPercent()
{
	alert(embed.getPercent());
}

function FS()
{
	embed.fullscreen = true;
}

function FSOff()
{
	embed.fullscreen = false;
}


function ControlsOn()
{
	embed.ShowControls = true;
}


function ControlsOff()
{
	embed.ShowControls = false;
}

</script>

<br>
<form name="formname">
<input type=button value="Play" onclick='Play()'>
<input type=button value="ControlsPlay" onclick='CPlay()'>
<input type=button value="ControlsPause" onclick='CPause()'>
<input type=button value="ControlsStop" onclick='CStop()'>
<input type=button value="DoPlay" onclick='DoPlay()'>
<input type=button value="Pause" onclick='Pause()'>
<input type=button value="DoPause" onclick='DoPause()'>
<input type=button value="Stop" onclick='Stop()'>
<input type=button value="Quit" onclick='Quit()'>
<br>
<input type=button value="FF" onclick='FastForward()'>
<input type=button value="Rew" onclick='FastReverse()'>
<input type=button value="State" onclick='PlayState()'>
<input type=button value="Orginal File" onclick='OrigFile()'>
<input type=button value="New File" onclick='NewFile()'>
<input type=button value="Filename" onclick='File()'>
<input type=button value="Time" onclick='gTime()'>
<input type=button value="Duration" onclick='gDuration()'>
<input type=button value="Percent" onclick='gPercent()'>
<input type=button value="FS" onclick='FS()'>
<input type=button value="Window" onclick='FSOff()'>
<input type=button value="Controls ON" onclick='ControlsOn()'>
<input type=button value="Controls OFF" onclick='ControlsOff()'>

</form>

</center>

</BODY>
</HTML>




I have added the following to my ebuild:

	if [ -d /usr/lib/mozilla/components ]; then
		insinto /usr/lib/mozilla/components
		doins mplayerplug-in.xpt
	fi

	if [ -d /usr/lib/MozillaFirefox/components ]; then
		insinto /usr/lib/MozillaFirefox/components
		doins mplayerplug-in.xpt
	fi
Comment 1 Kevin DeKorte 2005-03-03 08:14:38 UTC
The mplayerplug-in.xpt is the file that tells Mozilla/Firefox about the javascript  methods provided by the plugin. This is required file for a correct install.
Comment 2 Joseph D. Wieber, Jr. 2005-03-08 12:49:30 UTC
Have the same problem. I added 

insinto /opt/netscape/plugins
doins mplayerplug-in.xpt

to the 2.66 ebuild. The .xpt file is generated and installed, but konqueror fails to use the plug-in.

Also created a symbolic link thusly:
ln -s /opt/netscape/plugins/mplayerplug-in.xpt /usr/lib/nsbrowser/plugins/mplayerplug-in.xpt


Comment 3 Joseph D. Wieber, Jr. 2005-03-08 19:50:40 UTC
Ok, so it is only on my laptop that I have this problem. On my home box (both are x86 with 2.6.10-r6 kernel) the 2.66 ebuild not generating the .xpt file is a non-issue. That is, even without it konqueror finds and uses the mplayerplug-in, odd. Both konqueror configs search the same paths for plug-ins, both have java and java-script enabled. Dunno why the laptop build does not see the mplayerplug-in.
Comment 4 Magno Alexandre Torres 2005-04-04 14:13:09 UTC
I solve this, making the follow:

I'm usinging the ebuild:
/usr/portage/net-www/mplayerplug-in/mplayerplug-in-2.80.ebuild

Change the src_install by this new one:

src_install() {
    exeinto /opt/netscape/plugins
    doexe mplayerplug-in.so || die "plugin failed"
    inst_plugin /opt/netscape/plugins/mplayerplug-in.so
    insinto /opt/netscape/plugins
    doins mplayerplug-in.xpt
    inst_plugin /opt/netscape/plugins/mplayerplug-in.xpt

    insinto /etc
    doins mplayerplug-in.conf
    dodoc ChangeLog INSTALL README TODO DOCS/tech/*.txt
}

This will copy and make the correct simbolic links in the right directory
I hope help someone
Comment 5 Joe Jezak (RETIRED) gentoo-dev 2005-04-14 14:14:50 UTC
Fixed in CVS in the 2.80 ebuild, thanks for the report!