0 Replies Latest reply on May 9, 2008 3:45 PM by Luloca

    FLVPlayback not working with RTMP

    Luloca
      Hi all!

      I´m with a problem with FLVPlayback. When i try to see videos from FMS, the progress bar and buttons appear, but the video is not playing.

      I can play progressive FLV with FLVPlayback, and I can play the videos from FMS if I use NetConnection. Only FLVPlayback with FMS videos is not working.

      I also tried the Dreamweaver "Insert/Flash Video" tool, but it is only working for progressive.

      Our FMS is a Windows 2003 32b with IIS 6. I´ve already set the MIME type for .flv to "video/x-flv".

      I´m sending a copy of the AS codes that i´m using to connect the videos.

      ****** With AS 1/2 ******
      (this one i´ve been using with a Flash Communication Server for a long time without problems)

      import mx.video.*;
      var _playback:FLVPlayback;

      this.createTextField("my_txt", 10, 10, 10, 100, 21);
      _playback.contentPath = "rtmp://MyServer/MyAppplication/Myvideo.flv";
      _playback.playButton = _play;
      _playback.pauseButton = _pause;
      _playback.stopButton = _stop;
      _playback.seekBar = _seek;
      _playback.volumeBar = _volume;
      _playback.muteButton = _mute;

      var myListener:Object = new Object();

      myListener.playheadUpdate = function(eventObject:Object):Void {
      var seconds:Number = Math.floor(eventObject.playheadTime);
      var minutes:Number = Math.floor(seconds / 60);
      seconds = seconds % 60;
      if (seconds < 10)
      var secondsString:String = "0" + seconds.toString();
      else
      var secondsString:String = seconds.toString();
      txtTimer.text = minutes + ":" + secondsString
      }

      _playback.playheadUpdateInterval = 100;
      _playback.addEventListener("playheadUpdate", myListener);

      var lsnr:Object = new Object();
      lsnr.stopped = function()
      {
      trace("stopped");
      logo._visible = true;
      }

      lsnr.stateChange = function(evt:Object)
      {
      if(evt.state <> "stopped")
      {
      logo._visible = false;
      }
      }

      _playback.addEventListener("stopped", lsnr);
      _playback.addEventListener("stateChange", lsnr);

      vpath="MyImage.gif"
      loadMovie(vpath, logo.square);

      ****** With AS 3 ********

      import fl.video.FLVPlayback;

      display.autoPlay = true;
      display.isLive = false;
      display.source = "rtmp://MyServer/MyAppplication/Myvideo.flv";