Skip to main content
Participant
June 30, 2008
Question

server side actionscript problem

  • June 30, 2008
  • 1 reply
  • 315 views
Hi, all,

I have the following problem: I want to know, in a server side script, what URL is requested by the client. I've read the documentation on the Client class for server-side actionscript, but the Client.uri property only returns rtmp://localhost/vod. I would need a property or a function that returns rtmp://localhost/vod/mp4:myFile.mp4.

In other words, I don't want to reveal the name of the file the client requests, I would like to call rtmp://localhost/vod/mp4:34.mp4, or something like that. I would like then to write a server side script that takes the id (34 in this case), initiates a connection to http://localhost/getPath.php via a LoadVars object, thus obtaining the actual path of the movie. Then, the same server side script would somehow need to redirect the client to that path.

Any ideas how that may be done?
Thanks in advance.
    This topic has been closed for replies.

    1 reply

    July 2, 2008
    There is not direct way to achieve that.
    URL has two part-->
    1. RTMP connect URL (e.g rtmp://localhost/vod )

    2. + streamname to play ( mp4:myFile.mp4)

    -- Application script knows its name as well as its instance name.. .so first part is easy.

    -- for stream name, the only way I know is to explicitly tell server-side from flashplayer using remote method invocation ( NetConnection.call() ).

    I hope it helps.
    Participant
    July 2, 2008
    Ok, that'll have to do.

    But how do I redirect the stream to whatever I want, not whatever the user wants?