#81 browser crash when changing "filename"/"src" with javascript

closed-fixed
Plugin (92)
5
2006-01-11
2005-11-19
No

I am currently on a project where we are looking to
support as many platforms as possible, Linux with
mplayer being one of those.
The problem is that the API for mplayerplug-in, which
looks like WMP9's, is making the browser crash when
using the "filename" attribute to change URL.

The player embed-object is embedded via Javascript into
a DIV element, using code like this:

s += '<embed ';
s += ' id="'+playerID+'" ';
s += ' type="application/x-mplayer2" '; // video/x-ms-wmv
s += ' width="' + playerWidth + '" ';
s += ' height="' + playerHeight + '" ';
s += ' src="'+startClipURL+'" ';
s += ' autostart="1"';
s += ' stretchtofit="0"';
s += ' showcontrols="1"';
s += ' autorewind="1" ';
s += ' showaudiocontrols="1"';
s += ' showpositioncontrols="1"';
s += ' showcaptioning="1"';
s += ' showgotobar="1"';
s += ' showstatusbar="1"';
s += '></embed>';

I tried several methods of changing the URI on-the-fly,
but none worked. I tried using .URL/.filename/.src -
but the only results I could get was after 3 changes
the browser crashed. The only way to recover the
browser is to kill the mplayer process and/or threads.

The media is streaming.
I am using mplayerplug-in 3.15 (ATM the most recent
version)

Instead of scripting a filename change I tried
replacing the entire player by setting the innerHTML to
the "s" variable, and just changing the startClipURL,
which works - but the problem is right click -> stop
doesn't work properly then. I cannot be exact because
the problem doesn't seem to be exactly the same every
time - sometimes playstates refuse to change, sometimes
playstates changes :(

There are many small issues to work on here, and I
would prefer not to submit a public URL in here.
Please contact me if you like :)

Regards,
Seph

Discussion

  • Kevin DeKorte

    Kevin DeKorte - 2005-11-20

    Logged In: YES
    user_id=685413

    Can you please try current CVS?

     
  • Seph Soliman

    Seph Soliman - 2005-11-23

    Logged In: YES
    user_id=831311

    Same day you posted an answer i tried the CVS. A few issues
    are now toublesome:

    Changing filename while the plugin is connecting makes the
    browser hang.

    Changing filename doesn't work as well as reloading with a
    new "src" using the innerHTML on the parent DIV element.
    However the innerHTML fix now works completely! So that's a
    relief.

    Changing the filename ... oh god. this is the 5th time i am
    rewriting this paragraph!
    It appears that sometimes the browser hangs for a moment (~2
    mins, maybe) and when it regains conciousness it does
    nothing. Other times it tries to play the clip by connecting
    to the server, only to keep redirecting from the real IP to
    192.168.16.8 - which doesn't make sense, since it works
    perfectly if I just reload the plugin.

    I hope I am right to use the <player>.filename attribute.

    thank you

    sorry i cannot be more specific - i spent two days trying to
    write this feedback :(

     
  • Kevin DeKorte

    Kevin DeKorte - 2005-11-26

    Logged In: YES
    user_id=685413

    Can you try current CVS again.

    I have no idea why the browser would fall back to the
    private address unless there is a playlist that has a
    private address and public address in the list.

    If you want to email me in private the code and site you are
    using I can keep that private, but otherwise you'll have to
    give me some more info to go on.

     
  • Seph Soliman

    Seph Soliman - 2005-11-26

    Logged In: YES
    user_id=831311

    I'm sorry to report that I am not allowed to publish a URL
    right now. I will have to wait until the project goes live.

    I don't know if I'm doing it right, but all I'm getting with
    the latest CVS version is a gray screen with correct audio
    after changing the filename.

    The initial clip is fine.
    I do have some other issues that seem to be more simple.
    I'll create separate reports for those.
    Thank you :)

     
  • Kevin DeKorte

    Kevin DeKorte - 2005-11-27

    Logged In: YES
    user_id=685413

    I believe I have fixed the problem of the grey screen after
    the first video is played. It was caused by the second video
    being the same height at the first. I have committed that
    change to CVS.

     
  • Seph Soliman

    Seph Soliman - 2005-11-27

    Logged In: YES
    user_id=831311

    Good news incomming :)

    Last night I downgraded from MPlayer Current (not so
    current, since it's from aug 8) to MPlayer 1.0pre7try2.

    That didn't seem to change anything, but this afternoon I
    compiled mplayerplug-in from CVS, as you suggested, and it
    seems alright now.
    I just tried a couple of times changing filename in both
    firefox and epiphany. All of them seem to run fine with over
    5 filename changes.
    And yes - the gray screen problem is gone too.

    I think we can consider this matter resolved. Thank you
    again for the help :)

     
  • Kevin DeKorte

    Kevin DeKorte - 2005-11-27
    • status: open --> closed-fixed
     
  • Kevin DeKorte

    Kevin DeKorte - 2006-01-11
    • assigned_to: nobody --> kdekorte
     

Log in to post a comment.