Permalink
Browse files

Fixed the AudioPlayer to use the id3 length if it is provided.

  • Loading branch information...
1 parent 06ed563 commit ac85c9da2e09231378716d4119cb91de06c0a2fa Travis Tidwell committed Jun 2, 2010
Showing with 2 additions and 1 deletion.
  1. +2 −1 com/tmtdigital/dash/display/media/AudioPlayer.as
@@ -73,6 +73,7 @@
{
switch ( e.type ) {
case Event.ID3 :
+ dispatchEvent( new DashEvent( DashEvent.MEDIA_METADATA ) );
dispatchEvent( new DashEvent( DashEvent.MEDIA_READY ) );
break;
@@ -156,7 +157,7 @@
public function get totalTime():Number
{
- return (( bytesLoaded < bytesTotal ) ? 240 : (length / 1000));
+ return id3.TLEN ? id3.TLEN : ((( bytesLoaded < bytesTotal ) ? 240 : (length / 1000)));
}
public function get playheadTime():Number

0 comments on commit ac85c9d

Please sign in to comment.