Skip to content

Commit

Permalink
Fixed the AudioPlayer to use the id3 length if it is provided.
Browse files Browse the repository at this point in the history
  • Loading branch information
Travis Tidwell committed Jun 2, 2010
1 parent 06ed563 commit ac85c9d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion com/tmtdigital/dash/display/media/AudioPlayer.as
Expand Up @@ -73,6 +73,7 @@
{
switch ( e.type ) {
case Event.ID3 :
dispatchEvent( new DashEvent( DashEvent.MEDIA_METADATA ) );
dispatchEvent( new DashEvent( DashEvent.MEDIA_READY ) );
break;

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit ac85c9d

Please sign in to comment.