Re: [flexcoders] Re: Buffer progress bar for streaming FLV

2006-09-01 Thread Abdul Qabiz



VideoDisplay is just wrapper around VideoPlayer. I think, Flex 2 is great because you get source code. So you can extend things rather than using workarounds or hacks...Thanks to Adobe for making SDK free and this indeed has advantage over last version (Flex 
1.5).I am not promising but If I get time, I would write a simple Video component that can handle different type of FLV playback (RTMP, HTTP, PHP/Lighttpd FLV streaming). Which would be easy to use and customize.   I feel, VideoDisplay component is quite  complicated and big for unknown reasons.
I can not post my current code due to some reasons (company, employer etc). I have classes to handle RTMP, Progressive download, Lighttpd FLV streaming; all of these use same interface and events. There is factory which creates required stream transparently. Basically, UI doesn't need to know about specific streams.
Hope this give some idea, if you want to implement something reuseable, lightweight and compact...-abdulOn 9/1/06, greg h <
[EMAIL PROTECTED]> wrote:












  



Wow Chris.  You are way out ahead of me :-)

When Abdul mentioned in the other thread last week needing to "hack the
code properly" I figured it might be a bridge too far for me.

Any chance of your posting your solution over at http://www.onflex.org/code/

Regarding getting "Adobe to add this type of functionality to the framework?"  Maybe Flex 3?

Congratulations again.

gOn 8/31/06, Chris Simeone <
[EMAIL PROTECTED]> wrote:













  



Well, my hack worked.
 
 

I
created a new package in my project. Then I copied the Flex video
classes into the package folders and hacked those (about 50 lines of
code in 10 files - less not counting the package name changes). Then I
created a new video event - BUFFERINGPCT. The VideoEvent object now
contains a numeric property named "bufferingProgress." The hack works
like a charm!

Now I can track buffering progress using my hacked version of the  component.

The question is how do I get Adobe to add this type of functionality to the framework?

Greg & Abdul, thanks for all your responses. I learned much and I hope other find this thread useful. 


  Chris
  


  















__._,_.___





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com








   






  
  
SPONSORED LINKS
  
  
  

Software development tool
  
  
Software development
  
  
Software development services
  
  


Home design software
  
  
Software development company
  

   
  







  
  
  YAHOO! GROUPS LINKS



   Visit your group "flexcoders" on the web. 
   To unsubscribe from this group, send an email to: [EMAIL PROTECTED] 
   Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___



Re: [flexcoders] Re: Buffer progress bar for streaming FLV

2006-08-31 Thread greg h



Wow Chris.  You are way out ahead of me :-)

When Abdul mentioned in the other thread last week needing to "hack the
code properly" I figured it might be a bridge too far for me.

Any chance of your posting your solution over at http://www.onflex.org/code/

Regarding getting "Adobe to add this type of functionality to the framework?"  Maybe Flex 3?

Congratulations again.

gOn 8/31/06, Chris Simeone <[EMAIL PROTECTED]> wrote:













  



Well, my hack worked.
 
 

I
created a new package in my project. Then I copied the Flex video
classes into the package folders and hacked those (about 50 lines of
code in 10 files - less not counting the package name changes). Then I
created a new video event - BUFFERINGPCT. The VideoEvent object now
contains a numeric property named "bufferingProgress." The hack works
like a charm!

Now I can track buffering progress using my hacked version of the  component.

The question is how do I get Adobe to add this type of functionality to the framework?

Greg & Abdul, thanks for all your responses. I learned much and I hope other find this thread useful. 

  Chris
  


__._,_.___





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com








   






  
  
SPONSORED LINKS
  
  
  

Software development tool
  
  
Software development
  
  
Software development services
  
  


Home design software
  
  
Software development company
  

   
  







  
  
  YAHOO! GROUPS LINKS



   Visit your group "flexcoders" on the web. 
   To unsubscribe from this group, send an email to: [EMAIL PROTECTED] 
   Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___



Re: [flexcoders] Re: Buffer progress bar for streaming FLV

2006-08-31 Thread Impudent1
Thanks for sharing, I am currently trying to get my head around 
extending videodisplay as well, but for my needs I need to pull the 
metadata as well as be able to add/remove cuepoints on the fly.

I was was going about it by learning how to extend an existing 
component. You mentioned copying the video classes into a package, then 
adding your new event.

if you could share a bit more on this I would much appreciate. I seem to 
be better at deconstructing/reconstructing examples than getting my head 
   around super classes etc :)

Impudent1
LeapFrog Productions


--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





Re: [flexcoders] Re: Buffer progress bar for streaming FLV

2006-08-31 Thread Abdul Qabiz



Hi,With VideoDisplay, you don't need to use onEnterFrame or any external Timer instance. Just subscribe to VideoDisplay's playheadUpdate event and do progress bar logic in event handler.-abdul
On 8/30/06, Chris Simeone <[EMAIL PROTECTED]> wrote:













  



Ok, Below is my updated "onEnterFrame()" method that updates a
progressBar component. It works great. Thanks again gang!

Now I'm going to try and get this working using the 
component. I'm not sure if I can get to its "netStream" object, so any
ideas/recommendations would be helpful and appreciated. 

Thanks!
Chris

		/
		private function onEnterFrame(event:Event):void
		{
			if(stream == null) return;
			if(duration == 0) return;
			var loadpct:Number = Math.round(Math.ceil((stream.time/duration)*100));

			if(loadpct<=100)
			{
bar.setProgress(loadpct,100);
bar.label= "CurrentProgress" + " " + loadpct + "%";
loadpct+=10;
			}
			if(loadpct>100)
			{
loadpct=0;
			}
			trace("onEnterFrame: Duration: " + duration + " Time: " +
stream.time + " Loaded: " + loadpct + "%");
		}

--- In flexcoders@yahoogroups.com, "Chris Simeone" <[EMAIL PROTECTED]> wrote:
>
> Hi All,
> 
> I've been trying to create a "Buffering" progress bar for streaming
> FLV (via FMS) with the  component. But, the
> videoDisplay is not firing "progress" events for some odd reason. So I
> changed my strategy and started using the netStream object.
> 
> The video is streaming via FMS, but the netStream "bytesLoaded" and
> "bytesTotal" properties are always zero. Any ideas what I may be doing
> wrong. The code's below. 
> 
> Also, it would be great if anyone can show how to pull this of with
> the  component as well!!!
> 
> Thanks!
> Chris
> 
> 
> http://www.adobe.com/2006/mxml" xmlns="*"
> layout="vertical" horizontalAlign="left"
> creationComplete="onCreationComplete();">
> 	
> 		
> 	
> 	
> 	
> 
>


  















__._,_.___





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com








   






  
  
SPONSORED LINKS
  
  
  

Software development tool
  
  
Software development
  
  
Software development services
  
  


Home design software
  
  
Software development company
  

   
  







  
  
  YAHOO! GROUPS LINKS



   Visit your group "flexcoders" on the web. 
   To unsubscribe from this group, send an email to: [EMAIL PROTECTED] 
   Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___



Re: [flexcoders] Re: Buffer progress bar for streaming FLV

2006-08-31 Thread Abdul Qabiz



Hi Chris,In VideoDisplay, you can subscribe to "playheadUpdate" event and use playheadTime, which is similar to NetStream.time.You can subscribe to "stateChange" event and watch "BUFFERING" in event handler, if you want to show BUFFERING status to user... 
-abdulOn 8/30/06, Chris Simeone <[EMAIL PROTECTED]> wrote:













  



Awesome!!! Worked perfectly. Thank You.

With all this in mind, is there a way to pull this of using the
 component? 

I created my app using that component but I could not figure out how
to access the stream. I figured I would do a rewrite using the
netStream object if necessary, but I would love to avoid doing that if
possible.

Thanks Again,
Chris
 

--- In flexcoders@yahoogroups.com, "Michael Ritchie" <[EMAIL PROTECTED]> wrote:
>
> Abdul is correct, you need to get the netstream time, use the
> following code for your enterframe function:
> 
>private function onEnterFrame(event:Event):void
>{
>if(stream == null) return;
>var loadpct:Number = stream.bytesLoaded /
> stream.bytesTotal * 100;
>trace("onEnterFrame: " + event + " Loaded: " +
> stream.time + "%");
>}
> 
> stream.time will return the %
> 
> - mr
> 
> --- In flexcoders@yahoogroups.com, "Abdul Qabiz"  wrote:
> >
> > Hi,
> > 
> > bytesTotal and bytesLoaded are used when you use progressive flv
> download.
> > In case of streaming (via FMS/FCS),
> > your actual file is not downloaded rather bits are streamed over
> pipe
> > 
> > To show buffer progress, you can use NetStream's bufferLength and
> bufferTime
> > properties instead of bytesTotal/bytesLoaded.
> > 
> > -abdul
> > 
> > 
> > 
> > On 8/30/06, Chris Simeone  wrote:
> > >
> > >   Hi All,
> > >
> > > I've been trying to create a "Buffering" progress bar for streaming
> > > FLV (via FMS) with the  component. But, the
> > > videoDisplay is not firing "progress" events for some odd
reason. So I
> > > changed my strategy and started using the netStream object.
> > >
> > > The video is streaming via FMS, but the netStream "bytesLoaded" and
> > > "bytesTotal" properties are always zero. Any ideas what I may be
doing
> > > wrong. The code's below.
> > >
> > > Also, it would be great if anyone can show how to pull this of with
> > > the  component as well!!!
> > >
> > > Thanks!
> > > Chris
> > >
> > > 
> > > http://www.adobe.com/2006/mxml" xmlns="*"

> > > layout="vertical" horizontalAlign="left"
> > > creationComplete="onCreationComplete();">
> > > 
> > > 
> > > 
> > >
> > > 
> > > 
> > >
> > >  
> > >
> >
>


  















__._,_.___





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com








   






  
  
SPONSORED LINKS
  
  
  

Software development tool
  
  
Software development
  
  
Software development services
  
  


Home design software
  
  
Software development company
  

   
  







  
  
  YAHOO! GROUPS LINKS



   Visit your group "flexcoders" on the web. 
   To unsubscribe from this group, send an email to: [EMAIL PROTECTED] 
   Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___



Re: [flexcoders] Re: Buffer progress bar for streaming FLV

2006-08-30 Thread greg h



Chris,

Regarding your post:
Now I'm going to try and get this working using the
 component. I'm not sure if I can get to its
"netStream" object, so any ideas/recommendations would be helpful and
appreciated. 


Last week Abdul posted a reply on this list on the thread "How to assign NetStream to VideoDisplay component?"

You can find Abdul's reply on the thread here: 
http://www.mail-archive.com/flexcoders@yahoogroups.com/msg39368.html

btw ... thank you very, very much Abdul :-)

hth,

g

__._,_.___





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com








   






  
  
SPONSORED LINKS
  
  
  

Software development tool
  
  
Software development
  
  
Software development services
  
  


Home design software
  
  
Software development company
  

   
  







  
  
  YAHOO! GROUPS LINKS



   Visit your group "flexcoders" on the web. 
   To unsubscribe from this group, send an email to: [EMAIL PROTECTED] 
   Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___