Quantcast
Channel: Adobe Community : Discussion List - HTTP Dynamic Streaming
Viewing all articles
Browse latest Browse all 130

Get ByteArray out of HTTPNetStream?

$
0
0

Is it possible to send the bytes loaded in HTTPNetStream to a MXML ?

For example, add a custom event (contains the bytes) in attemptAppendBytes, and addEventListener in MXML?

I'm hoping to share the ByteArray with another P2P peer.

 

// ... somewhere inside HTTPNetStream.as

private function attemptAppendBytes(bytes:ByteArray):void
{
            // Do nothing if this is not an Argo player.
            CONFIG::FLASH_10_1
            {
                appendBytes(bytes);
            }

            // dispatchEvent (new MyCustomEvent( MyCustomEvent.READY, true, false, bytes ));

}

 

public class MyCustomEvent extends Event
    {       
        public static const READY:String = "Ready";       
       
        public var _data:ByteArray;
                       
        public function MyCustomEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false, data:ByteArray=null)
        {
            super(type, bubbles, cancelable);
            _data = data;
        }
       
        override public function clone():Event{
            return new MyCustomEvent(type,bubbles,cancelable,_data);
        }

 

}


Viewing all articles
Browse latest Browse all 130

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>