1 Reply Latest reply on Feb 19, 2013 6:45 AM by LuukJ

    MediaContainer not visible (audio no video)

    LuukJ

      Hi,

       

      I am creating a video player on the osmf framework and building my project in FlashDevelop.

      I've got a working .f4m stream (visible in test player), but i can't get it visible in my video player, while i do hear the audio of the stream.

      I already have all overlaying elements hidden so the stageVideo (in the background) should be visible.

       

              private function _setupOSMF ( ) : void
              {
                  _mediaPlayer = new MediaPlayer();
                  _mediaPlayer.autoPlay = true;
                  _mediaPlayer.autoRewind = false ;
      
                  _mediaFactory = new DefaultMediaFactory();
                  _layout = new LayoutMetadata();
                  _layout.width = FlexGlobals.topLevelApplication.stage.width;
                  _layout.height = FlexGlobals.topLevelApplication.stage.height;
                  _layout.x = FlexGlobals.topLevelApplication.stage.x;
                  _layout.y = FlexGlobals.topLevelApplication.stage.y;
                  _mediaContainer = new MediaContainer();
      
                  addChild(_mediaContainer); //add player to stage
              }
      
              private function _playVideo( videoToPlay : String ):void
              {
                  _mediaElement = _mediaFactory.createMediaElement(new URLResource(videoToPlay));
                  _mediaElement.addMetadata(LayoutMetadata.LAYOUT_NAMESPACE, _layout);
                  _mediaPlayer.media = _mediaElement;
                  _mediaContainer.addMediaElement(_mediaElement);
              }
      
      

       

      the layout x/y/width/height returns [0,0,590,333.5]