4 Replies Latest reply on Sep 30, 2010 11:25 AM by iproano

    first attempts with the new multicast feature of FMS4 ...

    FrankDelporte

      Hello,

       

      I installed the developer version of Flash Media Server 4.

       

      I used the f4fpackager to create this file:

      http://localhost/multicast/testvideo.f4m

       

      And when I browse to this URL, it shows me this:

      <manifest>
      <id>testvideo</id>
      <streamType>recorded</streamType>
      <duration>114.61450000000001</duration>
      <bootstrapInfo profile="named" id="bootstrap8944">   AAABq2Fic3QAAAAAAAAAFAAAAAPoAAAAAAABv7UAAAAAAAAAAAAAAAAAAQAAABlhc3J0AAAAAAAAAAABAAAAAQAAAB0BAAABZmFmcnQAAAAAAAAD6AAAAAAVAAAAAQAAAAAAAAAAAAAXcAAAAAIAAAAAAAAXdgAAC7gAAAAEAAAAAAAALuwAABdwAAAABQAAAAAAAEZiAAALuAAAAAcAAAAAAABd2AAAF3AAAAAIAAAAAAAAdU4AAAu4AAAACgAAAAAAAIzEAAAXcAAAAAsAAAAAAACkOgAAC7gAAAANAAAAAAAAu7AAABdwAAAADgAAAAAAANMmAAALuAAAABAAAAAAAADqnAAAF3AAAAARAAAAAAABAhIAAAu4AAAAEwAAAAAAARmIAAAXcAAAABQAAAAAAAEw/gAAC7gAAAAWAAAAAAABSHQAABdwAAAAFwAAAAAAAV/qAAALuAAAABkAAAAAAAF3YAAAF3AAAAAaAAAAAAABjtYAAAu4AAAAHAAAAAAAAaZMAAAXcAAAAB0AAAAAAAG9wgAAAfQAAAAAAAAAAAAAAAAAAAAAAA==
      </bootstrapInfo>
      <media streamId="testvideo" url="testvideo" bootstrapInfoId="bootstrap8944">
      <metadata>

      AgAKb25NZXRhRGF0YQgAAAAAAAhkdXJhdGlvbgBAXKdT987ZFwAFd2lkdGgAQIQAAAAAAAAABmhlaWdodABAdgAAAAAAAAAMdmlkZW9jb2RlY2lkAgAEYXZjMQAMYXVkaW9jb2RlY2lkAgAEbXA0YQAKYXZjcHJvZmlsZQBAWQAAAAAAAAAIYXZjbGV2ZWwAQD4AAAAAAAAABmFhY2FvdAAAAAAAAAAAAAAOdmlkZW9mcmFtZXJhdGUAQD34U+JVaygAD2F1ZGlvc2FtcGxlcmF0ZQBA1YiAAAAAAAANYXVkaW9jaGFubmVscwBAAAAAAAAAAAAJdHJhY2tpbmZvCgAAAAIDAAZsZW5ndGgAQUo7sYAAAAAACXRpbWVzY2FsZQBA3UwAAAAAAAAIbGFuZ3VhZ2UCAANgYGAAAAkDAAZsZW5ndGgAQUNICQAAAAAACXRpbWVzY2FsZQBA1YiAAAAAAAAIbGFuZ3VhZ2UCAANgYGAAAAkAB2N1c3RkZWYKAAAAAAAACQ==
      </metadata>
      </media>
      </manifest>

       

      I added the OSMF.swc to my AIR project, and my code looks like this:

       

      ... creationComplete="created();" >
         
          <fx:Script>
              <![CDATA[
                  import org.osmf.events.TimeEvent;
                  import org.osmf.media.DefaultMediaFactory;
                  import org.osmf.media.MediaPlayerSprite;
                  import org.osmf.media.URLResource;
                 
                  private var mps:MediaPlayerSprite;
                  private var mediaFactory:DefaultMediaFactory;
                  private var track:Sprite;
                  private var progress:Sprite;
                 
                  private function created():void
                  {
                      mps = new MediaPlayerSprite();
                      mps.width = 640;
                      mps.height = 400;
                      holder.addChild(mps);
                     
                      mediaFactory = new DefaultMediaFactory();
                      mps.media = mediaFactory.createMediaElement(new URLResource("http://localhost/multicast/testvideo.f4m"));
                   
                      mps.mediaPlayer.addEventListener(TimeEvent.CURRENT_TIME_CHANGE, onCurrentTimeChange);
                  }
                 
                  private function onCurrentTimeChange(event:TimeEvent):void
                  {
                      trace("video timeevent: " + event.time.toString() + "\tduration: " + mps.mediaPlayer.duration.toString());

      ...

       

      But the trace only gives me this one time:

       

      video timeevent: 0    duration: 0

       

      and nothing is played back ..

       

      Any suggestion how to continue with this? What has to be done within the FMS4 to get things working?

       

      Thanks a lot,

      Frank