1

I'm developing an NPAPI plugin for displaying IP-camera video. In order to support 4:3, 5:4, and 16:9 ratio I need to resize the plugin according to users' selection.

It works well on Chrome, but doesn't work on Firefox at all.

Here is my code

embed id=ipcam type="application/npipcam2" width=720 height=576 

function OnChangeCmbWindowRatio()
{
try
{
    var w=640;
    var h=480;

    var value=cmbWindowRatio.value;
    if(value=="4:3")
    {
        w=640;
        h=480;
    }
    if(value=="5:4")
    {
        w=720;
        h=576;
    }
    else if(value=="16:9")
    {
        if(screen.width>1440 )
        {
            if(isIE6)
            {
                w=880;
                h=495;
            }
            else
            {
                w=1280;
                h=720+20;
            }
        }
        else
        {
            w=880;
            h=495;
        }
    }

    if(isIE6)
    {
        ipcam.DT("IE6#plugin w="+w+",h="+h);

        ipcam.style.width=w;
        ipcam.style.height=h;
    }
    else
    {
        ipcam.DT("plugin w="+w+",h="+h);

        ipcam.style.width=w;
        ipcam.style.height=h;

        ipcam.width=w;
        ipcam.height=h;
    }

    SetCookie('windowRatio',value);
}
catch(e)
{
    return;
}
}

I also developed OCX for IE. Now IE and Chrome works fine, only it does not work on Firefox.

Any help will be appreciated!

Georg Fritzsche
  • 97,545
  • 26
  • 194
  • 236
xwpcom
  • 11
  • 1
  • Well, this is very short on details. Does it not resize the element (e.g. try drawing a border around it to see that)? Or is the `NPP_SetWindow()` call missing? Or ... – Georg Fritzsche Sep 22 '13 at 19:22

0 Answers0