Welcome, Guest. Please login or register.
Did you miss your activation email?
31 Jul 2010, 11:18:22 UTC
Forum home
+  flexdeveloper.eu Forum
|-+  Flex and ActionScript 3.0
| |-+  Streaming, Video & OSMF (Moderators: flexy, Jan K, James)
| | |-+  VideoDisplay totalTime returns -1
« previous next »
Pages: [1] Print
Author Topic: VideoDisplay totalTime returns -1 (Read 1601 times)
arjunender
Newbie FD
*
Posts: 13


« on: 02 Mar 2010, 12:35:46 UTC »

Hi,
my videodisplay totaltime returns -1 sometimes
here is the code:

Code:
<mx:VideoDisplay id="mp" source="{path}" maintainAspectRatio="false"
playheadUpdate="update_time();"
  ready="set_cue_points();"
  autoRewind="false"
    autoPlay="false">
</mx:VideoDisplay>

In ready event i am setting TotalTime of the Videodisplay

Thanks
« Last Edit: 02 Mar 2010, 12:39:36 UTC by flexy » Logged
flexy
flexdeveloper.eu
Guru/Addict FD
*****
Posts: 3,155


Recovering Coffee Addict & Adobe Expert


WWW
« Reply #1 on: 02 Mar 2010, 13:40:23 UTC »

You're not showing in your code where you're accessing totalTime.
Logged

arjunender
Newbie FD
*
Posts: 13


« Reply #2 on: 05 Mar 2010, 11:36:52 UTC »

ok

here is the code

var dur:Number = mp.totalTime;
duration.text = dur;   

this code is in ready event

Thanks
Logged
flexy
flexdeveloper.eu
Guru/Addict FD
*****
Posts: 3,155


Recovering Coffee Addict & Adobe Expert


WWW
« Reply #3 on: 05 Mar 2010, 15:21:35 UTC »

OK, so when your VideoDisplay object dispatches the ready event, in the hander you're accessing the totalTime property, and it's -1.

(1) Check you are using the latest SDK, there were bugs with this in the earlier Flex 3 SDK versions.

(2) Access your video meta data to obtain the total duration. Register for mx.events.MetadataEvent.METADATA_RECEIVED then pull the clip length from the event.info object.
Logged

arjunender
Newbie FD
*
Posts: 13


« Reply #4 on: 08 Mar 2010, 12:35:28 UTC »

when videodisplay autoplay=true then both totalTime and metadataReceived is working but when i changed autoplay=false sometime it is working sometime it is not working.

for my project videodisplay autoplay should be true

any suggestions

Thanks
Arjun
Logged
flexy
flexdeveloper.eu
Guru/Addict FD
*****
Posts: 3,155


Recovering Coffee Addict & Adobe Expert


WWW
« Reply #5 on: 08 Mar 2010, 12:44:48 UTC »

Your video download is pausing before the meta-data has completed loading... This is a side-effect of using NetStream... Are you using the latest SDK?
Logged

arjunender
Newbie FD
*
Posts: 13


« Reply #6 on: 10 Mar 2010, 07:36:05 UTC »

hi,

yes i am using 3.5 sdk

i think i am wrong with my previous post

thanks
Logged
flexy
flexdeveloper.eu
Guru/Addict FD
*****
Posts: 3,155


Recovering Coffee Addict & Adobe Expert


WWW
« Reply #7 on: 11 Mar 2010, 10:47:10 UTC »

How do you mean wrong, do you mean that the metadata is always received even when autoplay=false?
Logged

arjunender
Newbie FD
*
Posts: 13


« Reply #8 on: 11 Mar 2010, 12:31:41 UTC »

i mean metadata is not receiving sometimes even if autoplay=false or true

thanks
Logged
flexy
flexdeveloper.eu
Guru/Addict FD
*****
Posts: 3,155


Recovering Coffee Addict & Adobe Expert


WWW
« Reply #9 on: 11 Mar 2010, 13:43:28 UTC »

Hmm, have you tried with different video content (perhaps encoded by a different encoder)?
Logged

arjunender
Newbie FD
*
Posts: 13


« Reply #10 on: 18 Mar 2010, 13:41:12 UTC »

hi flexy

i will try

metadataReceived event does not fires for sometimes
is this a bug

thanks
arjun
Logged
flexy
flexdeveloper.eu
Guru/Addict FD
*****
Posts: 3,155


Recovering Coffee Addict & Adobe Expert


WWW
« Reply #11 on: 18 Mar 2010, 17:29:11 UTC »

Have you checked if it's a known issue, or raised it yourself at http://bugs.adobe.com/jira ?
Logged

arjunender
Newbie FD
*
Posts: 13


« Reply #12 on: 25 Mar 2010, 07:59:36 UTC »

most of the users faced this problem

why video is not loading in ie7 and chrome

thanks
arjun
Logged
Pages: [1] Print
« previous next »
Share this on: Twitter Twitter Del.icio.us del.icio.us Digg Digg
Jump to:

©2006-2010 Flexdeveloper.eu/Jodie O'Rourke. All rights reserved.
Adobe®, Adobe® Flash™, Adobe® AIR™ and Adobe® Flex™ are registered trademarks of Adobe Systems Incorporated in the United States and other countries. All rights reserved.

Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC