Results 1 to 5 of 5

Thread: http flash player in as3

  1. #1
    Join Date
    Dec 2012
    Posts
    3

    Default http flash player in as3

    Hi:

    we want to use the ndvr plugin, and we want to create a plash player with flash professional cs5.5 and as3.
    I have looked for examples about this but all I got are samples for flex and flash builder. I need to develop in flash cs5.5 because we have made some functionality for our player and is all in a fla file, so I just need to include the methods to get my player in that file. I have tested with this code:

    import flash.display.Stage;
    import flash.net.NetConnection;
    import flash.net.NetStream;
    import flash.media.Video;
    import flash.display.Sprite;
    import flash.net.URLRequest;
    import flash.net.URLStream;
    import flash.events.Event;
    import flash.utils.ByteArray;
    
    
        const vurl = "http://mywowzaserver:1935/live/test/manifest.f4m"
    
        var nc:NetConnection;
        var ns:NetStream;
        var vo:Video;
    
    
    
        var urlstream:URLStream;
    
        function Player() {
    
            nc = new NetConnection();
            nc.connect(null);
    
            ns = new NetStream(nc);
            
            vo = new Video(200,113);
    	vo.attachNetStream(ns);
    		
    
            addChild(vo);
    
            ns.play(null);
    
            var urlrequest:URLRequest = new URLRequest(vurl)
             urlstream = new URLStream();
    
            urlstream.addEventListener(Event.COMPLETE, completeHandler);
    
            urlstream.load(urlrequest);
    
    
    
        }
    
        function completeHandler(event:Event):void {
            trace("completeHandler: " + event);
    
            var bytes:ByteArray = new ByteArray();
    
            urlstream.readBytes(bytes);
    
            ns.appendBytes(bytes);
        }
    
    Player();
    but nothing happens, I have no error at all, but I never watch my live video. I have tested the url in the FlashHTTPPlayer I got in the samples and works ok, so what am I doing wrong?
    thanks for the help.

  2. #2
    Join Date
    Dec 2007
    Posts
    22,013

    Default

    Flash RTMP playback is not supported with Wowza nDVR. You need to use Flash application that is using the OSMF framework.

    Richard

  3. #3
    Join Date
    Dec 2012
    Posts
    3

    Default

    but I am trying with http not with rtmp.
    can I use OSMF Framework inside flash cs5 professional, I cant find how. is there any usefull sample code or tutorial?
    thanks so much.

  4. #4
    Join Date
    Dec 2007
    Posts
    22,013

    Default

    There are examples included in the Wowza /examples folder, in the LiveVideoStreaming/FlashHTTPPlayer and VideoOnDemandStreaming/FlashHTTPPlayer folders. This is a great starting place.

    Richard

  5. #5
    Join Date
    Dec 2012
    Posts
    3

    Default

    I can see the samples, they are flash builder samples, I will try with those, thanks so much

Similar Threads

  1. Make the Flash example using AS3 only
    By haimke in forum Suggestions
    Replies: 1
    Last Post: 03-22-2013, 01:47 PM
  2. Unable to playback HTTP Sanjose stream on Flash player 11
    By gvijendr in forum Media Players and Devices Discussion
    Replies: 6
    Last Post: 04-03-2012, 06:12 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •