JavaScript concurrency issues & initialization delay
Forest Bond <[email protected]>
| Newsgroups | gmane.comp.mozilla.mplayerplug-in |
|---|---|
| Message-ID | <[email protected]> |
Hi,
I am using JavaScript to control the plug-in. I find that JS locks up pretty
good when I do things like this:
setInterval(ChannelNext, 5000);
ChannelNext changes the mplayer URL and calls Play(). Is it ok to call play
methods from a separate thread? The JS console in xulrunner becomes
unresponsive when I do this. As you are probably aware, JS doesn't provide a
non-threaded delay capability, which makes timed loops difficult if the plug-in
doesn't like threads.
There is another issue as well. I am instantiating the plug-in by using
document.createElement("object") and then filling in the necessary element
attributes. As expected, the browser creates a plug-in instance. However,
there appears to be a delay between instantiation and the time the plug-in
becomes usable. My first call to GetURL() fails because mplayer.GetURL ==
undefined. The actual length of time that this is the case appears to be
somewhat unpredictable, although it has never been very long, although all of my
media is local.
Thoughts?
Thanks,
Forest
--
Forest Bond
http://www.alittletooquiet.net
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Mplayerplug-in-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mplayerplug-in-devel
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFG/QMuRO4fQQdv5AwRAmVSAKDTWObyZcpXNgWsCWrBbiNCdA6s6wCgtxOA qnYWk5z7oXhp7VeDPNELiPQ= =3yXn -----END PGP SIGNATURE-----