From: Tom <[EMAIL PROTECTED]>
Subject: Re: Direct Connection Between Applet and RealPlayer

 > From: [EMAIL PROTECTED]
 > Subject: Direct Connection Between Applet and RealPlayer
 >
 > Has anyone been successful in getting a Java applet to directly
control/monitor
 > a RealPlayer viewer in IE? I've been successful in doing so when I view
the
 > page
 > in Netscape, but when I do so in IE, I get an access violation error.
 > Here's the
 > error:
 >
 > java.lang.ClassCastException: netscape/javascript/JSObject
 >       at foo.init (foo.java:16)
 >       at com/ms/applet/AppletPanel.securedCall0 (AppletPanel.java)
 >       at com/ms/applet/AppletPanel.securedCall (AppletPanel.java)
 >       at com/ms/applet/AppletPanel.processSentEvent (AppletPanel.java)
 >       at com/ms/applet/AppletPanel.processSentEvent (AppletPanel.java)
 >       at com/ms/applet/AppletPanel.run (AppletPanel.java)
 >       at java/lang/Thread.run (Thread.java)
 >
 > And here's the Java that causes it:
 >
 >       System.out.println( "*** init" );
 >       JSObject win = JSObject.getWindow( this );
 >       System.out.println( "win=" + win );
 >       JSObject doc = (JSObject )win.getMember( "document" );
 >       System.out.println( "doc=" + doc );
 >       rap = (RAPlayer )doc.getMember( "ImageWindow" ); // ERROR
 >       System.out.println( "rap=" + rap );
 >       rap.AdviseG2( this );
 >
 > Again, this run of code works just fine in Netscape. And using my
JavaScript
 > bridge I posted earlier, I'm able to communicate between the two
components on
 > both browsers. I'm just curious if I can do away with my JavaScript bridge
 > code.
 >
 > Brad

Interesting...  I am working in this area.. and was surprised that JSObject 
worked as well as it does in IE given that it is a netscape package..

It seems to be giving a security violation.. possibly because realplayer 
comes from a different domain??  ..or maybe just their bug..

Could test (maybe) by relaxing security.. but it probably won't help.

Seems you could get around it by simply calling a javascript function from 
your applet.. and have it call the real function..

Also.. what is the bridge you talked about.. I missed it  ;-(  ..maybe that 
is what I just described??

Tom


*******************************************************
The RealForum is an email discussion group focused on using RealNetworks
products. The RealForum is a place to post messages about the best methods
for creating content using RealNetworks technologies and the planning and
implementation of streaming-media web sites.  Archives of RealForum can
be found at http://realforum.real.com

If you ever want to remove yourself from this mailing list,
you can send mail to <[EMAIL PROTECTED]> with the following
command in the body of your email message:

    unsubscribe realforum

or from another account, besides the address you subscribed with:

    unsubscribe realforum <[EMAIL PROTECTED]>

Reply via email to