0 Replies Latest reply on Nov 17, 2008 3:48 AM by kyamagu

    NetStream.play() does not support URLRequest ?

    kyamagu
      Hello,
      I'm writing a simple FLV player using FLEX Builder and AIR 1.1.

      I can use NetStream.play() method with a string uri. It works fine.
      But I cannot use the method with URLRequest class.

      I think NetStream.play() can accept an URLRequest argument, because it is described in the AIR document like this:

      play() method
      public function play(...arguments):void
      arguments — The location of the video file to play, as a URLRequest object or a string.


      I want to use URLRequest for adding custom request headers.


      // this is OK
      var stream:NetStream = new NetStream(con);
      stream.play(" http://localhost/foo.flv");

      // this is NG
      var stream:NetStream = new NetStream(con);
      var request:URLRequest = new URLRequest(" http://localhost/foo.flv");
      stream.play(request);

      When I execute the last code, no error occured.
      The localhost's Apache does not get the request. (no access log)

      Please let me know if you have any idea.