0 Replies Latest reply on Dec 27, 2011 1:31 PM by leosbiglife2

    Record and Playback

    leosbiglife2

      I have a Flex project that builds a swf that connects to a computer's camera & mic to record to a media server from a web page - everything works great.

       

      Once a recording has been made, the web user would like to review the recording.

       

      Rather than re-invent the wheel, I thought (naively) that I'd just hook the StrobeMediaPlayer into my project and toggle between play and record by twiddling the State.

       

      I got the thing built successfully (FlashBuilder 4.5.1 and player version 11.0), but for the life of me I can't figure out how to force the StrobeMediaPlayerInstance to load a resource.

      I can create a VideoElement, but I can't seem to get the player to pick it up. I get the following:

       

       

      We are unable to connect to the content you've requested. We applogize for the inconvenience.

       

      So, I'm wondering if the StrobeMediaPlayer just wants to be in charge and I should be developing the recording function as a plugin. Am I right?

       

      If a plugin is the direction - it isn't clear to me from the docs how to flip between the two UI's or how the Recording UI would work with it at all. Any suggestions?

       

       

      Here's what I'm doing now from my initial approach (not the plugin). Any guidance would be appreciated.

       

       

      import StrobeMediaPlayback;
      import mx.events.StateChangeEvent;
      import org.osmf.elements.VideoElement;
      import org.osmf.media.URLResource;
      ...
      
      
      
      public var playerContainer:UIComponent;
      public var player:StrobeMediaPlayback;
      ...
      
      
      /**
      
       * The state changes between "Recording" and "Playback"
       */
      
      private function doOnStateChanged(event:StateChangeEvent): void
      {
           // TODO: handle switching between states.
           if (!player) {
                player = new StrobeMediaPlayback();
                playerContainer.addChild(player);
           }
           var videoElement:VideoElement = new VideoElement();
      
           // How do I get this into the player?
           videoElement.resource = new URLResource("http://mediapm.edgesuite.net/strobe/content/test/AFaerysTale_sylviaApostol_640_500_short.flv")
      
           // Tried and Failed with
           player.player.media = videoElement;
       }