Using Real Player to play an RTSP URL from an applet

M

masonmarc

I have an applet that I'd like to have play an RTSP URL with Real
Player when I click on a button. I can use showDocument for http URLs,
but it doesn't work for RTSP. I get a malformedURL exception. Does
anyone know how to construct a java.net.URL with rtsp as the protocol
so I can use showDocument to pass it to the browser and have the
browser kick off Real Player? I need the player to play the sound
rather than the applet directly so the user has control over what to
play (rewind, etc.)

Thanks.
 
E

Edwin Martin

I have an applet that I'd like to have play an RTSP URL with Real
Player when I click on a button. I can use showDocument for http URLs,
but it doesn't work for RTSP. I get a malformedURL exception. Does
anyone know how to construct a java.net.URL with rtsp as the protocol
so I can use showDocument to pass it to the browser and have the
browser kick off Real Player? I need the player to play the sound
rather than the applet directly so the user has control over what to
play (rewind, etc.)

Make a .ram file and use showDocument to open the ram-file.

See the RealNetworks-docs for more information.

Edwin Martin
 
M

masonmarc

But I need to use the rtsp protocol so I can add a start parameter to
tell Real Player where to start in the audio. java.net.URL doesn't
take rtsp as an out of the box supported protocol.

Thanks,
Marc Mason
 
E

Edwin Martin

But I need to use the rtsp protocol so I can add a start parameter to
tell Real Player where to start in the audio. java.net.URL doesn't
take rtsp as an out of the box supported protocol.

Have you tried my solution? Or even looked into it?

Edwin Martin
 
M

masonmarc

I looked into your solution. Things work fine if I'm typing my URL
straight into a browser. The problem is when Java tries to execute:

appContext.showDocument("rtsp://a.b.com/file.ram?start=2500", "_self")

it gets a MalformedURLException.

Marc Mason
 
M

masonmarc

Sorry that should have been:

appContext.showDocument(new
URL("rtsp:­//a.b.com/file.ram?start=2500"­), "_self")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,024
Latest member
ARDU_PROgrammER

Latest Threads

Top