LOADING
Loading
Hi , welcome back.
LogoutLOGOUT
 
  Lost password?  
Hi
 




 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 01-06-2012, 02:46 AM
FlashMove's Avatar
FlashMove FlashMove is offline

FlashMove Master
 
Join Date: Jan 2000
Location: Singapore
Posts: 4,597
Rep Power: 10
FlashMove is on a distinguished road
Creating a simple OSMF video player for AIR for TV using Flash Builder

Create a simple video player for streaming HTTP Dynamic Streaming video to TVs, set-top boxes, and other devices by configuring Flash Builder to develop a player for A4TV using OSMF.

Actionscript:
package
{
   import flash.display.Sprite;
   import flash.display.StageAlign;
   import flash.display.StageQuality;
   import flash.display.StageScaleMode;
   import flash.events.Event;
   import org.osmf.layout.LayoutMetadata;
   import org.osmf.layout.ScaleMode;
   import flash.system.Capabilities;
   import org.osmf.media.MediaPlayerSprite;
   import org.osmf.media.URLResource;
   
   public class tvPlayer extends Sprite
   {
      private var tvURL:URLResource = new URLResource("http://mediapm.edgesuite.net/osmf/content/test/manifest-files/dynamic_Streaming.f4m");
      private var player:MediaPlayerSprite = null;
      
      public function tvPlayer()
      {
         addEventListener(Event.ADDED_TO_STAGE, init);
      }
      
      public function init(event:Event):void 
      {
         stage.scaleMode = StageScaleMode.NO_SCALE;
         stage.align = StageAlign.TOP_LEFT;
         stage.quality = StageQuality.HIGH;
         
         player = new MediaPlayerSprite();
         player.resource = tvURL;
         player.mediaPlayer.autoPlay = true;
         
         var layout:LayoutMetadata = new LayoutMetadata();
         layout.scaleMode = ScaleMode.LETTERBOX;
         layout.height = Capabilities.screenResolutionY;
         layout.width = Capabilities.screenResolutionX;
         
         player.media.addMetadata(LayoutMetadata.LAYOUT_NAMESPACE, layout);
         
         addChild(player);
      }
   }
}
http://www.adobe.com/devnet/flashmed...h-builder.html
__________________
Actionscript tag . Donate Here . Testimonial . Join Flash Chat UserGroup . Twitter . Facebook
Reply With Quote
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump




All times are GMT. The time now is 07:58 AM.