<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Determining the length of an FLV video using the VideoDisplay control in Flex</title>
	<atom:link href="http://blog.flexexamples.com/2008/12/29/determining-the-length-of-an-flv-video-using-the-videodisplay-control-in-flex/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com/2008/12/29/determining-the-length-of-an-flv-video-using-the-videodisplay-control-in-flex/</link>
	<description>Just a bunch of Adobe Flex Examples</description>
	<lastBuildDate>Sun, 12 Feb 2012 19:26:49 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Peter deHaan</title>
		<link>http://blog.flexexamples.com/2008/12/29/determining-the-length-of-an-flv-video-using-the-videodisplay-control-in-flex/comment-page-1/#comment-8933</link>
		<dc:creator>Peter deHaan</dc:creator>
		<pubDate>Sat, 29 Jan 2011 08:40:58 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/12/29/determining-the-length-of-an-flv-video-using-the-videodisplay-control-in-flex/#comment-8933</guid>
		<description>@mack,

Please file a bug at http://bugs.adobe.com/flex/ and include a simple test case. It may be the media or possibly if you&#039;re using an RTMP stream the time may be incorrectly reported. Or perhaps like oliver said above, if the request is being cached by the server/client than the time gets returned as -1. But somebody at Adobe will be able to take a look once they see your test case and media.

Peter</description>
		<content:encoded><![CDATA[<p>@mack,</p>
<p>Please file a bug at <a href="http://bugs.adobe.com/flex/" rel="nofollow">http://bugs.adobe.com/flex/</a> and include a simple test case. It may be the media or possibly if you&#8217;re using an RTMP stream the time may be incorrectly reported. Or perhaps like oliver said above, if the request is being cached by the server/client than the time gets returned as -1. But somebody at Adobe will be able to take a look once they see your test case and media.</p>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mack</title>
		<link>http://blog.flexexamples.com/2008/12/29/determining-the-length-of-an-flv-video-using-the-videodisplay-control-in-flex/comment-page-1/#comment-8932</link>
		<dc:creator>mack</dc:creator>
		<pubDate>Sat, 29 Jan 2011 06:23:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/12/29/determining-the-length-of-an-flv-video-using-the-videodisplay-control-in-flex/#comment-8932</guid>
		<description>i use a videoDispaly control and i try to get total time of the video but i get totalTime as -1 .
i find lot on it but solution i found that use latest SDK for flex
now i use 3.5 SDK but the problem i found same..
Can anyOne help me on that??????</description>
		<content:encoded><![CDATA[<p>i use a videoDispaly control and i try to get total time of the video but i get totalTime as -1 .<br />
i find lot on it but solution i found that use latest SDK for flex<br />
now i use 3.5 SDK but the problem i found same..<br />
Can anyOne help me on that??????</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: oliver</title>
		<link>http://blog.flexexamples.com/2008/12/29/determining-the-length-of-an-flv-video-using-the-videodisplay-control-in-flex/comment-page-1/#comment-6292</link>
		<dc:creator>oliver</dc:creator>
		<pubDate>Sun, 08 Nov 2009 16:32:37 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/12/29/determining-the-length-of-an-flv-video-using-the-videodisplay-control-in-flex/#comment-6292</guid>
		<description>Claudio: 
As far as I found out the -1 problem only appears if  the video gets loaded from the browser cache.
So I built a very simple workaround to &quot;solve&quot; that problem: 
I add ed a noCache-function at the end that forces flash to load the file directly from the server.

Example:
player.videoDisplay.source =  URL+&quot;?noCache=&quot;+Math.random()*10000;</description>
		<content:encoded><![CDATA[<p>Claudio:<br />
As far as I found out the -1 problem only appears if  the video gets loaded from the browser cache.<br />
So I built a very simple workaround to &#8220;solve&#8221; that problem:<br />
I add ed a noCache-function at the end that forces flash to load the file directly from the server.</p>
<p>Example:<br />
player.videoDisplay.source =  URL+&#8221;?noCache=&#8221;+Math.random()*10000;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Claudius Tiberiu Iacob</title>
		<link>http://blog.flexexamples.com/2008/12/29/determining-the-length-of-an-flv-video-using-the-videodisplay-control-in-flex/comment-page-1/#comment-4508</link>
		<dc:creator>Claudius Tiberiu Iacob</dc:creator>
		<pubDate>Fri, 10 Jul 2009 22:02:55 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/12/29/determining-the-length-of-an-flv-video-using-the-videodisplay-control-in-flex/#comment-4508</guid>
		<description>Erata
Instead of:
&quot;Then it will fire again when the “videoDisplay.totalTime” property gets updated form -1 to , &quot;
Read:
&quot;Then it will fire again when the “videoDisplay.totalTime” property gets updated form -1 to [correct value],&quot;

Sigh, I had this bad inspiration to surround &quot;correct value&quot;  in angled parenthesis...</description>
		<content:encoded><![CDATA[<p>Erata<br />
Instead of:<br />
&#8220;Then it will fire again when the “videoDisplay.totalTime” property gets updated form -1 to , &#8221;<br />
Read:<br />
&#8220;Then it will fire again when the “videoDisplay.totalTime” property gets updated form -1 to [correct value],&#8221;</p>
<p>Sigh, I had this bad inspiration to surround &#8220;correct value&#8221;  in angled parenthesis&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Claudius Tiberiu Iacob</title>
		<link>http://blog.flexexamples.com/2008/12/29/determining-the-length-of-an-flv-video-using-the-videodisplay-control-in-flex/comment-page-1/#comment-4507</link>
		<dc:creator>Claudius Tiberiu Iacob</dc:creator>
		<pubDate>Fri, 10 Jul 2009 21:59:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/12/29/determining-the-length-of-an-flv-video-using-the-videodisplay-control-in-flex/#comment-4507</guid>
		<description>Hey Peter,

I think I managed to narrow down this bug -- I still do consider it a bug:
- metadata will arrive just fine the very first time the movie is loaded by my application; that is, open Firefox, type application&#039;s URL in the address bar and you&#039;re set;
- however, metadata will fail to be there if I cause the same application to be loaded again, but in a second Firefox tab.

I&#039;m not sure your workaround tackles it. That listener will fire when the &quot;videoDisplay.totalTime&quot; property is updated from NaN to -1. Then it will fire again when the &quot;videoDisplay.totalTime&quot; property gets updated form -1 to , &lt;em&gt;but that&#039;ll only happen after the movie has played once&lt;/em&gt; &#8212; which is actually the bogus behavior.

Take care,
C</description>
		<content:encoded><![CDATA[<p>Hey Peter,</p>
<p>I think I managed to narrow down this bug &#8212; I still do consider it a bug:<br />
- metadata will arrive just fine the very first time the movie is loaded by my application; that is, open Firefox, type application&#8217;s URL in the address bar and you&#8217;re set;<br />
- however, metadata will fail to be there if I cause the same application to be loaded again, but in a second Firefox tab.</p>
<p>I&#8217;m not sure your workaround tackles it. That listener will fire when the &#8220;videoDisplay.totalTime&#8221; property is updated from NaN to -1. Then it will fire again when the &#8220;videoDisplay.totalTime&#8221; property gets updated form -1 to , <em>but that&#8217;ll only happen after the movie has played once</em> &mdash; which is actually the bogus behavior.</p>
<p>Take care,<br />
C</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter deHaan</title>
		<link>http://blog.flexexamples.com/2008/12/29/determining-the-length-of-an-flv-video-using-the-videodisplay-control-in-flex/comment-page-1/#comment-4346</link>
		<dc:creator>Peter deHaan</dc:creator>
		<pubDate>Tue, 23 Jun 2009 01:36:16 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/12/29/determining-the-length-of-an-flv-video-using-the-videodisplay-control-in-flex/#comment-4346</guid>
		<description>Claudius,

Assuming adding some bogus video metadata isn&#039;t a feasable workaround, how about something like this:
&lt;pre class=&quot;code&quot;&gt;
&lt;mx:Label id=&quot;lbl&quot;
        text=&quot;{videoDisplay.totalTime}&quot;
        updateComplete=&quot;Alert.show(videoDisplay.totalTime.toString());&quot;
        visible=&quot;false&quot;
        includeInLayout=&quot;false&quot; /&gt;
&lt;/pre&gt;

Pretty odd workaround, but it basically uses data binding to determine when the &lt;code&gt;totalTime&lt;/code&gt; property changes, and then uses the &lt;code&gt;updateComplete&lt;/code&gt; event to trigger some arbitrary function (in this case a call to &lt;code&gt;Alert.show()&lt;/code&gt; to display the video&#039;s duration).

I&#039;m sure the code could be refined, but this was one of the first things to come to mind.

Peter</description>
		<content:encoded><![CDATA[<p>Claudius,</p>
<p>Assuming adding some bogus video metadata isn&#8217;t a feasable workaround, how about something like this:</p>
<pre class="code">
&lt;mx:Label id="lbl"
        text="{videoDisplay.totalTime}"
        updateComplete="Alert.show(videoDisplay.totalTime.toString());"
        visible="false"
        includeInLayout="false" /&gt;
</pre>
<p>Pretty odd workaround, but it basically uses data binding to determine when the <code>totalTime</code> property changes, and then uses the <code>updateComplete</code> event to trigger some arbitrary function (in this case a call to <code>Alert.show()</code> to display the video&#8217;s duration).</p>
<p>I&#8217;m sure the code could be refined, but this was one of the first things to come to mind.</p>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Claudius Tiberiu Iacob</title>
		<link>http://blog.flexexamples.com/2008/12/29/determining-the-length-of-an-flv-video-using-the-videodisplay-control-in-flex/comment-page-1/#comment-4345</link>
		<dc:creator>Claudius Tiberiu Iacob</dc:creator>
		<pubDate>Mon, 22 Jun 2009 20:52:39 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/12/29/determining-the-length-of-an-flv-video-using-the-videodisplay-control-in-flex/#comment-4345</guid>
		<description>Hi Peter,

I thought that maybe it would be nice to warn people on just how bogus the totalTime property is, since it relies on the &quot;metadataReceived&quot; event, which fails to fire most of the time.

The bug, which causes totalTime to be &quot;-1&quot; when it has no metadata to rely on, is known and has been deferred to Flex 4 :( :
http://bugs.adobe.com/jira/browse/SDK-14948

I&#039;m really eager to know if anyone has found a working workaround to this, please drop me an email if you did, I couldn&#039;t make it work hard as i tried.

Thanks,
C</description>
		<content:encoded><![CDATA[<p>Hi Peter,</p>
<p>I thought that maybe it would be nice to warn people on just how bogus the totalTime property is, since it relies on the &#8220;metadataReceived&#8221; event, which fails to fire most of the time.</p>
<p>The bug, which causes totalTime to be &#8220;-1&#8243; when it has no metadata to rely on, is known and has been deferred to Flex 4 :( :<br />
<a href="http://bugs.adobe.com/jira/browse/SDK-14948" rel="nofollow">http://bugs.adobe.com/jira/browse/SDK-14948</a></p>
<p>I&#8217;m really eager to know if anyone has found a working workaround to this, please drop me an email if you did, I couldn&#8217;t make it work hard as i tried.</p>
<p>Thanks,<br />
C</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Flash Free</title>
		<link>http://blog.flexexamples.com/2008/12/29/determining-the-length-of-an-flv-video-using-the-videodisplay-control-in-flex/comment-page-1/#comment-4081</link>
		<dc:creator>Flash Free</dc:creator>
		<pubDate>Sat, 03 Jan 2009 17:52:24 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/12/29/determining-the-length-of-an-flv-video-using-the-videodisplay-control-in-flex/#comment-4081</guid>
		<description>this is good because you can display on screen how long the video is to the user before he actually loads the video, this is a good idea to save bandwidth, and time for the user.  I wouldn&#039;t click on a video that is 2 hours in length if I only have 15 minutes to watch a video, and if that video loads all the way, that means I lose bandwidth because the user downloaded that whole video.</description>
		<content:encoded><![CDATA[<p>this is good because you can display on screen how long the video is to the user before he actually loads the video, this is a good idea to save bandwidth, and time for the user.  I wouldn&#8217;t click on a video that is 2 hours in length if I only have 15 minutes to watch a video, and if that video loads all the way, that means I lose bandwidth because the user downloaded that whole video.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

